summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/include/commit.inc4
-rw-r--r--mysql-test/include/default_mysqld.cnf21
-rw-r--r--mysql-test/include/have_innodb.combinations6
-rw-r--r--mysql-test/include/have_ipv6.inc20
-rw-r--r--mysql-test/include/mix1.inc31
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-rw-r--r--mysql-test/r/1st.result4
-rw-r--r--mysql-test/r/alter_table.result495
-rw-r--r--mysql-test/r/alter_table_online.result44
-rw-r--r--mysql-test/r/bootstrap.result2
-rw-r--r--mysql-test/r/cast.result12
-rw-r--r--mysql-test/r/commit_1innodb.result4
-rw-r--r--mysql-test/r/connect.result12
-rw-r--r--mysql-test/r/create.result18
-rw-r--r--mysql-test/r/ctype_errors.result4
-rw-r--r--mysql-test/r/ctype_tis620.result2
-rw-r--r--mysql-test/r/ctype_ujis.result4
-rw-r--r--mysql-test/r/ctype_utf8.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4.result6
-rw-r--r--mysql-test/r/ctype_utf8mb4_heap.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result2
-rw-r--r--mysql-test/r/drop.result10
-rw-r--r--mysql-test/r/dyncol.result4
-rw-r--r--mysql-test/r/error_simulation.result2
-rw-r--r--mysql-test/r/events_restart.result23
-rw-r--r--mysql-test/r/flush_read_lock.result31
-rw-r--r--mysql-test/r/func_analyse.result2
-rw-r--r--mysql-test/r/func_crypt.result2
-rw-r--r--mysql-test/r/func_rollback.result4
-rw-r--r--mysql-test/r/func_sapdb.result4
-rw-r--r--mysql-test/r/gis-rtree.result2
-rw-r--r--mysql-test/r/grant.result5
-rw-r--r--mysql-test/r/handlersocket.result2
-rw-r--r--mysql-test/r/innodb_mysql_sync.result197
-rw-r--r--mysql-test/r/key.result2
-rw-r--r--mysql-test/r/log_slow.result1
-rw-r--r--mysql-test/r/log_state.result6
-rw-r--r--mysql-test/r/log_tables.result56
-rw-r--r--mysql-test/r/log_tables_upgrade.result4
-rw-r--r--mysql-test/r/lowercase_table4.result26
-rw-r--r--mysql-test/r/mdl_sync.result233
-rw-r--r--mysql-test/r/myisam-system.result2
-rw-r--r--mysql-test/r/myisam.result2
-rw-r--r--mysql-test/r/mysql_upgrade.result28
-rw-r--r--mysql-test/r/mysql_upgrade_ssl.result4
-rw-r--r--mysql-test/r/mysqlcheck.result16
-rw-r--r--mysql-test/r/mysqld--help.result104
-rw-r--r--mysql-test/r/mysqldump.result9
-rw-r--r--mysql-test/r/partition.result49
-rw-r--r--mysql-test/r/partition_binlog.result2
-rw-r--r--mysql-test/r/partition_debug_sync.result33
-rw-r--r--mysql-test/r/partition_disabled.result6
-rw-r--r--mysql-test/r/partition_innodb.result13
-rw-r--r--mysql-test/r/partition_innodb_plugin.result16
-rw-r--r--mysql-test/r/partition_mgm_err.result2
-rw-r--r--mysql-test/r/partition_myisam.result129
-rw-r--r--mysql-test/r/partition_not_blackhole.result2
-rw-r--r--mysql-test/r/partition_truncate.result2
-rw-r--r--mysql-test/r/plugin.result12
-rw-r--r--mysql-test/r/profiling.result6
-rw-r--r--mysql-test/r/ps.result44
-rw-r--r--mysql-test/r/ps_1general.result4
-rw-r--r--mysql-test/r/ps_ddl1.result2
-rw-r--r--mysql-test/r/query_cache.result35
-rw-r--r--mysql-test/r/read_only.result4
-rw-r--r--mysql-test/r/rename.result2
-rw-r--r--mysql-test/r/row-checksum-old.result2
-rw-r--r--mysql-test/r/row-checksum.result2
-rw-r--r--mysql-test/r/select.result12
-rw-r--r--mysql-test/r/select_jcl6.result12
-rw-r--r--mysql-test/r/select_pkeycache.result12
-rw-r--r--mysql-test/r/signal.result47
-rw-r--r--mysql-test/r/signal_demo2.result4
-rw-r--r--mysql-test/r/signal_demo3.result20
-rw-r--r--mysql-test/r/sp-big.result2
-rw-r--r--mysql-test/r/sp-bugs.result11
-rw-r--r--mysql-test/r/sp-code.result4
-rw-r--r--mysql-test/r/sp-destruct.result4
-rw-r--r--mysql-test/r/sp-dynamic.result2
-rw-r--r--mysql-test/r/sp-error.result896
-rw-r--r--mysql-test/r/sp-prelocking.result4
-rw-r--r--mysql-test/r/sp-vars.result2
-rw-r--r--mysql-test/r/sp.result183
-rw-r--r--mysql-test/r/sp_trans.result4
-rw-r--r--mysql-test/r/statistics.result28
-rw-r--r--mysql-test/r/strict.result29
-rw-r--r--mysql-test/r/subselect.result2
-rw-r--r--mysql-test/r/subselect2.result2
-rw-r--r--mysql-test/r/subselect4.result2
-rw-r--r--mysql-test/r/subselect_innodb.result4
-rw-r--r--mysql-test/r/subselect_no_mat.result2
-rw-r--r--mysql-test/r/subselect_no_opts.result2
-rw-r--r--mysql-test/r/subselect_no_scache.result2
-rw-r--r--mysql-test/r/subselect_no_semijoin.result2
-rw-r--r--mysql-test/r/system_mysql_db.result10
-rw-r--r--mysql-test/r/system_mysql_db_fix40123.result10
-rw-r--r--mysql-test/r/system_mysql_db_fix50030.result10
-rw-r--r--mysql-test/r/system_mysql_db_fix50117.result10
-rw-r--r--mysql-test/r/temp_table.result22
-rw-r--r--mysql-test/r/truncate_coverage.result6
-rw-r--r--mysql-test/r/type_newdecimal.result2
-rw-r--r--mysql-test/r/upgrade.result4
-rw-r--r--mysql-test/r/view.result4
-rw-r--r--mysql-test/r/view_grant.result8
-rw-r--r--mysql-test/r/warnings.result10
-rw-r--r--mysql-test/suite/archive/archive.result24
-rw-r--r--mysql-test/suite/archive/archive.test15
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result4
-rw-r--r--mysql-test/suite/csv/csv.result6
-rw-r--r--mysql-test/suite/federated/federated_server.result20
-rw-r--r--mysql-test/suite/federated/federated_transactions.result4
-rw-r--r--mysql-test/suite/federated/federatedx.result22
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_02.result44
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql.result112
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage.result7
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics_mysql.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql.result92
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result33
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_02.result44
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_02.result44
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result174
-rw-r--r--mysql-test/suite/handler/aria.result4
-rw-r--r--mysql-test/suite/handler/handler.inc2
-rw-r--r--mysql-test/suite/handler/heap.result4
-rw-r--r--mysql-test/suite/handler/innodb.result4
-rw-r--r--mysql-test/suite/handler/myisam.result4
-rw-r--r--mysql-test/suite/innodb/include/restart_and_reinit.inc3
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc-44030.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc-56228.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result40
-rw-r--r--mysql-test/suite/innodb/r/innodb-create-options.result328
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result606
-rw-r--r--mysql-test/suite/innodb/r/innodb-zip.result253
-rw-r--r--mysql-test/suite/innodb/r/innodb.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14007649.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug21704.result68
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug52745.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53591.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug54044.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug56947.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug60049.result7
-rw-r--r--mysql-test/suite/innodb/r/innodb_corrupt_bit.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_index_large_prefix.result382
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema.result28
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema_buffer.result100
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result480
-rw-r--r--mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result53
-rw-r--r--mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result2
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc-44030.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb-create-options.test134
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test581
-rw-r--r--mysql-test/suite/innodb/t/innodb-zip.test158
-rw-r--r--mysql-test/suite/innodb/t/innodb.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug21704.test55
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug52745.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53591.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53592.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug54044.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug56947.test18
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb_corrupt_bit.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_file_format.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_index_large_prefix.test310
-rw-r--r--mysql-test/suite/innodb/t/innodb_information_schema_buffer.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb_mysql.test513
-rw-r--r--mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test116
-rw-r--r--mysql-test/suite/maria/lock.result4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result2
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result2
-rw-r--r--mysql-test/suite/maria/maria-page-checksum.result108
-rw-r--r--mysql-test/suite/maria/maria-page-checksum.test108
-rw-r--r--mysql-test/suite/maria/maria-partitioning.result4
-rw-r--r--mysql-test/suite/maria/maria-ucs2.result1
-rw-r--r--mysql-test/suite/maria/maria3.result2
-rw-r--r--mysql-test/suite/maria/maria3.test2
-rw-r--r--mysql-test/suite/maria/max_length.result4
-rw-r--r--mysql-test/suite/maria/small_blocksize.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result2
-rw-r--r--mysql-test/suite/oqgraph/r/basic.result2
-rw-r--r--mysql-test/suite/parts/inc/partition.pre8
-rw-r--r--mysql-test/suite/parts/inc/partition_alter3.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_crash_exchange.inc29
-rw-r--r--mysql-test/suite/parts/inc/partition_crash_t2.inc12
-rw-r--r--mysql-test/suite/parts/inc/partition_fail_exchange.inc27
-rw-r--r--mysql-test/suite/parts/inc/partition_fail_t2.inc31
-rw-r--r--mysql-test/suite/parts/r/part_ctype_utf32.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_maria.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_maria.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_innodb.result98
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_myisam.result4
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result562
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_innodb.result122
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_debug_innodb.result1918
-rw-r--r--mysql-test/suite/parts/r/partition_debug_myisam.result17
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_archive.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_memory.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_archive.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_memory.result10
-rw-r--r--mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result10
-rw-r--r--mysql-test/suite/parts/r/partition_repair_myisam.result24
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_innodb.result2
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_myisam.result2
-rw-r--r--mysql-test/suite/parts/t/partition_basic_innodb.test12
-rw-r--r--mysql-test/suite/parts/t/partition_basic_symlink_innodb.test220
-rw-r--r--mysql-test/suite/parts/t/partition_debug_innodb.test31
-rw-r--r--mysql-test/suite/parts/t/partition_repair_myisam.test24
-rw-r--r--mysql-test/suite/perfschema/disabled.def38
-rw-r--r--mysql-test/suite/perfschema/include/connection_load.inc35
-rw-r--r--mysql-test/suite/perfschema/include/digest_cleanup.inc3
-rw-r--r--mysql-test/suite/perfschema/include/digest_execution.inc54
-rw-r--r--mysql-test/suite/perfschema/include/digest_setup.inc3
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_load.inc24
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_setup.inc3
-rw-r--r--mysql-test/suite/perfschema/include/hostcache_set_state.inc23
-rw-r--r--mysql-test/suite/perfschema/include/schema.inc2
-rw-r--r--mysql-test/suite/perfschema/include/sizing_auto.inc16
-rw-r--r--mysql-test/suite/perfschema/include/start_server_common.inc10
-rw-r--r--mysql-test/suite/perfschema/include/table_aggregate_load.inc36
-rw-r--r--mysql-test/suite/perfschema/r/binlog_stmt.result16
-rw-r--r--mysql-test/suite/perfschema/r/csv_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/ddl_session_account_connect_attrs.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_session_connect_attrs.result9
-rw-r--r--mysql-test/suite/perfschema/r/digest_table_full.result60
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_digest.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result45
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_session_connect_attrs.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result6
-rw-r--r--mysql-test/suite/perfschema/r/func_file_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/func_mutex.result1
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result21
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result20
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result25
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result33
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result22
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result22
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result21
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result20
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result25
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result33
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result23
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result27
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result22
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result22
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result23
-rw-r--r--mysql-test/suite/perfschema/r/indexed_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/information_schema.result27
-rw-r--r--mysql-test/suite/perfschema/r/innodb_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/memory_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/merge_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/multi_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/myisam_file_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/myisam_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result1
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result2
-rw-r--r--mysql-test/suite/perfschema/r/part_table_io.result31
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade.result303
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_event.result63
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_func.result63
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_proc.result63
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_table.result65
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_view.result65
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result9
-rw-r--r--mysql-test/suite/perfschema/r/rollback_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/schema.result105
-rw-r--r--mysql-test/suite/perfschema/r/short_option_1.result2
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result2
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result3
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result11
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_digests.result56
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statement_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result10
-rw-r--r--mysql-test/suite/perfschema/r/start_server_nothing.result27
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result50
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result11
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result115
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result115
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers2.result56
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_long_query.result8
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result19
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result130
-rw-r--r--mysql-test/suite/perfschema/r/temp_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/trigger_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/view_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/t/ddl_session_account_connect_attrs.test15
-rw-r--r--mysql-test/suite/perfschema/t/ddl_session_connect_attrs.test15
-rw-r--r--mysql-test/suite/perfschema/t/digest_table_full.test2
-rw-r--r--mysql-test/suite/perfschema/t/disabled.def2
-rw-r--r--mysql-test/suite/perfschema/t/dml_session_account_connect_attrs.test38
-rw-r--r--mysql-test/suite/perfschema/t/dml_session_connect_attrs.test38
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_instruments.test6
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test14
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test13
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_format.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_max_con-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test13
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test12
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test12
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test11
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test11
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test15
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test13
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test13
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test12
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test12
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test10
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_peer_addr.test11
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade.test10
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_event.test36
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_func.test36
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_proc.test36
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_table.test44
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_view.test44
-rw-r--r--mysql-test/suite/perfschema/t/privilege_table_io.test6
-rw-r--r--mysql-test/suite/perfschema/t/short_option_1.test2
-rw-r--r--mysql-test/suite/perfschema/t/socket_connect.test2
-rw-r--r--mysql-test/suite/perfschema/t/socket_instances_func.test2
-rw-r--r--mysql-test/suite/perfschema/t/socket_instances_func_win.test2
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test2
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test4
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_no_digests.test2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_nothing-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/start_server_nothing.test4
-rw-r--r--mysql-test/suite/perfschema/t/start_server_off.test27
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest.test2
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest_consumers.test2
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest_consumers2.test2
-rw-r--r--mysql-test/suite/perfschema/t/statement_digest_long_query.test2
-rw-r--r--mysql-test/suite/rpl/r/rpl_000013.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_temp.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result124
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_multi_update3.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_password_boundaries.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_colSize.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result124
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_sp005.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_session_var.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result124
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_no_op.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temp_table.result2
-rw-r--r--mysql-test/suite/sys_vars/r/host_cache_size_basic.result37
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_lwm_basic.result96
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_analyze_is_persistent_basic.result103
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result64
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result66
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_cmp_per_index_enabled_basic.result65
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result96
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_compression_level_basic.result73
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_compression_pad_pct_max_basic.result86
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result8
-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_file_per_table_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_log_at_timeout_basic.result96
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result73
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result98
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result33
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result81
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result109
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result1709
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result1709
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result1709
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result1709
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_online_alter_log_max_size_basic.result64
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_read_only_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_auto_recalc_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/max_connect_errors_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/metadata_locks_hash_instances_basic.result51
-rw-r--r--mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result23
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sql_notes_func.result2
-rw-r--r--mysql-test/suite/sys_vars/t/host_cache_size_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/host_cache_size_basic.test41
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_lwm_basic.test142
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_analyze_is_persistent_basic.test81
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test58
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test102
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test102
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test102
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test58
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_cmp_per_index_enabled_basic.test69
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_failure_threshold_pct_basic.test143
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test64
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_pad_pct_max_basic.test136
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test2
-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_flush_log_at_timeout_basic.test151
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test29
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test143
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test28
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test74
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test151
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_online_alter_log_max_size_basic.test51
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test53
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test53
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_read_only_basic.test20
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_auto_recalc_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/metadata_locks_hash_instances_basic.test60
-rw-r--r--mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic-master.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test47
-rw-r--r--mysql-test/suite/vcol/t/rpl_vcol.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_column_def_options_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_handler_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_non_stored_columns_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_partition_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_view_innodb.test2
-rw-r--r--mysql-test/t/alter_table.test376
-rw-r--r--mysql-test/t/alter_table_online.test46
-rw-r--r--mysql-test/t/ctype_utf8mb4.test3
-rw-r--r--mysql-test/t/events_restart.test22
-rw-r--r--mysql-test/t/flush_read_lock.test40
-rw-r--r--mysql-test/t/innodb_mysql_sync.test316
-rw-r--r--mysql-test/t/log_state.test4
-rw-r--r--mysql-test/t/log_tables.test14
-rw-r--r--mysql-test/t/lowercase_table4.test4
-rw-r--r--mysql-test/t/mdl_sync.test319
-rw-r--r--mysql-test/t/partition.test43
-rw-r--r--mysql-test/t/partition_binlog.test2
-rw-r--r--mysql-test/t/partition_debug_sync.test57
-rw-r--r--mysql-test/t/partition_innodb.test13
-rw-r--r--mysql-test/t/partition_mgm_err.test2
-rw-r--r--mysql-test/t/partition_myisam.test135
-rw-r--r--mysql-test/t/partition_pruning.test1
-rw-r--r--mysql-test/t/partition_truncate.test2
-rw-r--r--mysql-test/t/query_cache.test22
-rw-r--r--mysql-test/t/signal.test11
-rw-r--r--mysql-test/t/sp-bugs.test10
-rw-r--r--mysql-test/t/sp-error.test970
-rw-r--r--mysql-test/t/strict.test20
-rw-r--r--mysql-test/t/system_mysql_db_fix40123.test2
-rw-r--r--mysql-test/t/system_mysql_db_fix50030.test2
-rw-r--r--mysql-test/t/system_mysql_db_fix50117.test5
-rw-r--r--mysql-test/t/temp_table.test25
-rw-r--r--mysql-test/t/truncate_coverage.test4
-rw-r--r--mysql-test/t/upgrade.test2
602 files changed, 17171 insertions, 12762 deletions
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index fdb9ef1f563..bdb6f48f095 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -7,7 +7,7 @@
##
set sql_mode=no_engine_substitution;
-eval set storage_engine = $engine_type;
+eval set default_storage_engine = $engine_type;
set autocommit=1;
--disable_warnings
@@ -757,7 +757,7 @@ call p_verify_status_increment(2, 0, 4, 4);
alter table t3 add column (b int);
call p_verify_status_increment(2, 0, 2, 0);
alter table t3 rename t4;
-call p_verify_status_increment(2, 0, 2, 0);
+call p_verify_status_increment(0, 0, 0, 0);
rename table t4 to t3;
call p_verify_status_increment(0, 0, 0, 0);
truncate table t3;
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 1c21a4f03cc..5f93428e599 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -1,4 +1,4 @@
-# Copyright (c) 2007, 2010, Oracle and/or its affiliates
+# Copyright (c) 2007, 2012, Oracle and/or its affiliates
# Copyright (c) 2010, 2012, Monty Program Ab
#
# This program is free software; you can redistribute it and/or modify
@@ -48,21 +48,40 @@ 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-stats-persistent= OFF
slave-net-timeout=120
+# MAINTAINER:
+# the loose- syntax is to make sure the cnf file is also
+# valid when building without the performance schema.
+
# Run tests with the performance schema instrumentation
loose-enable-performance-schema
# Run tests with a small number of instrumented objects
# to limit memory consumption with MTR
+loose-performance-schema-accounts-size=100
+loose-performance-schema-digests-size=200
+loose-performance-schema-hosts-size=100
+loose-performance-schema-users-size=100
loose-performance-schema-max-mutex-instances=5000
loose-performance-schema-max-rwlock-instances=5000
+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-handles=1000
+loose-performance-schema-events-waits-history-size=10
+loose-performance-schema-events-waits-history-long-size=10000
+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-max-thread-instances=200
+loose-performance-schema-session-connect-attrs-size=2048
+
+# Enable everything, for maximun code exposure during testing
loose-performance-schema-instrument='%=ON'
diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations
index 55107204097..b76f783b928 100644
--- a/mysql-test/include/have_innodb.combinations
+++ b/mysql-test/include/have_innodb.combinations
@@ -7,6 +7,8 @@ innodb-trx
innodb-buffer-pool-stats
innodb-buffer-page
innodb-buffer-page-lru
+innodb-sys-foreign
+innodb-sys-foreign-col
[xtradb_plugin]
ignore-builtin-innodb
@@ -17,6 +19,8 @@ innodb-trx
innodb-buffer-pool-stats
innodb-buffer-page
innodb-buffer-page-lru
+innodb-sys-foreign
+innodb-sys-foreign-col
[xtradb]
innodb
@@ -26,3 +30,5 @@ innodb-metrics
innodb-buffer-pool-stats
innodb-buffer-page
innodb-buffer-page-lru
+innodb-sys-foreign
+innodb-sys-foreign-col
diff --git a/mysql-test/include/have_ipv6.inc b/mysql-test/include/have_ipv6.inc
new file mode 100644
index 00000000000..752dd0db53e
--- /dev/null
+++ b/mysql-test/include/have_ipv6.inc
@@ -0,0 +1,20 @@
+# Check if ipv6 is available.
+#
+--disable_query_log
+--disable_result_log
+--disable_abort_on_error
+connect (checkcon123456789,::1,root,,test);
+if($mysql_errno)
+{
+ skip No IPv6 support;
+}
+connection default;
+if(!$mysql_errno)
+{
+ disconnect checkcon123456789;
+}
+--enable_abort_on_error
+--enable_result_log
+--enable_query_log
+# end check
+
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index 75ba0e43221..15a69fc04ff 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -25,7 +25,7 @@
# where just some indexes have been created must be used.
#
-eval SET SESSION STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
@@ -388,7 +388,7 @@ drop table t1;
# Bug #13293 Wrongly used index results in endless loop.
# (was part of group_min_max.test)
#
-create table t1 (f1 int, f2 char(1), primary key(f1,f2));
+create table t1 (f1 int, f2 char(1), primary key(f1,f2)) stats_persistent=0;
insert into t1 values ( 1,"e"),(2,"a"),( 3,"c"),(4,"d");
alter table t1 drop primary key, add primary key (f2, f1);
explain select distinct f1 a, f1 b from t1;
@@ -432,7 +432,7 @@ CREATE TABLE t1 (
age tinyint(3) unsigned NOT NULL,
PRIMARY KEY (id),
INDEX (name,dept)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1(id, dept, age, name) VALUES
(3987, 'cs1', 10, 'rs1'), (3988, 'cs2', 20, 'rs1'), (3995, 'cs3', 10, 'rs2'),
(3996, 'cs4', 20, 'rs2'), (4003, 'cs5', 10, 'rs3'), (4004, 'cs6', 20, 'rs3'),
@@ -546,7 +546,7 @@ CREATE TABLE t2(
acct_id int DEFAULT NULL,
INDEX idx1 (stat_id, acct_id),
INDEX idx2 (acct_id)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1(stat_id,acct_id) VALUES
(1,759), (2,831), (3,785), (4,854), (1,921),
@@ -1580,6 +1580,29 @@ DROP TABLE t1;
--echo End of 5.1 tests
--echo #
+--echo # Bug#43600: Incorrect type conversion caused wrong result.
+--echo #
+CREATE TABLE t1 (
+ a int NOT NULL
+) engine= innodb;
+
+CREATE TABLE t2 (
+ a int NOT NULL,
+ b int NOT NULL,
+ filler char(100) DEFAULT NULL,
+ KEY a (a,b)
+) engine= innodb;
+
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t2 select A.a + 10 *B.a, 1, 'filler' from t1 A, t1 B;
+
+explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
+select * from t1, t2 where t2.a=t1.a and t2.b + 1;
+
+drop table t1,t2;
+--echo # End of test case for the bug#43600
+
+--echo #
--echo # Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
--echo #
--echo # Check that a TRUNCATE TABLE statement, needing an exclusive meta
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index ea5b556fbaf..2cfa9a7e066 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3495,6 +3495,7 @@ sub mysql_install_db {
mtr_add_arg($args, "--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, "--disable-sync-frm");
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
mtr_add_arg($args, "--core-file");
diff --git a/mysql-test/r/1st.result b/mysql-test/r/1st.result
index 7e4ab09b09d..cb82cb5fe7d 100644
--- a/mysql-test/r/1st.result
+++ b/mysql-test/r/1st.result
@@ -22,15 +22,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index b6e99952c23..f01eba1aa05 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -270,8 +270,8 @@ ERROR 42000: Incorrect table name ''
drop table t1;
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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;
@@ -556,7 +556,7 @@ create database mysqltest;
create table t1 (c1 int);
alter table t1 rename mysqltest.t1;
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
alter table mysqltest.t1 rename t1;
drop table t1;
create table t1 (c1 int);
@@ -973,7 +973,7 @@ SHOW CREATE TABLE `tt+1`;
Table Create Table
tt+1 CREATE TEMPORARY TABLE `tt+1` (
`c1` int(11) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DELAY_KEY_WRITE=1
SHOW CREATE TABLE `tt+2`;
Table Create Table
tt+2 CREATE TEMPORARY TABLE `tt+2` (
@@ -1327,6 +1327,16 @@ CREATE DATABASE db1 CHARACTER SET utf8;
CREATE TABLE db1.t1 (bar TINYTEXT, KEY (bar(100)));
ALTER TABLE db1.t1 ADD baz INT;
DROP DATABASE db1;
+# Additional coverage for refactoring which is made as part
+# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege
+# to allow temp table operations".
+#
+# At some point the below test case failed on assertion.
+DROP TABLE IF EXISTS t1;
+CREATE TEMPORARY TABLE t1 (i int) ENGINE=MyISAM;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ERROR HY000: Storage engine MyISAM of the table `test`.`t1` doesn't have this option
+DROP TABLE t1;
#
# Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
# CLAUSE FAILS OR ABORTS SERVER.
@@ -1380,3 +1390,480 @@ t1 CREATE TABLE `t1` (
KEY `x_param1` (`x_param`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# Bug#11938817 ALTER BEHAVIOR DIFFERENT THEN DOCUMENTED
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT) engine=innodb;
+INSERT INTO t1 VALUES (1), (2);
+# This should not do anything
+ALTER TABLE t1;
+affected rows: 0
+# Check that we rebuild the table
+ALTER TABLE t1 engine=innodb;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+# This should also rebuild the table
+ALTER TABLE t1 FORCE;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+DROP TABLE t1;
+# Bug#11748057 (formerly known as 34972): ALTER TABLE statement doesn't
+# identify correct column name.
+#
+CREATE TABLE t1 (c1 int unsigned , c2 char(100) not null default '');
+ALTER TABLE t1 ADD c3 char(16) NOT NULL DEFAULT '' AFTER c2,
+MODIFY c2 char(100) NOT NULL DEFAULT '' AFTER c1;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(10) unsigned DEFAULT NULL,
+ `c2` char(100) NOT NULL DEFAULT '',
+ `c3` char(16) NOT NULL DEFAULT ''
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+#
+# WL#5534 Online ALTER, Phase 1
+#
+# Single thread tests.
+# See innodb_mysql_sync.test for multi thread tests.
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB;
+CREATE TABLE m1(a INT PRIMARY KEY, b INT) engine=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+INSERT INTO m1 VALUES (1,1), (2,2);
+#
+# 1: Test ALGORITHM keyword
+#
+# --enable_info allows us to see how many rows were updated
+# by ALTER TABLE. in-place will show 0 rows, while copy > 0.
+ALTER TABLE t1 ADD INDEX i1(b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= INVALID;
+ERROR HY000: Unknown ALGORITHM 'INVALID'
+ALTER TABLE m1 ENABLE KEYS;
+affected rows: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= DEFAULT;
+affected rows: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE;
+affected rows: 0
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+#
+# 2: Test ALGORITHM + old_alter_table
+#
+SET SESSION old_alter_table= 1;
+affected rows: 0
+ALTER TABLE t1 ADD INDEX i1(b);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SET SESSION old_alter_table= 0;
+affected rows: 0
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+#
+# 3: Test unsupported in-place operation
+#
+ALTER TABLE t1 ADD COLUMN (c1 INT);
+ALTER TABLE t1 ADD COLUMN (c2 INT), ALGORITHM= DEFAULT;
+ALTER TABLE t1 ADD COLUMN (c3 INT), ALGORITHM= COPY;
+ALTER TABLE t1 ADD COLUMN (c4 INT), ALGORITHM= INPLACE;
+ALTER TABLE t1 DROP COLUMN c1, DROP COLUMN c2, DROP COLUMN c3, DROP COLUMN c4;
+#
+# 4: Test LOCK keyword
+#
+ALTER TABLE t1 ADD INDEX i1(b), LOCK= DEFAULT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i2(b), LOCK= NONE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i3(b), LOCK= SHARED;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i4(b), LOCK= EXCLUSIVE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i5(b), LOCK= INVALID;
+ERROR HY000: Unknown LOCK type 'INVALID'
+ALTER TABLE m1 ENABLE KEYS, LOCK= DEFAULT;
+ALTER TABLE m1 ENABLE KEYS, LOCK= NONE;
+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
+ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED;
+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
+ALTER TABLE m1 ENABLE KEYS, LOCK= EXCLUSIVE;
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+#
+# 5: Test ALGORITHM + LOCK
+#
+ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= NONE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= INPLACE, LOCK= SHARED;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
+ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= COPY, LOCK= SHARED;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE t1 ADD INDEX i6(b), ALGORITHM= COPY, LOCK= EXCLUSIVE;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE;
+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED;
+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
+affected rows: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE;
+ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= EXCLUSIVE;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+DROP TABLE t1, m1;
+#
+# 6: Possible deadlock involving thr_lock.c
+#
+CREATE TABLE t1(a INT PRIMARY KEY, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2);
+START TRANSACTION;
+INSERT INTO t1 VALUES (3,3);
+# Connection con1
+# Sending:
+ALTER TABLE t1 DISABLE KEYS;
+# Connection default
+# Waiting until ALTER TABLE is blocked.
+UPDATE t1 SET b = 4;
+COMMIT;
+# Connection con1
+# Reaping: ALTER TABLE t1 DISABLE KEYS
+# Connection default
+DROP TABLE t1;
+#
+# 7: Which operations require copy and which can be done in-place?
+#
+# Test which ALTER TABLE operations are done in-place and
+# which operations are done using temporary table copy.
+#
+# --enable_info allows us to see how many rows were updated
+# by ALTER TABLE. in-place will show 0 rows, while copy > 0.
+#
+DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3;
+# Single operation tests
+CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
+CREATE TABLE tm1(a INT NOT NULL, b INT, c INT) engine=MyISAM;
+CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB;
+CREATE TABLE tm2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=MyISAM;
+INSERT INTO ti1 VALUES (1,1,1), (2,2,2);
+INSERT INTO ti2 VALUES (1,1,1), (2,2,2);
+INSERT INTO tm1 VALUES (1,1,1), (2,2,2);
+INSERT INTO tm2 VALUES (1,1,1), (2,2,2);
+ALTER TABLE ti1;
+affected rows: 0
+ALTER TABLE tm1;
+affected rows: 0
+ALTER TABLE ti1 ADD COLUMN d VARCHAR(200);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD COLUMN d VARCHAR(200);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD COLUMN d2 VARCHAR(200);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD COLUMN e ENUM('a', 'b') FIRST;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD COLUMN e ENUM('a', 'b') FIRST;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD COLUMN f INT AFTER a;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD COLUMN f INT AFTER a;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD INDEX ii1(b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD INDEX im1(b);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD UNIQUE INDEX im2 (c);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 1
+Warnings:
+Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
+ALTER TABLE tm1 ADD FULLTEXT INDEX im3 (d);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD FULLTEXT INDEX im4 (d2);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY.
+ALTER TABLE ti1 ADD PRIMARY KEY(a);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD PRIMARY KEY(a);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP INDEX ii3;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP INDEX im3;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP COLUMN d2;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP COLUMN d2;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ADD CONSTRAINT fm1 FOREIGN KEY (b) REFERENCES tm2(a);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ALTER COLUMN b SET DEFAULT 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ALTER COLUMN b DROP DEFAULT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 CHANGE COLUMN f g INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 CHANGE COLUMN f g INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 CHANGE COLUMN g h VARCHAR(20);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN e ENUM('a', 'b', 'c');
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN e ENUM('a', 'b', 'c');
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN e INT;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN e INT;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN e INT AFTER h;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN e INT FIRST;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN e INT FIRST;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+SET @orig_sql_mode = @@sql_mode;
+SET @@sql_mode = 'STRICT_TRANS_TABLES';
+ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SET @@sql_mode = @orig_sql_mode;
+ALTER TABLE tm1 MODIFY COLUMN c INT NOT NULL;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN c INT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN c INT NULL;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30);
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30) AFTER d;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP COLUMN h;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP COLUMN h;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP INDEX ii2;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP INDEX im2;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP PRIMARY KEY;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP PRIMARY KEY;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DROP FOREIGN KEY fi1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DROP FOREIGN KEY fm1;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 RENAME TO ti3;
+affected rows: 0
+ALTER TABLE tm1 RENAME TO tm3;
+affected rows: 0
+ALTER TABLE ti3 RENAME TO ti1;
+affected rows: 0
+ALTER TABLE tm3 RENAME TO tm1;
+affected rows: 0
+ALTER TABLE ti1 ORDER BY b;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 ORDER BY b;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 CONVERT TO CHARACTER SET utf16;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 DEFAULT CHARACTER SET utf8;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 DEFAULT CHARACTER SET utf8;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 FORCE;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 FORCE;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 AUTO_INCREMENT 3;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 AUTO_INCREMENT 3;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 AVG_ROW_LENGTH 10;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 AVG_ROW_LENGTH 10;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 CHECKSUM 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 CHECKSUM 1;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 COMMENT 'test';
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 COMMENT 'test';
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MAX_ROWS 100;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MAX_ROWS 100;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 MIN_ROWS 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 MIN_ROWS 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti1 PACK_KEYS 1;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE tm1 PACK_KEYS 1;
+affected rows: 2
+info: Records: 2 Duplicates: 0 Warnings: 0
+DROP TABLE ti1, ti2, tm1, tm2;
+# Tests of >1 operation (InnoDB)
+CREATE TABLE ti1(a INT PRIMARY KEY AUTO_INCREMENT, b INT) engine=InnoDB;
+INSERT INTO ti1(b) VALUES (1), (2);
+ALTER TABLE ti1 RENAME TO ti3, ADD INDEX ii1(b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE ti3 DROP INDEX ii1, AUTO_INCREMENT 5;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+INSERT INTO ti3(b) VALUES (5);
+ALTER TABLE ti3 ADD INDEX ii1(b), AUTO_INCREMENT 7;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+INSERT INTO ti3(b) VALUES (7);
+SELECT * FROM ti3;
+a b
+1 1
+2 2
+5 5
+7 7
+DROP TABLE ti3;
+#
+# 8: Scenario in which ALTER TABLE was returning an unwarranted
+# ER_ILLEGAL_HA error at some point during work on this WL.
+#
+CREATE TABLE tm1(i INT DEFAULT 1) engine=MyISAM;
+ALTER TABLE tm1 ADD INDEX ii1(i), ALTER COLUMN i DROP DEFAULT;
+DROP TABLE tm1;
diff --git a/mysql-test/r/alter_table_online.result b/mysql-test/r/alter_table_online.result
index 83e82191541..1e7bc5e83cd 100644
--- a/mysql-test/r/alter_table_online.result
+++ b/mysql-test/r/alter_table_online.result
@@ -11,61 +11,59 @@ drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
alter online table t1 modify b int default 5;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 change b new_name int;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify e enum('a','b','c');
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 comment "new comment";
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 rename to t2;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
drop table t1;
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
alter online table t1 drop column b, add b int;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify b bigint;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify e enum('c','a','b');
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify c varchar(50);
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify c varchar(100);
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 add f int;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 engine=memory;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter table t1 engine=innodb;
alter table t1 add index (b);
alter online table t1 add index c (c);
-ERROR HY000: Can't execute the given 'ALTER' command as online
alter online table t1 drop index b;
-ERROR HY000: Can't execute the given 'ALTER' command as online
drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
alter online table t1 drop column b, add b int;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify b bigint;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify e enum('c','a','b');
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify c varchar(50);
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 modify c varchar(100);
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 add f int;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 engine=memory;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter table t1 engine=innodb;
alter table t1 add index (b);
alter online table t1 add index c (c);
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
alter online table t1 drop index b;
-ERROR HY000: Can't execute the given 'ALTER' command as online
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY.
drop table t1;
create table t1 (a int not null primary key, b int, c varchar(80));
create table t2 (a int not null primary key, b int, c varchar(80));
diff --git a/mysql-test/r/bootstrap.result b/mysql-test/r/bootstrap.result
index 8bef6f90ab4..2e2082441f8 100644
--- a/mysql-test/r/bootstrap.result
+++ b/mysql-test/r/bootstrap.result
@@ -1,7 +1,7 @@
drop table if exists t1;
drop table t1;
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
set @my_max_allowed_packet= @@max_allowed_packet;
set global max_allowed_packet=100*@@max_allowed_packet;
set global max_allowed_packet=@my_max_allowed_packet;
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index 03b4b84e461..3b57b4833a9 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -768,13 +768,19 @@ CAST(CAST('20:05:05' AS TIME) as date)
set sql_mode= TRADITIONAL;
select cast("2101-00-01 02:03:04" as datetime);
cast("2101-00-01 02:03:04" as datetime)
-2101-00-01 02:03:04
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04'
select cast(cast("2101-00-01 02:03:04" as datetime) as time);
cast(cast("2101-00-01 02:03:04" as datetime) as time)
-02:03:04
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04'
SELECT CAST(CAST('20:05:05' AS TIME) as date);
CAST(CAST('20:05:05' AS TIME) as date)
-0000-00-00
+NULL
+Warnings:
+Warning 1292 Truncated incorrect date value: '0000-00-00'
set sql_mode=DEFAULT;
create table t1 (f1 time, f2 date, f3 datetime);
insert into t1 values ('11:22:33','2011-12-13','2011-12-13 11:22:33');
diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result
index af198edc4ca..3583e8ed396 100644
--- a/mysql-test/r/commit_1innodb.result
+++ b/mysql-test/r/commit_1innodb.result
@@ -1,6 +1,6 @@
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
set sql_mode=no_engine_substitution;
-set storage_engine = InnoDB;
+set default_storage_engine = InnoDB;
set autocommit=1;
drop table if exists t1;
drop table if exists t2;
@@ -842,7 +842,7 @@ call p_verify_status_increment(2, 0, 2, 0);
SUCCESS
alter table t3 rename t4;
-call p_verify_status_increment(2, 0, 2, 0);
+call p_verify_status_increment(0, 0, 0, 0);
SUCCESS
rename table t4 to t3;
diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result
index 3fcc5b5d2c1..84a1e9dbab2 100644
--- a/mysql-test/r/connect.result
+++ b/mysql-test/r/connect.result
@@ -16,15 +16,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -59,15 +55,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -110,15 +102,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index d0d953f4e38..fff8733cfdf 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -28,15 +28,15 @@ 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 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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;
ERROR 42000: Storage engine MEMORY doesn't support BLOB/TEXT columns
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
create table not_existing_database.test (a int);
@@ -157,17 +157,17 @@ create table t2 (a int, a float) select * from t1;
ERROR 42S21: Duplicate column name 'a'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
create table t2 (a int) select a as b, a+1 as b from t1;
ERROR 42S21: Duplicate column name 'b'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
create table t2 (b int) select a as b, a+1 as b from t1;
ERROR 42S21: Duplicate column name 'b'
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 (a int not null);
INSERT INTO t1 values (1),(2),(1);
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
@@ -177,7 +177,7 @@ ERROR 42S02: Table 'test.t2' doesn't exist
DROP TABLE t1;
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
create table t1 (a int not null, b int, primary key(a), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b), key (b));
show create table t1;
Table Create Table
@@ -1610,12 +1610,12 @@ CREATE TABLE t2 (primary key (a)) select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t2 (a int, b int, primary key (a));
INSERT INTO t2 select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
diff --git a/mysql-test/r/ctype_errors.result b/mysql-test/r/ctype_errors.result
index 90d0c28eebf..5ae8c53ce8b 100644
--- a/mysql-test/r/ctype_errors.result
+++ b/mysql-test/r/ctype_errors.result
@@ -24,11 +24,11 @@ lc_messages ru_RU
SET GLOBAL lc_messages=en_US;
DROP TABLE t1;
drop table `ק`;
-ERROR 42S02: Unknown table 'ק'
+ERROR 42S02: Unknown table 'test.ק'
SET lc_messages=cs_CZ;
SET NAMES UTF8;
USE nonexistant;
-ERROR 42000: Nezn-Bámá databáze 'nonexistant'
+ERROR 42000: Neznámá databáze 'nonexistant'
#
# Bug#12736295: Buffer overflow for variable converted_err
# with non-latin1 server error message
diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result
index 5699c044d70..c86b8392b32 100644
--- a/mysql-test/r/ctype_tis620.result
+++ b/mysql-test/r/ctype_tis620.result
@@ -138,7 +138,7 @@ year
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1
(
name varchar(50) NOT NULL default '',
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index b801a7f45a4..3db6aee37cc 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -94,7 +94,7 @@ select @ujis4 = CONVERT(@utf84 USING ujis);
1
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (c1 varchar(8)) default character set 'ujis';
insert into t1 values (0xA4A2),(0xA2A2),(0xA4A2);
select c1 as 'no index' from t1 where c1 like cast(concat(0xA4A2, '%') as char character set ujis);
@@ -168,7 +168,7 @@ a b
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(c char(1)) character set ujis;
INSERT INTO t1 VALUES(0xA2AF);
INSERT INTO t1 VALUES(0xA2B0);
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index d25c454913d..714b4183594 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -1229,7 +1229,7 @@ DROP TABLE t1;
SET NAMES utf8;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
INSERT INTO t1 VALUES('uu');
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index d8642955b89..f4be208e0f7 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -1256,7 +1256,7 @@ DROP TABLE t1;
SET NAMES utf8mb4;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
@@ -2452,7 +2452,6 @@ MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
MODIFY p varchar(255) CHARACTER SET utf8;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
-Warning 1071 Specified key was too long; max key length is 1000 bytes
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2539,8 +2538,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, t2;
#
-# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH
-# LONGTEXT, UNION, USER VARIABLE
+# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH LONGTEXT, UNION, USER VARIABLE
# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
#
CREATE TABLE t1(f1 LONGTEXT CHARACTER SET utf8mb4);
diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result
index 63de75b37b7..94ea59c1a0c 100644
--- a/mysql-test/r/ctype_utf8mb4_heap.result
+++ b/mysql-test/r/ctype_utf8mb4_heap.result
@@ -1160,7 +1160,7 @@ DROP TABLE t1;
SET NAMES utf8mb4;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=heap DEFAULT CHARSET=utf8mb4;
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
INSERT INTO t1 VALUES('uu');
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index 2db7066d478..b0e5bcef176 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -1231,7 +1231,7 @@ DROP TABLE t1;
SET NAMES utf8mb4;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index b82e5687eda..6f5d79ff6df 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -1231,7 +1231,7 @@ DROP TABLE t1;
SET NAMES utf8mb4;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index 55309e54fb3..209eb896978 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -2,7 +2,7 @@ drop table if exists t1;
drop database if exists mysqltest;
drop database if exists client_test_db;
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
create table t1(n int);
insert into t1 values(1);
create temporary table t1( n int);
@@ -30,13 +30,13 @@ table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28;
-ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table'
+ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table'
drop table table1, table2, table3, table4, table5, table6,
table7, table8, table9, table10, table11, table12, table13,
table14, table15, table16, table17, table18, table19, table20,
table21, table22, table23, table24, table25, table26, table27,
table28, table29, table30;
-ERROR 42S02: Unknown table 'table1,table2,table3,table4,table5,table6,table7,table8,table9,table10,table11,table12,table13,table'
+ERROR 42S02: Unknown table 'mysqltest.table1,mysqltest.table2,mysqltest.table3,mysqltest.table4,mysqltest.table5,mysqltest.table'
use test;
drop database mysqltest;
flush tables with read lock;
@@ -154,10 +154,10 @@ End of 5.1 tests
# --
DROP TABLE IF EXISTS t1;
DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
SHOW WARNINGS;
Level Code Message
-Error 1051 Unknown table 't1'
+Error 1051 Unknown table 'test.t1'
# --
# -- End of Bug#37431.
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 172179bd7f4..c5040728af7 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -1036,9 +1036,7 @@ Warnings:
Warning 1292 Truncated incorrect time value: '2011-13-01 8:46:06.23434'
select column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time);
column_get(column_create(1, "2011-02-30 8:46:06.23434" AS CHAR), 1 as time)
-NULL
-Warnings:
-Warning 1292 Truncated incorrect time value: '2011-02-30 8:46:06.23434'
+08:46:06
select column_get(column_create(1, "2001-02-03"), 1 as time);
column_get(column_create(1, "2001-02-03"), 1 as time)
00:20:01
diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result
index d2f5a24ef1d..88a9d114bc6 100644
--- a/mysql-test/r/error_simulation.result
+++ b/mysql-test/r/error_simulation.result
@@ -1,6 +1,6 @@
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (
a varchar(32) character set utf8 collate utf8_bin NOT NULL,
b varchar(32) character set utf8 collate utf8_bin NOT NULL )
diff --git a/mysql-test/r/events_restart.result b/mysql-test/r/events_restart.result
index 6a751fa29f8..ba3aa503b63 100644
--- a/mysql-test/r/events_restart.result
+++ b/mysql-test/r/events_restart.result
@@ -65,3 +65,26 @@ select @@event_scheduler;
ON
drop table execution_log;
drop database events_test;
+#
+# Test for bug#11748899 -- EVENT SET TO DISABLED AND ON COMPLETION
+# NOT PRESERVE IS DELETED AT SERVER
+#
+SELECT @@event_scheduler;
+@@event_scheduler
+ON
+USE test;
+DROP EVENT IF EXISTS e1;
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO SELECT 1;
+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
+test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+"Now we restart the server"
+USE test;
+SELECT @@event_scheduler;
+@@event_scheduler
+ON
+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
+test e1 root@localhost SYSTEM RECURRING # 1 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
+DROP EVENT e1;
+# end test for bug#11748899
diff --git a/mysql-test/r/flush_read_lock.result b/mysql-test/r/flush_read_lock.result
index 05fab64330d..c2e8531d01f 100644
--- a/mysql-test/r/flush_read_lock.result
+++ b/mysql-test/r/flush_read_lock.result
@@ -544,11 +544,10 @@ Success: Was not able to run 'drop table t2_base' under FTWRL.
Success: 'drop table t2_base' is blocked by FTWRL active in another connection.
Success: FTWRL is blocked when 'drop table t2_base' is active in another connection.
# 13.1.b) DROP TABLES which affects only temporary tables
-# in theory can be compatible with FTWRL.
-# In practice it is not yet.
-Success: Was not able to run 'drop table t2_temp' under FTWRL.
-Success: 'drop table t2_temp' is blocked by FTWRL active in another connection.
-Success: FTWRL is blocked when 'drop table t2_temp' is active in another connection.
+# is compatible with FTWRL.
+Success: Was able to run 'drop table t2_temp' under FTWRL.
+Success: Was able to run 'drop table t2_temp' with FTWRL active in another connection.
+Success: Was able to run FTWRL while 'drop table t2_temp' was active in another connection.
#
# 13.1.c) DROP TEMPORARY TABLES should be compatible with FTWRL.
Success: Was able to run 'drop temporary table t2_temp' under FTWRL.
@@ -1461,24 +1460,10 @@ Success: Was able to run 'analyze table t3_temp_trans' under FTWRL.
Success: Was able to run 'analyze table t3_temp_trans' with FTWRL active in another connection.
Success: Was able to run FTWRL while 'analyze table t3_temp_trans' was active in another connection.
#
-# 39.2.c) Some statements do implicit commit and not
-# considered read-only. As result they are
-# not compatible with FTWRL.
-#
-flush tables with read lock;
-# Implicit commits are allowed under FTWRL.
-alter table t3_temp_trans add column c1 int;
-unlock tables;
-#
-# Switching to connection 'con1'.
-flush tables with read lock;
-# Switching to connection 'default'.
-alter table t3_temp_trans drop column c1;
-# Switching to connection 'con1'.
-# Check that ALTER TABLE is blocked.
-unlock tables;
-# Switching to connection 'default'.
-# Reap ALTER TABLE
+# And ALTER TABLE:
+Success: Was able to run 'alter table t3_temp_trans add column c1 int' under FTWRL.
+Success: Was able to run 'alter table t3_temp_trans add column c1 int' with FTWRL active in another connection.
+Success: Was able to run FTWRL while 'alter table t3_temp_trans add column c1 int' was active in another connection.
#
# 40) Test effect of implicit commit for DDL which is otherwise
# compatible with FTWRL. Implicit commit at the start of DDL
diff --git a/mysql-test/r/func_analyse.result b/mysql-test/r/func_analyse.result
index f82439090f6..2c300559a32 100644
--- a/mysql-test/r/func_analyse.result
+++ b/mysql-test/r/func_analyse.result
@@ -128,7 +128,7 @@ End of 5.0 tests
#
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
INSERT INTO t1 VALUES ('e'),('e'),('e-');
SELECT * FROM t1 PROCEDURE ANALYSE();
diff --git a/mysql-test/r/func_crypt.result b/mysql-test/r/func_crypt.result
index c2f369b3941..1eda56ac114 100644
--- a/mysql-test/r/func_crypt.result
+++ b/mysql-test/r/func_crypt.result
@@ -43,7 +43,7 @@ old_password(NULL)
NULL
select password(NULL);
password(NULL)
-NULL
+
set global old_passwords=on;
select password('');
password('')
diff --git a/mysql-test/r/func_rollback.result b/mysql-test/r/func_rollback.result
index 57968910051..91151302a06 100644
--- a/mysql-test/r/func_rollback.result
+++ b/mysql-test/r/func_rollback.result
@@ -190,8 +190,6 @@ END;
SELECT f1_insert_select(2);
f1_insert_select(2)
1
-Warnings:
-Warning 1048 Column 'f2' cannot be null
SELECT * FROM t1_not_null ORDER BY f1,f2;
f1 f2
2 0
@@ -267,8 +265,6 @@ END;
SELECT f1_insert_with_two_rows();
f1_insert_with_two_rows()
1
-Warnings:
-Warning 1048 Column 'f2' cannot be null
SELECT * FROM t1_not_null ORDER BY f1,f2;
f1 f2
10 0
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index 72c7a5a128f..ace7283e192 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -62,7 +62,9 @@ datediff("1997-11-30 23:59:59.000001","1997-12-31")
SET @@SQL_MODE="ALLOW_INVALID_DATES";
select datediff("1997-11-31 23:59:59.000001","1997-12-31");
datediff("1997-11-31 23:59:59.000001","1997-12-31")
--30
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '1997-11-31 23:59:59.000001'
SET @@SQL_MODE="";
select datediff("1997-11-31 23:59:59.000001","1997-12-31");
datediff("1997-11-31 23:59:59.000001","1997-12-31")
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index 22c30479125..c400ebb39ef 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -712,7 +712,7 @@ count(*)
DROP TABLE t2;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a));
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index f1cf94e4f19..be05f17c281 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -55,6 +55,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA'
@@ -126,6 +127,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10
@@ -173,6 +175,7 @@ max_connections 30
max_user_connections 0
plugin
authentication_string
+password_expired N
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30
@@ -1353,7 +1356,7 @@ FLUSH PRIVILEGES;
DROP TABLE mysql.user;
drop table if exists test;
Warnings:
-Note 1051 Unknown table 'test'
+Note 1051 Unknown table 'test.test'
drop function if exists test_function;
Warnings:
Note 1305 FUNCTION test.test_function does not exist
diff --git a/mysql-test/r/handlersocket.result b/mysql-test/r/handlersocket.result
index 765d954d3dc..e1fbc2d9840 100644
--- a/mysql-test/r/handlersocket.result
+++ b/mysql-test/r/handlersocket.result
@@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
-plugin_library_version 1.5
+plugin_library_version 1.7
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
diff --git a/mysql-test/r/innodb_mysql_sync.result b/mysql-test/r/innodb_mysql_sync.result
index 7c41ffec344..2164b936938 100644
--- a/mysql-test/r/innodb_mysql_sync.result
+++ b/mysql-test/r/innodb_mysql_sync.result
@@ -101,7 +101,7 @@ DROP TABLE IF EXISTS t1;
CREATE DATABASE db1;
CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
INSERT INTO db1.t1(value) VALUES (1), (2);
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE db1.t1 ADD INDEX(value);
# Connection con1
@@ -115,45 +115,47 @@ SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
DROP DATABASE db1;
-# Test 2: Primary index (implicit), should block reads.
+# Test 2: Primary index (implicit), should block writes.
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
# Sending:
-ALTER TABLE t1 ADD UNIQUE INDEX(a);
+ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED;
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
USE test;
-# Sending:
SELECT * FROM t1;
+a b
+# Sending:
+UPDATE t1 SET a=NULL;
# Connection con2
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
# Connection con1
-# Reaping: SELECT * FROM t1
-a b
-# Test 3: Primary index (explicit), should block reads.
+# Reaping: UPDATE t1 SET a=NULL
+# Test 3: Primary index (explicit), should block writes.
# Connection default
ALTER TABLE t1 DROP INDEX a;
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
# Sending:
-ALTER TABLE t1 ADD PRIMARY KEY (a);
+ALTER TABLE t1 ADD PRIMARY KEY (a), LOCK=SHARED;
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
-# Sending:
SELECT * FROM t1;
+a b
+# Sending:
+UPDATE t1 SET a=NULL;
# Connection con2
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
# Connection con1
-# Reaping: SELECT * FROM t1
-a b
+# Reaping: UPDATE t1 SET a=NULL
# Test 4: Secondary unique index, should not block reads.
# Connection default
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE t1 ADD UNIQUE (b);
# Connection con1
@@ -186,3 +188,170 @@ a b
1 12345
2 23456
DROP TABLE t1;
+#
+# Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA
+#
+DROP TABLE IF EXISTS t1;
+DROP DATABASE IF EXISTS db1;
+CREATE TABLE t1(a int) engine=InnoDB;
+CREATE DATABASE db1;
+# Connection con1
+SET DEBUG_SYNC= 'after_innobase_rename_table SIGNAL locked WAIT_FOR continue';
+# Sending:
+ALTER TABLE t1 RENAME db1.t1;
+# Connection con2
+SET DEBUG_SYNC= 'now WAIT_FOR locked';
+# DROP DATABASE db1 should now be blocked by ALTER TABLE
+# Sending:
+DROP DATABASE db1;
+# Connection default
+# Check that DROP DATABASE is blocked by IX lock on db1
+# Resume ALTER TABLE
+SET DEBUG_SYNC= 'now SIGNAL continue';
+# Connection con1
+# Reaping: ALTER TABLE t1 RENAME db1.t1;
+# Connection con2
+# Reaping: DROP DATABASE db1
+# Connection default;
+SET DEBUG_SYNC= 'RESET';
+#
+# WL#5534 Online ALTER, Phase 1
+#
+# Multi thread tests.
+# See alter_table.test for single thread tests.
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SET DEBUG_SYNC= 'RESET';
+SET SESSION lock_wait_timeout= 1;
+#
+# 1: In-place + writes blocked.
+#
+# Connection default
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4';
+# Sending:
+ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= SHARED;
+# Connection con1;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+# At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+a b
+1 1
+2 2
+INSERT INTO t1 VALUES (3,3);
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+# Now both reads and writes should be blocked
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (4,4);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR beforecommit';
+# Still both reads and writes should be blocked.
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (5,5);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+# Same here.
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (6,6);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue4';
+# Connection default
+# Reaping ALTER TABLE ...
+SET DEBUG_SYNC= 'RESET';
+DELETE FROM t1 WHERE a= 3;
+#
+# 2: Copy + writes blocked.
+#
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue3';
+# Sending:
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= COPY, LOCK= SHARED;
+# Connection con1;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+# At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+a b
+1 1
+2 2
+INSERT INTO t1 VALUES (3,3);
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+# Now writes should be blocked, reads still allowed.
+SELECT * FROM t1;
+a b
+1 1
+2 2
+3 3
+INSERT INTO t1 VALUES (4,4);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+# Now both reads and writes should be blocked.
+SELECT * FROM t1 limit 1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (5,5);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+# Connection default
+# Reaping ALTER TABLE ...
+SET DEBUG_SYNC= 'RESET';
+DELETE FROM t1 WHERE a= 3;
+#
+# 3: In-place + writes allowed.
+#
+# TODO: Enable this test once WL#5526 is pushed
+#
+# 4: In-place + reads and writes blocked.
+#
+# Connection default
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4';
+# Sending:
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
+# Connection con1;
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+# At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+a b
+1 1
+2 2
+INSERT INTO t1 VALUES (3,3);
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+# Now both reads and writes should be blocked.
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (4,4);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR beforecommit';
+# Same here.
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (5,5);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+# Same here.
+SELECT * FROM t1;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+INSERT INTO t1 VALUES (6,6);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+SET DEBUG_SYNC= 'now SIGNAL continue4';
+# Connection default
+# Reaping ALTER TABLE ...
+SET DEBUG_SYNC= 'RESET';
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index e63afeab126..cb21e5e8134 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -273,7 +273,7 @@ t
drop table t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (
c1 int,
c2 varbinary(240),
diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result
index 6500ba3ca53..4414a32d821 100644
--- a/mysql-test/r/log_slow.result
+++ b/mysql-test/r/log_slow.result
@@ -56,6 +56,7 @@ last_insert_id int(11) NO NULL
insert_id int(11) NO NULL
server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL
+thread_id bigint(21) unsigned NO NULL
flush slow logs;
set long_query_time=0.1;
set log_slow_filter='';
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index 3ccd1451bc4..1ce7eb0d2aa 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -45,7 +45,7 @@ select sleep(@long_query_time + 1);
sleep(@long_query_time + 1)
0
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
# Switch to connection default
set global slow_query_log= ON;
# Switch to connection con1
@@ -54,8 +54,8 @@ select sleep(@long_query_time + 1);
sleep(@long_query_time + 1)
0
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
-TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1)
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
+TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1) THREAD_ID
# Switch to connection default
show global variables
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index 18da8765d4b..10eb5ca5fcd 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -17,7 +17,7 @@ event_time user_host thread_id server_id command_type argument
TIMESTAMP USER_HOST THREAD_ID 1 Query select * from general_log
truncate table slow_log;
select * from slow_log;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
truncate table general_log;
select * from general_log where argument like '%general_log%';
event_time user_host thread_id server_id command_type argument
@@ -55,7 +55,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -64,7 +64,7 @@ show fields from mysql.general_log;
Field Type Null Key Default Extra
event_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP
user_host mediumtext NO NULL
-thread_id int(11) NO NULL
+thread_id bigint(21) unsigned NO NULL
server_id int(10) unsigned NO NULL
command_type varchar(64) NO NULL
argument mediumtext NO NULL
@@ -81,7 +81,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show fields from mysql.slow_log;
Field Type Null Key Default Extra
@@ -96,6 +97,7 @@ last_insert_id int(11) NO NULL
insert_id int(11) NO NULL
server_id int(10) unsigned NO NULL
sql_text mediumtext NO NULL
+thread_id bigint(21) unsigned NO NULL
flush logs;
flush tables;
SET GLOBAL GENERAL_LOG=ON;
@@ -146,8 +148,8 @@ select sleep(2);
sleep(2)
0
select * from mysql.slow_log;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
-TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 mysql 0 0 1 select sleep(2)
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
+TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 mysql 0 0 1 select sleep(2) THREAD_ID
set @@session.long_query_time = @saved_long_query_time;
alter table mysql.general_log engine=myisam;
ERROR HY000: You cannot 'ALTER' a log table if logging is enabled
@@ -166,7 +168,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -184,7 +186,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
alter table mysql.general_log engine=myisam;
alter table mysql.slow_log engine=myisam;
@@ -193,7 +196,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -211,7 +214,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Slow log'
set global general_log='ON';
set global slow_query_log='ON';
@@ -256,15 +260,15 @@ set storage_engine= @save_storage_engine;
drop table mysql.slow_log;
drop table mysql.general_log;
drop table mysql.general_log;
-ERROR 42S02: Unknown table 'general_log'
+ERROR 42S02: Unknown table 'mysql.general_log'
drop table mysql.slow_log;
-ERROR 42S02: Unknown table 'slow_log'
+ERROR 42S02: Unknown table 'mysql.slow_log'
use mysql;
CREATE TABLE `general_log` (
-`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP
+`event_time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL,
-`thread_id` int(11) 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
@@ -281,7 +285,8 @@ ON UPDATE CURRENT_TIMESTAMP,
`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
+`sql_text` mediumtext NOT NULL,
+`thread_id` BIGINT(21) UNSIGNED NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
set global general_log='ON';
set global slow_query_log='ON';
@@ -308,7 +313,7 @@ event_time user_host thread_id server_id command_type argument
TIMESTAMP USER_HOST THREAD_ID 1 Query select * from general_log
truncate table slow_log;
select * from slow_log;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
create table general_log_new like general_log;
rename table general_log TO renamed_general_log, general_log_new TO general_log;
create table slow_log_new like slow_log;
@@ -329,9 +334,9 @@ TIMESTAMP USER_HOST THREAD_ID 1 Query select * from slow_log
TIMESTAMP USER_HOST THREAD_ID 1 Query create table general_log_new like general_log
TIMESTAMP USER_HOST THREAD_ID 1 Query rename table general_log TO renamed_general_log, general_log_new TO general_log
select * from slow_log;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
select * from renamed_slow_log;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id
set global general_log='OFF';
RENAME TABLE general_log TO general_log2;
set global slow_query_log='OFF';
@@ -362,8 +367,6 @@ show tables like "%log%";
Tables_in_mysql (%log%)
general_log
general_log_new
-ndb_binlog_index
-slave_relay_log_info
slow_log
slow_log_new
drop table slow_log_new, general_log_new;
@@ -426,10 +429,10 @@ SELECT "My own slow query", sleep(2);
My own slow query sleep(2)
My own slow query 0
SELECT * FROM mysql.slow_log WHERE seq >= 2 LIMIT 3;
-start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text seq
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 3
-START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 4
+start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id seq
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2 2
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2 3
+START_TIME USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 SELECT "My own slow query", sleep(2) 2 4
SET GLOBAL slow_query_log = 0;
SET SESSION long_query_time =@saved_long_query_time;
FLUSH LOGS;
@@ -548,6 +551,7 @@ BEGIN
DECLARE start_time, query_time, lock_time CHAR(28);
DECLARE user_host MEDIUMTEXT;
DECLARE rows_set, rows_examined, last_insert_id, insert_id, server_id INT;
+DECLARE thread_id BIGINT UNSIGNED;
DECLARE dbname MEDIUMTEXT;
DECLARE sql_text BLOB;
DECLARE done INT DEFAULT 0;
@@ -561,14 +565,14 @@ DECLARE CONTINUE HANDLER FOR ER_SP_FETCH_NO_DATA SET done = 1;
FETCH cur1 INTO
start_time, user_host, query_time, lock_time,
rows_set, rows_examined, dbname, last_insert_id,
-insert_id, server_id, sql_text;
+insert_id, server_id, sql_text, thread_id;
END;
IF NOT done THEN
BEGIN
INSERT INTO
`db_17876.slow_log_data`
VALUES(start_time, user_host, query_time, lock_time, rows_set, rows_examined,
-dbname, last_insert_id, insert_id, server_id, sql_text);
+dbname, last_insert_id, insert_id, server_id, sql_text, thread_id);
END;
END IF;
END;
diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result
index 5732b94a90c..5a53ca03736 100644
--- a/mysql-test/r/log_tables_upgrade.result
+++ b/mysql-test/r/log_tables_upgrade.result
@@ -33,16 +33,12 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.renamed_general_log OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
diff --git a/mysql-test/r/lowercase_table4.result b/mysql-test/r/lowercase_table4.result
index aa81eff5194..02e2012a186 100644
--- a/mysql-test/r/lowercase_table4.result
+++ b/mysql-test/r/lowercase_table4.result
@@ -28,18 +28,7 @@ Create Table CREATE TABLE `Table2` (
KEY `fk1` (`c2`),
CONSTRAINT `fk1` FOREIGN KEY (`c2`) REFERENCES `Table1` (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
-CONSTRAINT_CATALOG def
-CONSTRAINT_SCHEMA mysql
-CONSTRAINT_NAME innodb_index_stats_ibfk_1
-UNIQUE_CONSTRAINT_CATALOG def
-UNIQUE_CONSTRAINT_SCHEMA mysql
-UNIQUE_CONSTRAINT_NAME PRIMARY
-MATCH_OPTION NONE
-UPDATE_RULE RESTRICT
-DELETE_RULE RESTRICT
-TABLE_NAME innodb_index_stats
-REFERENCED_TABLE_NAME innodb_table_stats
+SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME fk1
@@ -98,18 +87,7 @@ Create Table CREATE TABLE `Customer` (
`Id` int(11) NOT NULL,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
-CONSTRAINT_CATALOG def
-CONSTRAINT_SCHEMA mysql
-CONSTRAINT_NAME innodb_index_stats_ibfk_1
-UNIQUE_CONSTRAINT_CATALOG def
-UNIQUE_CONSTRAINT_SCHEMA mysql
-UNIQUE_CONSTRAINT_NAME PRIMARY
-MATCH_OPTION NONE
-UPDATE_RULE RESTRICT
-DELETE_RULE RESTRICT
-TABLE_NAME innodb_index_stats
-REFERENCED_TABLE_NAME innodb_table_stats
+SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME product_order_ibfk_1
diff --git a/mysql-test/r/mdl_sync.result b/mysql-test/r/mdl_sync.result
index 1c94f867a54..d71498f90dd 100644
--- a/mysql-test/r/mdl_sync.result
+++ b/mysql-test/r/mdl_sync.result
@@ -5,7 +5,7 @@ create table t2 (i int);
connection: default
lock tables t2 read;
connection: con1
-set debug_sync='mdl_upgrade_shared_lock_to_exclusive SIGNAL parked WAIT_FOR go';
+set debug_sync='mdl_upgrade_lock SIGNAL parked WAIT_FOR go';
alter table t1 rename t3;
connection: default
set debug_sync= 'now WAIT_FOR parked';
@@ -16,7 +16,7 @@ connection: con1
connection: default
unlock tables;
connection: con2
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
drop table t3;
SET DEBUG_SYNC= 'RESET';
#
@@ -48,8 +48,13 @@ select count(*) from t1;
count(*)
0
insert into t1 values (1), (1);
+# Check that SU lock is compatible with it. To do this use ALTER TABLE
+# which will fail when constructing .frm and thus obtaining SU metadata
+# lock.
+alter table t1 add index (not_exist);
+ERROR 42000: Key column 'not_exist' doesn't exist in table
# Check that SNW lock is compatible with it. To do this use ALTER TABLE
-# which will fail after opening the table and thus obtaining SNW metadata
+# which will fail during copying the table and thus obtaining SNW metadata
# lock.
alter table t1 add primary key (c1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
@@ -139,8 +144,13 @@ select count(*) from t1;
count(*)
3
insert into t1 values (1);
+# Check that SU lock is compatible with it. To do this use ALTER TABLE
+# which will fail when constructing .frm and thus obtaining SU metadata
+# lock.
+alter table t1 add index (not_exist);
+ERROR 42000: Key column 'not_exist' doesn't exist in table
# Check that SNW lock is compatible with it. To do this use ALTER TABLE
-# which will fail after opening the table and thus obtaining SNW metadata
+# which will fail during copying the table and thus obtaining SNW metadata
# lock.
alter table t1 add primary key (c1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
@@ -244,8 +254,13 @@ select count(*) from t1;
count(*)
3
insert into t1 values (1);
+# Check that SU lock is compatible with it. To do this use ALTER TABLE
+# which will fail when constructing .frm and thus obtaining SU metadata
+# lock.
+alter table t1 add index (not_exist);
+ERROR 42000: Key column 'not_exist' doesn't exist in table
# Check that SNW lock is compatible with it. To do this use ALTER TABLE
-# which will fail after opening the table and thus obtaining SNW metadata
+# which will fail during copying the table and thus obtaining SNW metadata
# lock.
alter table t1 add primary key (c1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
@@ -334,8 +349,13 @@ c1
# effects of concurrent insert.
select * from t1;
insert into t1 values (1);
+# Check that SU lock is compatible with it. To do this use ALTER TABLE
+# which will fail when constructing .frm and thus obtaining SU metadata
+# lock.
+alter table t1 add index (not_exist);
+ERROR 42000: Key column 'not_exist' doesn't exist in table
# Check that SNW lock is not compatible with SW lock.
-# Again we use ALTER TABLE which fails after opening
+# Again we use ALTER TABLE which fails during copying
# the table to avoid upgrade of SNW -> X.
# Sending:
alter table t1 add primary key (c1);;
@@ -397,15 +417,111 @@ rename table t2 to t1;
# Switching to connection 'default'.
#
#
-# 5) Acquire SNW lock on the table. We have to use DEBUG_SYNC for
-# this, to prevent SNW from being immediately upgraded to X.
+# 5) Acquire SU lock on the table. We have to use DEBUG_SYNC for
+# this, to prevent SU from being immediately upgraded to X.
#
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
+# Sending:
+alter table t1 add primary key (c1);;
+#
+# Switching to connection 'mdl_con1'.
+set debug_sync= 'now WAIT_FOR locked';
+# Check that S, SH, SR and SW locks are compatible with it.
+handler t1 open;
+handler t1 close;
+select column_name from information_schema.columns where
+table_schema='test' and table_name='t1';
+column_name
+c1
+select count(*) from t1;
+count(*)
+5
+delete from t1 limit 1;
+# Check that SU lock is incompatible with SU lock.
+# Sending:
+alter table t1 add primary key (c1);;
+#
+# Switching to connection 'mdl_con2'.
+# Check that the above ALTER is blocked because of SU lock.
+# Unblock ALTERs.
+set debug_sync= 'now SIGNAL finish';
+#
+# Switching to connection 'default'.
+# Reaping first ALTER TABLE.
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+#
+# Switching to connection 'mdl_con1'.
+# Reaping another ALTER TABLE.
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+#
+# Switching to connection 'default'.
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
# Sending:
alter table t1 add primary key (c1);;
#
# Switching to connection 'mdl_con1'.
set debug_sync= 'now WAIT_FOR locked';
+# Check that SNRW lock is incompatible with SU lock.
+# Sending:
+lock table t1 write;;
+#
+# Switching to connection 'mdl_con2'.
+# Check that the above LOCK TABLES is blocked because of SU lock.
+# Unblock ALTER and thus LOCK TABLES.
+set debug_sync= 'now SIGNAL finish';
+#
+# Switching to connection 'default'.
+# Reaping ALTER TABLE.
+ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+#
+# Switching to connection 'mdl_con1'.
+# Reaping LOCK TABLES
+insert into t1 values (1);
+unlock tables;
+#
+# Switching to connection 'default'.
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
+# Sending:
+alter table t1 add primary key (c1);;
+#
+# Switching to connection 'mdl_con1'.
+set debug_sync= 'now WAIT_FOR locked';
+# Check that X lock is incompatible with SU lock.
+# Sending:
+rename table t1 to t2;;
+#
+# Switching to connection 'mdl_con2'.
+# Check that the above RENAME is blocked because of SU lock.
+# Unblock ALTER and thus RENAME TABLE.
+set debug_sync= 'now SIGNAL finish';
+#
+# Switching to connection 'default'.
+# Now we have ALTER TABLE with SU->SNW and RENAME TABLE with pending
+# X-lock. In this case ALTER TABLE should be chosen as victim.
+# Reaping ALTER TABLE.
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
+#
+# Switching to connection 'mdl_con1'.
+# Reaping RENAME TABLE
+# Revert back to original state of things.
+rename table t2 to t1;
+#
+# There is no need to check that upgrade from SNW/SNRW to X is
+# blocked by presence of another SU lock because SNW/SNRW is
+# incompatible with SU anyway.
+#
+# Switching to connection 'default'.
+#
+#
+# 6) Acquire SNW lock on the table. We have to use DEBUG_SYNC for
+# this, to prevent SNW from being immediately upgraded to X.
+#
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
+# Sending:
+alter table t1 add primary key (c1), lock=shared, algorithm=copy;;
+#
+# Switching to connection 'mdl_con1'.
+set debug_sync= 'now WAIT_FOR locked';
# Check that S, SH and SR locks are compatible with it.
handler t1 open;
handler t1 close;
@@ -433,13 +549,13 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
# Reaping DELETE.
#
# Switching to connection 'default'.
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
# Sending:
-alter table t1 add primary key (c1);;
+alter table t1 add primary key (c1), lock=shared, algorithm=copy;;
#
# Switching to connection 'mdl_con1'.
set debug_sync= 'now WAIT_FOR locked';
-# Check that SNW lock is incompatible with SNW lock.
+# Check that SU lock is incompatible with SNW lock.
# Sending:
alter table t1 add primary key (c1);;
#
@@ -456,10 +572,14 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
# Reaping another ALTER TABLE.
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
#
+# Note that we can't easily check SNW vs SNW locks since
+# SNW is only used by ALTER TABLE after upgrading from SU
+# and SU is also incompatible with SNW.
+#
# Switching to connection 'default'.
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
# Sending:
-alter table t1 add primary key (c1);;
+alter table t1 add primary key (c1), lock=shared, algorithm=copy;;
#
# Switching to connection 'mdl_con1'.
set debug_sync= 'now WAIT_FOR locked';
@@ -482,9 +602,9 @@ insert into t1 values (1);
unlock tables;
#
# Switching to connection 'default'.
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
# Sending:
-alter table t1 add primary key (c1);;
+alter table t1 add primary key (c1), algorithm=copy, lock=shared;;
#
# Switching to connection 'mdl_con1'.
set debug_sync= 'now WAIT_FOR locked';
@@ -513,7 +633,7 @@ rename table t2 to t1;
# Switching to connection 'default'.
#
#
-# 6) Acquire SNRW lock on the table.
+# 7) Acquire SNRW lock on the table.
#
#
lock table t1 write;
@@ -560,12 +680,12 @@ unlock tables;
lock table t1 write;
#
# Switching to connection 'mdl_con1'.
-# Check that SNW lock is incompatible with SNRW lock.
+# Check that SU lock is incompatible with SNRW lock.
# Sending:
alter table t1 add primary key (c1);;
#
# Switching to connection 'default'.
-# Check that the above ALTER is blocked because of UNWR lock.
+# Check that the above ALTER is blocked because of SNRW lock.
# Unblock ALTER.
unlock tables;
#
@@ -573,6 +693,10 @@ unlock tables;
# Reaping ALTER TABLE.
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
#
+# Note that we can't easily check SNW vs SNRW locks since
+# SNW is only used by ALTER TABLE after upgrading from SU
+# and SU is also incompatible with SNRW.
+#
# Switching to connection 'default'.
lock table t1 write;
#
@@ -616,7 +740,7 @@ rename table t2 to t1;
# Switching to connection 'default'.
#
#
-# 7) Now do the same round of tests for X lock. We use additional
+# 8) Now do the same round of tests for X lock. We use additional
# table to get long-lived lock of this type.
#
create table t2 (c1 int);
@@ -744,7 +868,7 @@ rename table t1 to t2;;
#
# Switching to connection 'mdl_con1'.
# Check that RENAME has acquired X lock on t1 and is waiting for t2.
-# Check that SNW lock is incompatible with X lock.
+# Check that SU lock is incompatible with X lock.
# Sending:
alter table t1 add primary key (c1);;
#
@@ -761,7 +885,11 @@ ERROR 42S01: Table 't2' already exists
# Switching to connection 'mdl_con1'.
# Reaping ALTER.
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
-#
+#
+# Note that we can't easily check SNW vs X locks since
+# SNW is only used by ALTER TABLE after upgrading from SU
+# and SU is also incompatible with X.
+#
# Switching to connection 'mdl_con2'.
# Prepare for blocking RENAME TABLE.
lock tables t2 read;
@@ -822,6 +950,9 @@ rename table t3 to t1;
# are pending. I.e. let us test rules for priorities between
# different types of metadata locks.
#
+# Note: No tests for pending SU lock as this lock requires
+# even stronger active or pending lock.
+#
#
# Switching to connection 'mdl_con2'.
#
@@ -1138,6 +1269,9 @@ unlock tables;
# transactional context. Obviously we are mostly interested
# in conflicting types of locks.
#
+# Note: No tests for active/pending SU lock since
+# ALTER TABLE is in its own transaction.
+#
#
# 1) Let us check how various locks used within transactional
# context interact with active/pending SNW lock.
@@ -1154,9 +1288,9 @@ count(*)
# We have to use DEBUG_SYNC facility as otherwise SNW lock
# will be immediately released (or upgraded to X lock).
insert into t2 values (1), (1);
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
# Sending:
-alter table t2 add primary key (c1);;
+alter table t2 add primary key (c1), algorithm=copy, lock=shared;;
#
# Switching to connection 'default'.
set debug_sync= 'now WAIT_FOR locked';
@@ -1199,9 +1333,9 @@ count(*)
#
# Switching to connection 'mdl_con1'.
# Create an active SNW lock on t1.
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
# Sending:
-alter table t1 add primary key (c1);;
+alter table t1 add primary key (c1), algorithm=copy, lock=shared;;
#
# Switching to connection 'default'.
set debug_sync= 'now WAIT_FOR locked';
@@ -1986,7 +2120,7 @@ drop tables t1, t2;
#
create table t1 (i int);
# Ensure that ALTER waits once it has acquired SNW lock.
-set debug_sync='after_open_table_mdl_shared SIGNAL parked1 WAIT_FOR go1';
+set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL parked1 WAIT_FOR go1';
# Sending:
alter table t1 add column j int;
#
@@ -2293,13 +2427,18 @@ set global log_output=@save_log_output;
#
drop tables if exists t1, t2;
create table t1 (i int);
+insert into t1 values(1);
# Let us check that we won't deadlock if during filling
# of I_S table we encounter conflicting metadata lock
# which owner is in its turn waiting for our connection.
lock tables t1 read;
+# Switching to connection 'con46044_2'.
+# Sending:
+update t1 set i = 2;
# Switching to connection 'con46044'.
+# Waiting until UPDATE t1 SET ... is blocked.
# Sending:
-create table t2 select * from t1 for update;;
+create table t2 select * from t1;;
# Switching to connection 'default'.
# Waiting until CREATE TABLE ... SELECT ... is blocked.
# First let us check that SHOW FIELDS/DESCRIBE doesn't
@@ -2329,6 +2468,7 @@ unlock tables;
# Switching to connection 'con46044'.
# Reaping CREATE TABLE ... SELECT ... .
drop table t2;
+# Reaping UPDATE t1 statement
#
# Let us also check that queries to I_S wait for conflicting metadata
# locks to go away instead of skipping table with a warning in cases
@@ -2338,9 +2478,13 @@ drop table t2;
# We check same three queries to I_S in this new situation.
# Switching to connection 'con46044_2'.
lock tables t1 read;
+# Switching to connection 'con46044_3'.
+# Sending:
+update t1 set i = 3;
# Switching to connection 'con46044'.
+# Waiting until UPDATE t1 SET ... is blocked.
# Sending:
-create table t2 select * from t1 for update;;
+create table t2 select * from t1;;
# Switching to connection 'default'.
# Waiting until CREATE TABLE ... SELECT ... is blocked.
# Let us check that SHOW FIELDS/DESCRIBE gets blocked.
@@ -2356,11 +2500,16 @@ unlock tables;
Field Type Null Key Default Extra
i int(11) YES NULL
drop table t2;
+# Reaping UPDATE t1 statement
# Switching to connection 'con46044_2'.
lock tables t1 read;
+# Switching to connection 'con46044_3'.
+# Sending:
+update t1 set i = 4;
# Switching to connection 'con46044'.
+# Waiting until UPDATE t1 SET ... is blocked.
# Sending:
-create table t2 select * from t1 for update;;
+create table t2 select * from t1;;
# Switching to connection 'default'.
# Waiting until CREATE TABLE ... SELECT ... is blocked.
# Check that I_S query which reads only .FRMs gets blocked.
@@ -2376,11 +2525,16 @@ unlock tables;
column_name
i
drop table t2;
+# Reaping UPDATE t1 statement
# Switching to connection 'con46044_2'.
lock tables t1 read;
+# Switching to connection 'con46044_3'.
+# Sending:
+update t1 set i = 5;
# Switching to connection 'con46044'.
+# Waiting until UPDATE t1 SET ... is blocked.
# Sending:
-create table t2 select * from t1 for update;;
+create table t2 select * from t1;;
# Switching to connection 'default'.
# Waiting until CREATE TABLE ... SELECT ... is blocked.
# Finally, check that I_S query which does full-blown table open
@@ -2397,6 +2551,7 @@ unlock tables;
table_name table_type auto_increment table_comment
t2 BASE TABLE NULL
drop table t2;
+# Reaping UPDATE t1 statement
# Switching to connection 'default'.
# Clean-up.
drop table t1;
@@ -2414,7 +2569,7 @@ c1 c2 c3
3 3 0
#
# Switching to connection 'con46273'.
-set debug_sync='after_lock_tables_takes_lock SIGNAL alter_table_locked WAIT_FOR alter_go';
+set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL alter_table_locked WAIT_FOR alter_go';
alter table t1 add column e int, rename to t2;;
#
# Switching to connection 'default'.
@@ -2558,9 +2713,9 @@ drop table if exists t1;
set debug_sync= 'RESET';
create table t1 (i int) engine=InnoDB;
# Switching to connection 'con50913_1'.
-set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go';
# Sending:
-alter table t1 add column j int;
+alter table t1 add column j int, ALGORITHM=COPY;
# Switching to connection 'default'.
# Wait until ALTER TABLE gets blocked on a sync point after
# acquiring thr_lock.c lock.
@@ -2600,7 +2755,7 @@ i
# Switching to connection 'default'.
# Start ALTER TABLE which will acquire SNW lock and
# table lock and get blocked on sync point.
-set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go';
# Sending:
alter table t1 add column j int;
# Switching to connection 'con1'.
@@ -2889,7 +3044,7 @@ SET DEBUG_SYNC= 'now SIGNAL blocked';
# Reaping: DROP DATABASE db1
# Connection con2
# Reaping: DROP TABLE db1.t1
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'db1.t1'
# Connection default
SET DEBUG_SYNC= 'RESET';
#
@@ -2934,12 +3089,16 @@ CREATE TABLE m1(a INT) engine=MERGE UNION=(t1, t2);
INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (3), (4);
# Connection con1
-SET DEBUG_SYNC= 'mdl_upgrade_shared_lock_to_exclusive SIGNAL upgrade WAIT_FOR continue';
+# We need EXECUTE 2 since ALTER TABLE does SU => SNW => X and we want
+# to stop at the second upgrade.
+SET DEBUG_SYNC= 'mdl_upgrade_lock SIGNAL upgrade WAIT_FOR continue EXECUTE 2';
# Sending:
ALTER TABLE m1 engine=MERGE UNION=(t2, t1);
# Connection con2
# Waiting for ALTER TABLE to try lock upgrade
SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
+SET DEBUG_SYNC= 'now SIGNAL continue';
+SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
# Sending:
DELETE FROM t2 WHERE a = 3;
# Connection default
diff --git a/mysql-test/r/myisam-system.result b/mysql-test/r/myisam-system.result
index 9d5a59459ec..af5de8f2749 100644
--- a/mysql-test/r/myisam-system.result
+++ b/mysql-test/r/myisam-system.result
@@ -16,4 +16,4 @@ drop table t1;
Warnings:
Warning 2 Can't find file: './test/t1.MYI' (errno: 2 "No such file or directory")
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 267110be487..5b0dbbf6957 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -454,7 +454,7 @@ a b c
drop table t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a varchar(150) NOT NULL, KEY (a));
INSERT t1 VALUES ("can \tcan");
INSERT t1 VALUES ("can can");
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index a08e6f63fb4..74832162afb 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -21,15 +21,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -67,15 +63,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -113,15 +105,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -161,15 +149,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -213,15 +197,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -268,15 +248,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -326,15 +302,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result
index 60bf427cef6..d0609deb552 100644
--- a/mysql-test/r/mysql_upgrade_ssl.result
+++ b/mysql-test/r/mysql_upgrade_ssl.result
@@ -23,15 +23,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index 17dc9ad9a35..ce9bf367945 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -17,15 +17,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -54,15 +50,11 @@ status : OK
mysql.innodb_table_stats
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -85,15 +77,11 @@ mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
-mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
-mysql.slave_master_info OK
-mysql.slave_relay_log_info OK
-mysql.slave_worker_info OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
@@ -120,15 +108,11 @@ status : OK
mysql.innodb_table_stats
note : Table does not support optimize, doing recreate + analyze instead
status : OK
-mysql.ndb_binlog_index Table is already up to date
mysql.plugin Table is already up to date
mysql.proc Table is already up to date
mysql.procs_priv Table is already up to date
mysql.proxies_priv Table is already up to date
mysql.servers Table is already up to date
-mysql.slave_master_info Table is already up to date
-mysql.slave_relay_log_info Table is already up to date
-mysql.slave_worker_info Table is already up to date
mysql.table_stats Table is already up to date
mysql.tables_priv Table is already up to date
mysql.time_zone Table is already up to date
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 5f8cf38ac09..5fec9b50596 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -217,6 +217,7 @@ The following options may be given as the first argument:
Possible values are: SINGLE_PREC_HB - single precision
height-balanced, DOUBLE_PREC_HB - double precision
height-balanced.
+ --host-cache-size=# How many host names should be cached to avoid resolving.
--ignore-builtin-innodb
Disable initialization of builtin InnoDB plugin
--ignore-db-dirs=name
@@ -422,6 +423,8 @@ The following options may be given as the first argument:
--memlock Lock mysqld in memory.
--metadata-locks-cache-size=#
Size of unused metadata locks cache
+ --metadata-locks-hash-instances=#
+ Number of metadata locks hash instances
--min-examined-row-limit=#
Don't write queries to slow log that examine fewer rows
than that
@@ -535,8 +538,10 @@ The following options may be given as the first argument:
record samples
--performance-schema
Enable the performance schema.
+ (Defaults to on; use --skip-performance-schema to disable.)
--performance-schema-accounts-size=#
- Maximum number of instrumented user@host accounts.
+ Maximum number of instrumented user@host accounts. Use 0
+ to disable, -1 for automated sizing.
--performance-schema-consumer-events-stages-current
Default startup value for the events_stages_current
consumer.
@@ -577,64 +582,84 @@ The following options may be given as the first argument:
consumer.
(Defaults to on; use --skip-performance-schema-consumer-thread-instrumentation to disable.)
--performance-schema-digests-size=#
- Size of the statement digest.
+ Size of the statement digest. Use 0 to disable, -1 for
+ automated sizing.
--performance-schema-events-stages-history-long-size=#
- Number of rows in EVENTS_STAGES_HISTORY_LONG.
+ Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-events-stages-history-size=#
- Number of rows per thread in EVENTS_STAGES_HISTORY.
+ Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0
+ to disable, -1 for automated sizing.
--performance-schema-events-statements-history-long-size=#
- Number of rows in EVENTS_STATEMENTS_HISTORY_LONG.
+ Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0
+ to disable, -1 for automated sizing.
--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-waits-history-long-size=#
- Number of rows in EVENTS_WAITS_HISTORY_LONG.
+ Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-events-waits-history-size=#
- Number of rows per thread in EVENTS_WAITS_HISTORY.
+ Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0
+ to disable, -1 for automated sizing.
--performance-schema-hosts-size=#
- Maximum number of instrumented hosts.
+ Maximum number of instrumented hosts. Use 0 to disable,
+ -1 for automated sizing.
--performance-schema-instrument[=name]
Default startup value for a performance schema
instrument.
--performance-schema-max-cond-classes=#
Maximum number of condition instruments.
--performance-schema-max-cond-instances=#
- Maximum number of instrumented condition objects.
+ Maximum number of instrumented condition objects. Use 0
+ to disable, -1 for automated sizing.
--performance-schema-max-file-classes=#
Maximum number of file instruments.
--performance-schema-max-file-handles=#
Maximum number of opened instrumented files.
--performance-schema-max-file-instances=#
- Maximum number of instrumented files.
+ Maximum number of instrumented files. Use 0 to disable,
+ -1 for automated sizing.
--performance-schema-max-mutex-classes=#
Maximum number of mutex instruments.
--performance-schema-max-mutex-instances=#
- Maximum number of instrumented MUTEX objects.
+ Maximum number of instrumented MUTEX objects. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-max-rwlock-classes=#
Maximum number of rwlock instruments.
--performance-schema-max-rwlock-instances=#
- Maximum number of instrumented RWLOCK objects.
+ Maximum number of instrumented RWLOCK objects. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-max-socket-classes=#
Maximum number of socket instruments.
--performance-schema-max-socket-instances=#
- Maximum number of opened instrumented sockets.
+ Maximum number of opened instrumented sockets. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-max-stage-classes=#
Maximum number of stage instruments.
--performance-schema-max-statement-classes=#
Maximum number of statement instruments.
--performance-schema-max-table-handles=#
- Maximum number of opened instrumented tables.
+ Maximum number of opened instrumented tables. Use 0 to
+ disable, -1 for automated sizing.
--performance-schema-max-table-instances=#
- Maximum number of instrumented tables.
+ Maximum number of instrumented tables. Use 0 to disable,
+ -1 for automated sizing.
--performance-schema-max-thread-classes=#
Maximum number of thread instruments.
--performance-schema-max-thread-instances=#
- Maximum number of instrumented threads.
+ Maximum number of instrumented threads. Use 0 to disable,
+ -1 for automated sizing.
+ --performance-schema-session-connect-attrs-size=#
+ Size of session attribute string buffer per thread. Use 0
+ to disable, -1 for automated sizing.
--performance-schema-setup-actors-size=#
Maximum number of rows in SETUP_ACTORS.
--performance-schema-setup-objects-size=#
Maximum number of rows in SETUP_OBJECTS.
--performance-schema-users-size=#
- Maximum number of instrumented users.
+ Maximum number of instrumented users. Use 0 to disable,
+ -1 for automated sizing.
--pid-file=name Pid file used by safe_mysqld
--plugin-dir=name Directory for plugins
--plugin-load=name Semicolon-separated list of plugins to load, where each
@@ -1047,6 +1072,7 @@ gtid-strict-mode FALSE
help TRUE
histogram-size 0
histogram-type SINGLE_PREC_HB
+host-cache-size 128
ignore-builtin-innodb FALSE
ignore-db-dirs
init-connect
@@ -1096,7 +1122,7 @@ max-allowed-packet 1048576
max-binlog-cache-size 18446744073709547520
max-binlog-size 1073741824
max-binlog-stmt-cache-size 18446744073709547520
-max-connect-errors 10
+max-connect-errors 100
max-connections 151
max-delayed-threads 20
max-error-count 64
@@ -1114,6 +1140,7 @@ max-user-connections 0
max-write-lock-count 18446744073709551615
memlock FALSE
metadata-locks-cache-size 1024
+metadata-locks-hash-instances 8
min-examined-row-limit 0
mrr-buffer-size 262144
multi-range-count 256
@@ -1139,8 +1166,8 @@ optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
optimizer-use-condition-selectivity 1
-performance-schema FALSE
-performance-schema-accounts-size 100
+performance-schema TRUE
+performance-schema-accounts-size 10
performance-schema-consumer-events-stages-current FALSE
performance-schema-consumer-events-stages-history FALSE
performance-schema-consumer-events-stages-history-long FALSE
@@ -1153,35 +1180,36 @@ performance-schema-consumer-events-waits-history-long FALSE
performance-schema-consumer-global-instrumentation TRUE
performance-schema-consumer-statements-digest TRUE
performance-schema-consumer-thread-instrumentation TRUE
-performance-schema-digests-size 200
-performance-schema-events-stages-history-long-size 10000
-performance-schema-events-stages-history-size 10
-performance-schema-events-statements-history-long-size 10000
-performance-schema-events-statements-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-digests-size 1000
+performance-schema-events-stages-history-long-size 100
+performance-schema-events-stages-history-size 5
+performance-schema-events-statements-history-long-size 100
+performance-schema-events-statements-history-size 5
+performance-schema-events-waits-history-long-size 100
+performance-schema-events-waits-history-size 5
+performance-schema-hosts-size 20
performance-schema-instrument
performance-schema-max-cond-classes 80
-performance-schema-max-cond-instances 1000
+performance-schema-max-cond-instances 836
performance-schema-max-file-classes 50
performance-schema-max-file-handles 32768
-performance-schema-max-file-instances 10000
+performance-schema-max-file-instances 1556
performance-schema-max-mutex-classes 200
-performance-schema-max-mutex-instances 1000000
+performance-schema-max-mutex-instances 3282
performance-schema-max-rwlock-classes 30
-performance-schema-max-rwlock-instances 1000000
+performance-schema-max-rwlock-instances 1724
performance-schema-max-socket-classes 10
-performance-schema-max-socket-instances 1000
+performance-schema-max-socket-instances 179
performance-schema-max-stage-classes 150
-performance-schema-max-statement-classes 174
-performance-schema-max-table-handles 10000
-performance-schema-max-table-instances 1000
+performance-schema-max-statement-classes 175
+performance-schema-max-table-handles 445
+performance-schema-max-table-instances 445
performance-schema-max-thread-classes 50
-performance-schema-max-thread-instances 1000
+performance-schema-max-thread-instances 224
+performance-schema-session-connect-attrs-size 512
performance-schema-setup-actors-size 100
performance-schema-setup-objects-size 100
-performance-schema-users-size 100
+performance-schema-users-size 5
plugin-maturity unknown
port 3306
port-open-timeout 0
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 33e10f29201..ffaa1a06b95 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -2698,13 +2698,13 @@ DROP TABLE t1, t2;
#
DROP TABLE IF EXISTS `test1`;
Warnings:
-Note 1051 Unknown table 'test1'
+Note 1051 Unknown table 'test.test1'
CREATE TABLE `test1` (
`a1` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS `test2`;
Warnings:
-Note 1051 Unknown table 'test2'
+Note 1051 Unknown table 'test.test2'
CREATE TABLE `test2` (
`a2` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -5241,7 +5241,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -5259,7 +5259,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
SET @@global.log_output= @old_log_output_state;
SET @@global.slow_query_log= @old_slow_query_log_state;
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index c68d43831ad..5ee29f8584f 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -67,6 +67,19 @@ AND A.b = '06'
AND A.c = 343;
DROP TABLE t1;
#
+# Bug#59503: explain extended crash in get_mm_leaf
+#
+CREATE TABLE t1 (a VARCHAR(51) CHARACTER SET latin1)
+ENGINE=MyISAM
+PARTITION BY KEY (a) PARTITIONS 1;
+INSERT INTO t1 VALUES ('a'),('b'),('c');
+EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE a > 1;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+Warnings:
+Note 1003 select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 1)
+DROP TABLE t1;
+#
# Bug#57778: failed primary key add to partitioned innodb table
# inconsistent and crashes
#
@@ -303,6 +316,32 @@ INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1 WHERE pk < 0 ORDER BY pk;
pk
DROP TABLE t1;
+SET sql_mode=no_engine_substitution;
+CREATE TABLE t1 (a INT)
+ENGINE=NonExistentEngine;
+ERROR 42000: Unknown storage engine 'NonExistentEngine'
+CREATE TABLE t1 (a INT)
+ENGINE=NonExistentEngine
+PARTITION BY HASH (a);
+ERROR 42000: Unknown storage engine 'NonExistentEngine'
+CREATE TABLE t1 (a INT)
+ENGINE=Memory;
+ALTER TABLE t1 ENGINE=NonExistentEngine;
+ERROR 42000: Unknown storage engine 'NonExistentEngine'
+ALTER TABLE t1
+PARTITION BY HASH (a)
+(PARTITION p0 ENGINE=Memory,
+PARTITION p1 ENGINE=NonExistentEngine);
+ERROR 42000: Unknown storage engine 'NonExistentEngine'
+ALTER TABLE t1 ENGINE=NonExistentEngine;
+ERROR 42000: Unknown storage engine 'NonExistentEngine'
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+DROP TABLE t1;
+SET sql_mode='';
CREATE TABLE t1 (a INT)
ENGINE=NonExistentEngine;
Warnings:
@@ -339,6 +378,7 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = MEMORY,
PARTITION p1 ENGINE = MEMORY) */
DROP TABLE t1;
+SET sql_mode=DEFAULT;
CREATE TABLE t1 (a INT NOT NULL, KEY(a))
PARTITION BY RANGE(a)
(PARTITION p1 VALUES LESS THAN (200), PARTITION pmax VALUES LESS THAN MAXVALUE);
@@ -1056,13 +1096,13 @@ select * from t1 where f1 = 10;
f1 f2
10 1
drop table t1;
-set session storage_engine= 'memory';
+set session default_storage_engine= 'memory';
create table t1 (f_int1 int(11) default null) engine = memory
partition by range (f_int1) subpartition by hash (f_int1)
(partition part1 values less than (1000)
(subpartition subpart11 engine = memory));
drop table t1;
-set session storage_engine='myisam';
+set session default_storage_engine='myisam';
create table t1 (f_int1 integer, f_int2 integer, primary key (f_int1))
partition by hash(f_int1) partitions 2;
insert into t1 values (1,1),(2,2);
@@ -1885,8 +1925,7 @@ WHERE t1.id IN (
SELECT distinct id
FROM t4
WHERE taken BETWEEN @f_date AND date_add(@t_date, INTERVAL 1 DAY))
-ORDER BY t1.id
-;
+ORDER BY t1.id;
MyISAM_part
16421
19092
@@ -1907,7 +1946,7 @@ INSERT INTO t1 VALUES
('2006-09-29 21:50:01',22589,'Verified');
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t2 (
id int(8) NOT NULL,
severity tinyint(4) NOT NULL DEFAULT '0',
diff --git a/mysql-test/r/partition_binlog.result b/mysql-test/r/partition_binlog.result
index 1db427868f4..21eca8f1c00 100644
--- a/mysql-test/r/partition_binlog.result
+++ b/mysql-test/r/partition_binlog.result
@@ -9,7 +9,7 @@ PARTITION BY RANGE (id)
PARTITION pmax VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (1), (10), (100), (1000);
ALTER TABLE t1 TRUNCATE PARTITION p1;
-ERROR HY000: Incorrect partition name
+ERROR HY000: Unknown partition 'p1' in table 't1'
ALTER TABLE t1 DROP PARTITION p1;
ERROR HY000: Error in list of partitions to DROP
# No error returned, output in table format instead:
diff --git a/mysql-test/r/partition_debug_sync.result b/mysql-test/r/partition_debug_sync.result
index 0549a6a8bdd..c30651c1c0d 100644
--- a/mysql-test/r/partition_debug_sync.result
+++ b/mysql-test/r/partition_debug_sync.result
@@ -5,7 +5,9 @@ SET DEBUG_SYNC= 'RESET';
# Test when remove partitioning is done while drop table is waiting
# for the table.
# After MDL was introduced, there is no longer any race, so test is done
-# by adding a small sleep to verify that the delete waits.
+# by adding a small sleep to verify that the delete waits. This happens
+# only until ALTER tries to upgrade its MDL lock, which ends up in MDL
+# deadlock which is correctly reported.
# Con 1
SET DEBUG_SYNC= 'RESET';
CREATE TABLE t1
@@ -19,14 +21,15 @@ PARTITION p1 VALUES LESS THAN (20),
PARTITION p2 VALUES LESS THAN (100),
PARTITION p3 VALUES LESS THAN MAXVALUE ) */;
SET DEBUG_SYNC= 'alter_table_before_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter';
-SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_upgrade';
ALTER TABLE t1 REMOVE PARTITIONING;
# Con default
SET DEBUG_SYNC= 'now WAIT_FOR removing_partitioning';
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_alter';
-SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR partitioning_removed';
+SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR waiting_for_upgrade';
DROP TABLE IF EXISTS t1;
# Con 1
+ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
SET DEBUG_SYNC= 'RESET';
SET DEBUG_SYNC= 'RESET';
#
@@ -58,3 +61,27 @@ SET DEBUG_SYNC= 'RESET';
# Con default
SET DEBUG_SYNC= 'RESET';
End of 5.1 tests
+#
+# Coverage test for non pruned ha_partition::store_lock()
+#
+CREATE TABLE t1 (a int) ENGINE = InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY)
+ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 3;
+HANDLER t1 OPEN;
+# Con1
+LOCK TABLES t1 WRITE, t2 READ;
+# Default
+SET DEBUG_SYNC="wait_for_lock SIGNAL locking";
+INSERT INTO t2 VALUES (1), (2), (3);
+# Con1
+SET DEBUG_SYNC="now WAIT_FOR locking";
+ALTER TABLE t1 ADD COLUMN b int;
+# Default
+ERROR HY000: Wait on a lock was aborted due to a pending exclusive lock
+SELECT 1;
+1
+1
+# Con1
+UNLOCK TABLES;
+# Default
+DROP TABLE t1, t2;
diff --git a/mysql-test/r/partition_disabled.result b/mysql-test/r/partition_disabled.result
index 505bec79610..edf3a56d9b2 100644
--- a/mysql-test/r/partition_disabled.result
+++ b/mysql-test/r/partition_disabled.result
@@ -56,7 +56,7 @@ ERROR HY000: The MariaDB server is running with the --skip-partition option so i
ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2;
ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
CREATE TABLE t1 (
firstname VARCHAR(25) NOT NULL,
lastname VARCHAR(25) NOT NULL,
@@ -73,7 +73,7 @@ PARTITION p4 VALUES LESS THAN MAXVALUE
);
ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
CREATE TABLE t1 (id INT, purchased DATE)
PARTITION BY RANGE( YEAR(purchased) )
SUBPARTITION BY HASH( TO_DAYS(purchased) )
@@ -84,7 +84,7 @@ PARTITION p2 VALUES LESS THAN MAXVALUE
);
ERROR HY000: The MariaDB server is running with the --skip-partition option so it cannot execute this statement
drop table t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
create table t1 (a varchar(10) charset latin1 collate latin1_bin);
insert into t1 values (''),(' '),('a'),('a '),('a ');
explain partitions select * from t1 where a='a ' OR a='a';
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index a1accfa8e3d..2d35fe0bf07 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -31,6 +31,17 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 67 NULL 18 Using where; Using index
DROP TABLE t1;
#
+# Bug#13007154: Crash in keys_to_use_for_scanning with ORDER BY
+# and PARTITIONING
+#
+CREATE TABLE t1 (a INT, KEY(a))
+ENGINE = InnoDB
+PARTITION BY KEY (a) PARTITIONS 1;
+SELECT 1 FROM t1 WHERE a > (SELECT LAST_INSERT_ID() FROM t1 LIMIT 0)
+ORDER BY a;
+1
+DROP TABLE t1;
+#
# Bug#56287: crash when using Partition datetime in sub in query
#
CREATE TABLE t1
@@ -60,7 +71,7 @@ DROP TABLE t1;
# Bug#54747: Deadlock between REORGANIZE PARTITION and
# SELECT is not detected
#
-SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
+SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency;
SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
SET GLOBAL innodb_thread_concurrency = 1;
CREATE TABLE t1
diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result
index ceade2a793c..7a84745e611 100644
--- a/mysql-test/r/partition_innodb_plugin.result
+++ b/mysql-test/r/partition_innodb_plugin.result
@@ -76,18 +76,18 @@ t1.par
SET innodb_strict_mode = OFF;
ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
t1.frm
t1.par
ALTER TABLE t1 REBUILD PARTITION p0;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
UNLOCK TABLES;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result
index a13278d724e..cbf45a2b7be 100644
--- a/mysql-test/r/partition_mgm_err.result
+++ b/mysql-test/r/partition_mgm_err.result
@@ -98,7 +98,7 @@ PARTITION BY KEY (a)
(PARTITION x0, PARTITION x1);
ALTER TABLE t1 ADD PARTITION PARTITIONS 0;
ERROR HY000: At least one partition must be added
-ALTER TABLE t1 ADD PARTITION PARTITIONS 1024;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 8192;
ERROR HY000: Too many partitions (including subpartitions) were defined
ALTER TABLE t1 DROP PARTITION x0;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
diff --git a/mysql-test/r/partition_myisam.result b/mysql-test/r/partition_myisam.result
index 10586ddc548..80b3a9511ea 100644
--- a/mysql-test/r/partition_myisam.result
+++ b/mysql-test/r/partition_myisam.result
@@ -1,80 +1,62 @@
DROP TABLE IF EXISTS t1, t2;
#
-# Bug#50036: Inconsistent errors when using TIMESTAMP
-# columns/expressions
-# Added test with existing TIMESTAMP partitioning (when it was allowed).
-CREATE TABLE t1 (a TIMESTAMP)
-ENGINE = MyISAM
-PARTITION BY HASH (UNIX_TIMESTAMP(a));
-INSERT INTO t1 VALUES ('2000-01-02 03:04:05');
-SELECT * FROM t1;
-a
-2000-01-02 03:04:05
-FLUSH TABLES;
-# replacing t1.frm with TO_DAYS(a) which was allowed earlier.
-# Disable warnings, since the result would differ when running with
-# --ps-protocol (only for the 'SELECT * FROM t1' statement).
-SELECT * FROM t1;
-a
-2000-01-02 03:04:05
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
-) ENGINE=<curr_engine> DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (TO_DAYS(a)) */
-INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
-SELECT * FROM t1;
-a
-2000-01-02 03:04:05
-2001-02-03 04:05:06
-ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
-Warnings:
-Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
-ALTER TABLE t1
-PARTITION BY RANGE (TO_DAYS(a))
-(PARTITION p0 VALUES LESS THAN (10000),
-PARTITION p1 VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
+# BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE
+#
+CREATE TABLE t1 (
+i INT
+)
+ENGINE=MyISAM
+PARTITION BY RANGE (i)
+(PARTITION p3 VALUES LESS THAN (3),
+PARTITION p5 VALUES LESS THAN (5),
+PARTITION pMax VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+Table Checksum
+test.t1 2653438147
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2653438147
+# Before patch this returned 0!
+CHECKSUM TABLE t1;
+Table Checksum
+test.t1 2653438147
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (TO_DAYS(a))
-PARTITIONS 3 */
-CREATE TABLE t2 LIKE t1;
-SHOW CREATE TABLE t2;
-Table Create Table
-t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (TO_DAYS(a))
-PARTITIONS 3 */
-Warnings:
-Warning 1486 Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
-DROP TABLE t2;
-CREATE TABLE t2 SELECT * FROM t1;
-DROP TABLE t2;
-ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a));
+ `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1
+/*!50100 PARTITION BY RANGE (i)
+(PARTITION p3 VALUES LESS THAN (3) ENGINE = MyISAM,
+ PARTITION p5 VALUES LESS THAN (5) ENGINE = MyISAM,
+ PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
+DROP TABLE t1;
+# Same test without partitioning
+CREATE TABLE t1 (
+i INT
+) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a)) */
-ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+Table Checksum
+test.t1 2653438147
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2653438147
+CHECKSUM TABLE t1;
+Table Checksum
+test.t1 2653438147
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (UNIX_TIMESTAMP(a))
-PARTITIONS 3 */
-SELECT * FROM t1;
-a
-2000-01-02 03:04:05
-2001-02-03 04:05:06
+ `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 CHECKSUM=1
DROP TABLE t1;
#
# Bug#31931: Mix of handlers error message
@@ -108,7 +90,7 @@ 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 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
#
# Bug#50392: insert_id is not reset for partitioned tables
# auto_increment on duplicate entry
@@ -247,3 +229,18 @@ PARTITION p1 VALUES LESS THAN (100) MAX_ROWS=100,
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
DROP TABLE t1;
+#
+# bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED
+# TABLE CORRUPTS MYISAM
+DROP TABLE if exists `t1`;
+CREATE TABLE `t1`(`a` INT)ENGINE=myisam;
+ALTER TABLE `t1` ADD COLUMN `b` INT;
+CREATE UNIQUE INDEX `i1` ON `t1`(`b`);
+CREATE UNIQUE INDEX `i2` ON `t1`(`a`);
+ALTER TABLE `t1` ADD PRIMARY KEY (`a`);
+ALTER TABLE `t1` REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
+CHECK TABLE `t1` EXTENDED;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/r/partition_not_blackhole.result b/mysql-test/r/partition_not_blackhole.result
index dc0339f8c48..923d70c0ad6 100644
--- a/mysql-test/r/partition_not_blackhole.result
+++ b/mysql-test/r/partition_not_blackhole.result
@@ -11,6 +11,6 @@ t1
SHOW CREATE TABLE t1;
ERROR HY000: Incorrect information in file: './test/t1.frm'
DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
t1.frm
t1.par
diff --git a/mysql-test/r/partition_truncate.result b/mysql-test/r/partition_truncate.result
index 66c0cd3d9da..7a82e47d818 100644
--- a/mysql-test/r/partition_truncate.result
+++ b/mysql-test/r/partition_truncate.result
@@ -5,7 +5,7 @@ partition by list (a)
alter table t1 truncate partition p1,p1;
ERROR HY000: Incorrect partition name
alter table t1 truncate partition p0;
-ERROR HY000: Incorrect partition name
+ERROR HY000: Unknown partition 'p0' in table 't1'
drop table t1;
create table t1 (a int)
partition by list (a)
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 241e7a11ecc..ce338938d6f 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -15,7 +15,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.5
+PLUGIN_LIBRARY_VERSION 1.7
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -28,7 +28,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.5
+PLUGIN_LIBRARY_VERSION 1.7
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
@@ -60,7 +60,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
-PLUGIN_LIBRARY_VERSION 1.5
+PLUGIN_LIBRARY_VERSION 1.7
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
@@ -137,12 +137,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ULL`=10000000000000000000 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5'
#alter table
alter table t1 ULL=10000000;
+Warnings:
+Note 1105 EXAMPLE DEBUG: ULL 4294967290 -> 10000000
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `one_or_two`='ttt' `YESNO`=SSS `VAROPT`='5' `ULL`=10000000
alter table t1 change a a int complex='c,c,c';
+Warnings:
+Note 1105 EXAMPLE DEBUG: Field `a` COMPLEX '(null)' -> 'c,c,c'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -168,6 +172,8 @@ select create_options from information_schema.tables where table_schema='test' a
create_options
`ULL`=4660 `VAROPT`='5'
ALTER TABLE t1 ULL=DEFAULT;
+Warnings:
+Note 1105 EXAMPLE DEBUG: ULL 4660 -> 4294967295
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result
index 6292cd085e4..4c531a8a5f7 100644
--- a/mysql-test/r/profiling.result
+++ b/mysql-test/r/profiling.result
@@ -123,8 +123,8 @@ 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 't2'
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t3'
create table t1 (id int );
create table t2 (id int not null);
create table t3 (id int not null primary key);
@@ -309,7 +309,7 @@ select @@profiling;
set session profiling = OFF;
drop table if exists profile_log;
Warnings:
-Note 1051 Unknown table 'profile_log'
+Note 1051 Unknown table 'test.profile_log'
create table profile_log (how_many int);
drop procedure if exists p1;
drop procedure if exists p2;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 95217d9716a..f6a2a16f038 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -51,7 +51,7 @@ execute stmt4;
prepare stmt4 from 'drop table t2';
execute stmt4;
execute stmt4;
-ERROR 42S02: Unknown table 't2'
+ERROR 42S02: Unknown table 'test.t2'
prepare stmt5 from 'select ? + a from t1';
set @a=1;
execute stmt5 using @a;
@@ -526,7 +526,7 @@ FOUND_ROWS()
deallocate prepare stmt;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (c1 int(11) not null, c2 int(11) not null,
primary key (c1,c2), key c2 (c2), key c1 (c1));
insert into t1 values (200887, 860);
@@ -1201,13 +1201,13 @@ SET @aux= "SELECT COUNT(*)
prepare my_stmt from @aux;
execute my_stmt;
COUNT(*)
-42
+43
execute my_stmt;
COUNT(*)
-42
+43
execute my_stmt;
COUNT(*)
-42
+43
deallocate prepare my_stmt;
drop procedure if exists p1|
drop table if exists t1|
@@ -2799,48 +2799,48 @@ drop table if exists t2;
create procedure proc_1() show warnings;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
call proc_1();
Level Code Message
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
call proc_1();
Level Code Message
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
call proc_1();
Level Code Message
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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
prepare abc from "show warnings";
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
execute abc;
Level Code Message
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
execute abc;
Level Code Message
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
drop table if exists t1, t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
execute abc;
Level Code Message
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
deallocate prepare abc;
set @my_password="password";
set @my_data="clear text to encode";
@@ -2926,7 +2926,7 @@ i j
DROP TABLE t1, t2;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
prepare stmt
from "create table t1 (c char(100) character set utf8, key (c(10)))";
execute stmt;
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index 0a8aea94e8a..9981156bc5f 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -325,10 +325,10 @@ drop table if exists t5;
prepare stmt1 from ' drop table if exists t5 ' ;
execute stmt1 ;
Warnings:
-Note 1051 Unknown table 't5'
+Note 1051 Unknown table 'test.t5'
prepare stmt1 from ' drop table t5 ' ;
execute stmt1 ;
-ERROR 42S02: Unknown table 't5'
+ERROR 42S02: Unknown table 'test.t5'
prepare stmt1 from ' SELECT @@version ' ;
execute stmt1 ;
@@version
diff --git a/mysql-test/r/ps_ddl1.result b/mysql-test/r/ps_ddl1.result
index 87abcd90590..667cbed8a7a 100644
--- a/mysql-test/r/ps_ddl1.result
+++ b/mysql-test/r/ps_ddl1.result
@@ -420,7 +420,7 @@ call p_verify_reprepare_count(0);
SUCCESS
execute stmt;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
call p_verify_reprepare_count(0);
SUCCESS
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 62f8a9728c3..18f9db1743d 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1944,6 +1944,41 @@ COUNT(*)
DROP TABLE t1;
SET GLOBAL query_cache_size= @qc;
#
+End of 5.5 tests
+#
+# MDEV-617 LP:671189 - Query cache is not used for tables or
+# databases with dots in their names
+#
+CREATE DATABASE `foo.bar`;
+use `foo.bar`;
+flush status;
+CREATE TABLE moocow (a int);
+INSERT INTO moocow VALUES (1), (2), (3);
+SHOW STATUS LIKE 'Qcache_inserts';
+Variable_name Value
+Qcache_inserts 0
+SELECT * FROM moocow;
+a
+1
+2
+3
+SHOW STATUS LIKE 'Qcache_inserts';
+Variable_name Value
+Qcache_inserts 1
+SHOW STATUS LIKE 'Qcache_hits';
+Variable_name Value
+Qcache_hits 0
+SELECT * FROM moocow;
+a
+1
+2
+3
+SHOW STATUS LIKE 'Qcache_hits';
+Variable_name Value
+Qcache_hits 1
+use test;
+drop database `foo.bar`;
+End of 10.0 tests
restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size= default;
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result
index 3811c6c5487..c9c569137b2 100644
--- a/mysql-test/r/read_only.result
+++ b/mysql-test/r/read_only.result
@@ -117,10 +117,10 @@ select @@global.read_only;
1
unlock tables;
drop temporary table ttt;
-ERROR 42S02: Unknown table 'ttt'
+ERROR 42S02: Unknown table 'test.ttt'
drop temporary table if exists ttt;
Warnings:
-Note 1051 Unknown table 'ttt'
+Note 1051 Unknown table 'test.ttt'
connection default;
set global read_only=0;
drop table t1,t2;
diff --git a/mysql-test/r/rename.result b/mysql-test/r/rename.result
index 7433ab8a0c9..74370ba74dd 100644
--- a/mysql-test/r/rename.result
+++ b/mysql-test/r/rename.result
@@ -39,7 +39,7 @@ select * from t3;
3 table 3
drop table if exists t1,t2,t3,t4;
Warnings:
-Note 1051 Unknown table 't4'
+Note 1051 Unknown table 'test.t4'
CREATE TABLE t1 (a int);
CREATE TABLE t3 (a int);
FLUSH TABLES WITH READ LOCK;
diff --git a/mysql-test/r/row-checksum-old.result b/mysql-test/r/row-checksum-old.result
index 87f0bb8af2d..ef523463860 100644
--- a/mysql-test/r/row-checksum-old.result
+++ b/mysql-test/r/row-checksum-old.result
@@ -73,7 +73,7 @@ test.t1 4108368782
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
Warnings:
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
diff --git a/mysql-test/r/row-checksum.result b/mysql-test/r/row-checksum.result
index 9e58d6fa96e..fb8a1260a1d 100644
--- a/mysql-test/r/row-checksum.result
+++ b/mysql-test/r/row-checksum.result
@@ -73,7 +73,7 @@ test.t1 3885665021
drop table if exists t1;
create table t1 (a int null, v varchar(100)) engine=innodb checksum=0 row_format=fixed;
Warnings:
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index c086a62275a..d639580acf9 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4175,18 +4175,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
0
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index 00b356fc1c0..18b050b53e7 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -4186,18 +4186,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
0
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index c086a62275a..d639580acf9 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -4175,18 +4175,24 @@ str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-01 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
0
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01'
and '2007/10/20'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result
index 062b866475d..a5eb24442b4 100644
--- a/mysql-test/r/signal.result
+++ b/mysql-test/r/signal.result
@@ -1191,8 +1191,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1208,8 +1206,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1225,8 +1221,6 @@ end $$
call test_signal() $$
Caught by SQLWARNING
Caught by SQLWARNING
-Warnings:
-Warning 1012 Raising a warning
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1242,8 +1236,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1259,8 +1251,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1276,8 +1266,6 @@ end $$
call test_signal() $$
Caught by NOT FOUND
Caught by NOT FOUND
-Warnings:
-Error 1012 Raising a not found
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1293,8 +1281,6 @@ end $$
call test_signal() $$
Caught by SQLSTATE
Caught by SQLSTATE
-Warnings:
-Error 1012 Raising an error
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1310,8 +1296,6 @@ end $$
call test_signal() $$
Caught by number
Caught by number
-Warnings:
-Error 1012 Raising an error
drop procedure test_signal $$
create procedure test_signal()
begin
@@ -1327,25 +1311,29 @@ end $$
call test_signal() $$
Caught by SQLEXCEPTION
Caught by SQLEXCEPTION
-Warnings:
-Error 1012 Raising an error
drop procedure test_signal $$
#
# Test where SIGNAL can be used
#
+
+# RETURN statement clears Diagnostics Area, thus
+# the warnings raised in a stored function are not
+# visible outsidef the stored function. So, we're using
+# @@warning_count variable to check that SIGNAL succeeded.
+
create function test_signal_func() returns integer
begin
+DECLARE v INT;
DECLARE warn CONDITION FOR SQLSTATE "01XXX";
SIGNAL warn SET
MESSAGE_TEXT = "This function SIGNAL a warning",
MYSQL_ERRNO = 1012;
-return 5;
+SELECT @@warning_count INTO v;
+return v;
end $$
select test_signal_func() $$
test_signal_func()
-5
-Warnings:
-Warning 1012 This function SIGNAL a warning
+1
drop function test_signal_func $$
create function test_signal_func() returns integer
begin
@@ -1468,7 +1456,6 @@ after RESIGNAL
after RESIGNAL
Warnings:
Warning 1012 Raising a warning
-Warning 1012 Raising a warning
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1523,7 +1510,6 @@ after RESIGNAL
after RESIGNAL
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-Warning 1264 Out of range value for column 'a' at row 1
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1557,7 +1543,7 @@ end $$
call test_resignal() $$
before RESIGNAL
before RESIGNAL
-ERROR 42S02: Unknown table 'no_such_table'
+ERROR 42S02: Unknown table 'test.no_such_table'
drop procedure test_resignal $$
create procedure test_resignal()
begin
@@ -1580,7 +1566,6 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Warning 1012 Raising a warning
Warning 5555 RESIGNAL of a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -1641,7 +1626,6 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Warning 1264 Out of range value for column 'a' at row 1
Warning 5555 RESIGNAL of a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2054,7 +2038,7 @@ before RESIGNAL
after RESIGNAL
after RESIGNAL
Warnings:
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Warning 5555 RESIGNAL to a warning
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2075,7 +2059,7 @@ before RESIGNAL
ERROR 02444: RESIGNAL to a not found
show warnings $$
Level Code Message
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Error 5555 RESIGNAL to a not found
drop procedure test_resignal $$
create procedure test_resignal()
@@ -2096,7 +2080,7 @@ before RESIGNAL
ERROR 44444: RESIGNAL to an error
show warnings $$
Level Code Message
-Error 1051 Unknown table 'no_such_table'
+Error 1051 Unknown table 'test.no_such_table'
Error 5555 RESIGNAL to an error
drop procedure test_resignal $$
#
@@ -2143,9 +2127,6 @@ CALL peter_p2() $$
ERROR 42000: Hi, I am a useless error message
show warnings $$
Level Code Message
-Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
-Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
-Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL'
Error 9999 Hi, I am a useless error message
drop procedure peter_p1 $$
drop procedure peter_p2 $$
diff --git a/mysql-test/r/signal_demo2.result b/mysql-test/r/signal_demo2.result
index 223030b0624..5c8ac328a4a 100644
--- a/mysql-test/r/signal_demo2.result
+++ b/mysql-test/r/signal_demo2.result
@@ -74,7 +74,7 @@ In proc_bottom()
In proc_bottom()
Doing something that fail (simulate an error) ...
Doing something that fail (simulate an error) ...
-ERROR 42S02: Unknown table 'no_such_table'
+ERROR 42S02: Unknown table 'demo.no_such_table'
call proc_top_a(3);
Starting ...
Starting ...
@@ -167,7 +167,7 @@ Doing something that fail (simulate an error) ...
Doing something that fail (simulate an error) ...
Doing cleanup !
Doing cleanup !
-ERROR 42S02: Unknown table 'no_such_table'
+ERROR 42S02: Unknown table 'demo.no_such_table'
call proc_top_b(3);
Starting ...
Starting ...
diff --git a/mysql-test/r/signal_demo3.result b/mysql-test/r/signal_demo3.result
index a89ce703d20..cc7042269bb 100644
--- a/mysql-test/r/signal_demo3.result
+++ b/mysql-test/r/signal_demo3.result
@@ -77,7 +77,7 @@ call proc_1();
ERROR 45000: Oops in proc_1
show warnings;
Level Code Message
-Error 1051 Unknown table 'oops_it_is_not_here'
+Error 1051 Unknown table 'demo.oops_it_is_not_here'
Error 1644 Oops in proc_9
Error 1644 Oops in proc_8
Error 1644 Oops in proc_7
@@ -95,11 +95,11 @@ call proc_1();
ERROR 45000: Oops in proc_1
show warnings;
Level Code Message
-Error 1051 Unknown table 'oops_it_is_not_here'
-Error 1644 Oops in proc_9
-Error 1644 Oops in proc_8
-Error 1644 Oops in proc_7
-Error 1644 Oops in proc_6
+Error 1644 Oops in proc_5
+Error 1644 Oops in proc_4
+Error 1644 Oops in proc_3
+Error 1644 Oops in proc_2
+Error 1644 Oops in proc_1
SET @@session.max_error_count = 7;
SELECT @@session.max_error_count;
@@session.max_error_count
@@ -108,13 +108,13 @@ call proc_1();
ERROR 45000: Oops in proc_1
show warnings;
Level Code Message
-Error 1051 Unknown table 'oops_it_is_not_here'
-Error 1644 Oops in proc_9
-Error 1644 Oops in proc_8
Error 1644 Oops in proc_7
Error 1644 Oops in proc_6
Error 1644 Oops in proc_5
Error 1644 Oops in proc_4
+Error 1644 Oops in proc_3
+Error 1644 Oops in proc_2
+Error 1644 Oops in proc_1
SET @@session.max_error_count = 9;
SELECT @@session.max_error_count;
@@session.max_error_count
@@ -123,7 +123,6 @@ call proc_1();
ERROR 45000: Oops in proc_1
show warnings;
Level Code Message
-Error 1051 Unknown table 'oops_it_is_not_here'
Error 1644 Oops in proc_9
Error 1644 Oops in proc_8
Error 1644 Oops in proc_7
@@ -132,6 +131,7 @@ Error 1644 Oops in proc_5
Error 1644 Oops in proc_4
Error 1644 Oops in proc_3
Error 1644 Oops in proc_2
+Error 1644 Oops in proc_1
drop database demo;
SET @@global.max_error_count = @start_global_value;
SELECT @@global.max_error_count;
diff --git a/mysql-test/r/sp-big.result b/mysql-test/r/sp-big.result
index d28b7004330..9765508859c 100644
--- a/mysql-test/r/sp-big.result
+++ b/mysql-test/r/sp-big.result
@@ -46,8 +46,6 @@ end while;
close cur1;
end|
call p1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select count(*) from t1;
count(*)
256
diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result
index 9d9deaebcc3..e34f8f9e63a 100644
--- a/mysql-test/r/sp-bugs.result
+++ b/mysql-test/r/sp-bugs.result
@@ -43,8 +43,6 @@ END|
SELECT f2 ();
f2 ()
NULL
-Warnings:
-Error 1305 FUNCTION testdb.f_not_exists does not exist
DROP SCHEMA testdb;
USE test;
#
@@ -134,6 +132,15 @@ DROP DATABASE testdb;
USE test;
End of 5.1 tests
#
+# BUG#13489996 valgrind:conditional jump or move depends on
+# uninitialised values-field_blob
+#
+CREATE FUNCTION sf() RETURNS BLOB RETURN "";
+SELECT sf();
+sf()
+
+DROP FUNCTION sf;
+#
# Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
#
SET @@SQL_MODE = '';
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result
index 3bead4fc826..c9d2f7b023a 100644
--- a/mysql-test/r/sp-code.result
+++ b/mysql-test/r/sp-code.result
@@ -711,8 +711,6 @@ looping i
looping 1
looping i
looping 0
-Warnings:
-Error 1062 Duplicate entry '1' for key 'a'
call proc_26977_works(2);
do something
do something
@@ -732,8 +730,6 @@ looping i
looping 0
optimizer: keep hreturn
optimizer: keep hreturn
-Warnings:
-Error 1062 Duplicate entry '2' for key 'a'
drop table t1;
drop procedure proc_26977_broken;
drop procedure proc_26977_works;
diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result
index 6d85c3ce496..172e40cb40c 100644
--- a/mysql-test/r/sp-destruct.result
+++ b/mysql-test/r/sp-destruct.result
@@ -149,7 +149,7 @@ alter table mysql.proc drop column type;
# The below statement should not cause assertion failure.
drop database mysqltest;
Warnings:
-Error 1728 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
+Error 1805 Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
# Restore mysql.proc.
drop table mysql.proc;
#
@@ -166,7 +166,7 @@ CREATE PROCEDURE db1.p1() SET @foo = 10;
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
DROP DATABASE db1;
Warnings:
-Error 1729 Cannot load from mysql.proc. The table is probably corrupted
+Error 1728 Cannot load from mysql.proc. The table is probably corrupted
# Restore mysql.proc
DROP TABLE mysql.proc;
RENAME TABLE proc_backup TO mysql.proc;
diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result
index cdfeb8ab020..7309ba4c765 100644
--- a/mysql-test/r/sp-dynamic.result
+++ b/mysql-test/r/sp-dynamic.result
@@ -249,7 +249,7 @@ drop procedure p1|
drop table if exists t1|
drop table if exists t2|
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
create table t1 (id integer primary key auto_increment,
stmt_text char(35), status varchar(20))|
insert into t1 (stmt_text) values
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 24cbb945fd2..71fab8c9654 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -466,7 +466,7 @@ drop table t5;
end|
create table t5 (x int)|
call bug3294()|
-ERROR 42S02: Unknown table 't5'
+ERROR 42S02: Unknown table 'test.t5'
drop procedure bug3294|
drop procedure if exists bug8776_1|
drop procedure if exists bug8776_2|
@@ -1344,8 +1344,6 @@ set @in_func := 0;
select func_20713_a();
func_20713_a()
NULL
-Warnings:
-Error 1146 Table 'test.bogus_table_20713' doesn't exist
select @in_func;
@in_func
2
@@ -1353,8 +1351,6 @@ set @in_func := 0;
select func_20713_b();
func_20713_b()
NULL
-Warnings:
-Error 1146 Table 'test.bogus_table_20713' doesn't exist
select @in_func;
@in_func
2
@@ -1567,7 +1563,7 @@ f2()
1
drop function f2;
drop table t2;
-ERROR 42S02: Unknown table 't2'
+ERROR 42S02: Unknown table 'test.t2'
End of 5.1 tests
drop procedure if exists proc_33983_a;
drop procedure if exists proc_33983_b;
@@ -1821,11 +1817,8 @@ CAST('10 ' as unsigned integer)
c
3
@@warning_count
-1
+0
Level Code Message
-Warning 1292 Truncated incorrect INTEGER value: '10 '
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '10 '
CALL p6();
CAST('10 ' as unsigned integer)
10
@@ -1833,8 +1826,6 @@ Level Code Message
Warning 1292 Truncated incorrect INTEGER value: '10 '
c
1
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '10 '
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP PROCEDURE p3;
@@ -1885,9 +1876,6 @@ END|
CALL p1();
exception
exception
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '10 '
-Error 1048 Column 'b' cannot be null
DROP TABLE t1;
DROP PROCEDURE p1;
#
@@ -1931,11 +1919,8 @@ CALL p1();
NULL
warning caught (expected)
warning caught (expected)
-Warnings:
-Warning 1365 Division by 0
SHOW WARNINGS;
Level Code Message
-Warning 1365 Division by 0
CALL p2();
5 / 0
NULL
@@ -2008,3 +1993,878 @@ Error 1048 Column 'c' cannot be null
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
+
+###################################################################
+# Tests for the following bugs:
+# - Bug#11763171: 55852 - Possibly inappropriate handler activation.
+# - Bug#11749343: 38806 - Wrong scope for SQL HANDLERS in SP.
+###################################################################
+
+
+# -- Check that SQL-conditions thrown by Statement-blocks are
+# -- handled by Handler-decl blocks properly.
+
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H2' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+END|
+
+CALL p1()|
+HandlerId
+H2
+
+# -- Check that SQL-conditions thrown by Statement-blocks are
+# -- handled by Handler-decl blocks properly in case of nested
+# -- SQL-blocks.
+
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H2' AS HandlerId;
+BEGIN
+SELECT 'B1' AS BlockId;
+BEGIN
+SELECT 'B2' AS BlockId;
+BEGIN
+SELECT 'B3' AS BlockId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+END;
+END;
+END;
+END|
+
+CALL p2()|
+BlockId
+B1
+BlockId
+B2
+BlockId
+B3
+HandlerId
+H2
+
+# -- Check SQL-handler resolution rules.
+
+CREATE PROCEDURE p3()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H3' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H3.
+END|
+
+CALL p3()|
+HandlerId
+H3
+
+CREATE PROCEDURE p4()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H3' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+END|
+
+CALL p4()|
+HandlerId
+H2
+
+CREATE PROCEDURE p5()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H2' AS HandlerId;
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H3' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H3.
+END;
+END|
+
+CALL p5()|
+HandlerId
+H3
+
+# -- Check that handlers don't handle its own exceptions.
+
+CREATE PROCEDURE p6()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+SELECT 'H1' AS HandlerId;
+SIGNAL SQLSTATE 'HY000'; # Should *not* be handled by H1.
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # Should be handled by H1.
+END|
+
+CALL p6()|
+SignalId
+S1
+HandlerId
+H1
+ERROR HY000: Unhandled user-defined exception condition
+
+# -- Check that handlers don't handle its own warnings.
+
+CREATE PROCEDURE p7()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+SELECT 'H1' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H1.
+END|
+
+CALL p7()|
+SignalId
+S1
+HandlerId
+H1
+Warnings:
+Warning 1642 Unhandled user-defined warning condition
+
+# -- Check that conditions for handlers are not handled by the handlers
+# -- from the same block.
+
+CREATE PROCEDURE p8()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+SELECT 'H2' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+END|
+
+CALL p8()|
+SignalId
+S1
+HandlerId
+H2
+Warnings:
+Warning 1642 Unhandled user-defined warning condition
+
+# -- Check that conditions for handlers are not handled by the handlers
+# -- from the same block even if they are thrown deep down the stack.
+
+CREATE PROCEDURE p9()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H1:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H1:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H2:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H2:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H3:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H3:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H4:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H4:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H5:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H5:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H6:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H6:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+SELECT 'H2' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+END;
+SELECT 'S6' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S5' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S4' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S3' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S2' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+END|
+
+CALL p9()|
+SignalId
+S1
+SignalId
+S2
+SignalId
+S3
+SignalId
+S4
+SignalId
+S5
+SignalId
+S6
+HandlerId
+H2
+Warnings:
+Warning 1642 Unhandled user-defined warning condition
+
+# -- Check that handlers are choosen properly in case of deep stack and
+# -- nested SQL-blocks.
+
+CREATE PROCEDURE p10()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H2' AS HandlerId;
+BEGIN
+BEGIN
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H1:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H1:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H2:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H2:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H3:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H3:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H4:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H4:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H5:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H5:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H6:1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'Wrong:H6:2' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+BEGIN
+SELECT 'H2' AS HandlerId;
+SIGNAL SQLSTATE '01000'; # Should be handled by H1.
+END;
+SELECT 'S6' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S5' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S4' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S3' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S2' AS SignalId;
+SIGNAL SQLSTATE 'HY000';
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+END;
+END;
+END;
+END|
+
+CALL p10()|
+SignalId
+S1
+SignalId
+S2
+SignalId
+S3
+SignalId
+S4
+SignalId
+S5
+SignalId
+S6
+HandlerId
+H2
+HandlerId
+H1
+
+# -- Test stored procedure from Peter's mail.
+
+CREATE PROCEDURE p11()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H1' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H2' AS HandlerId;
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01000', 1249
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+SELECT 'H3' AS HandlerId;
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+SELECT 'H4' AS HandlerId;
+BEGIN
+SELECT 'H5' AS HandlerId;
+SELECT 'S3' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # H3
+SELECT 'S4' AS SignalId;
+SIGNAL SQLSTATE '22003'; # H3
+SELECT 'S5' AS SignalId;
+SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H4
+END;
+END;
+SELECT 'S6' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # H1
+SELECT 'S7' AS SignalId;
+SIGNAL SQLSTATE '22003'; # H1
+SELECT 'S8' AS SignalId;
+SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H5
+END;
+SELECT 'S1' AS SignalId;
+SIGNAL SQLSTATE 'HY000'; # H1
+SELECT 'S2' AS SignalId;
+SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H2
+END|
+
+CALL p11()|
+SignalId
+S6
+HandlerId
+H1
+SignalId
+S7
+HandlerId
+H1
+SignalId
+S8
+HandlerId
+H5
+SignalId
+S3
+HandlerId
+H3
+SignalId
+S4
+HandlerId
+H3
+SignalId
+S5
+HandlerId
+H4
+SignalId
+S1
+HandlerId
+H1
+SignalId
+S2
+HandlerId
+H2
+
+# -- Check that runtime stack-trace can be deeper than parsing-time one.
+
+CREATE PROCEDURE p12()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+SELECT 'H1:5' AS HandlerId;
+SIGNAL SQLSTATE '01002';
+END;
+SELECT 'H1:4' AS HandlerId;
+SIGNAL SQLSTATE '01001';
+END;
+SELECT 'H1:3' AS HandlerId;
+SIGNAL SQLSTATE '01001';
+END;
+SELECT 'H1:2' AS HandlerId;
+SIGNAL SQLSTATE '01001';
+END;
+SELECT 'H1:1' AS HandlerId;
+SIGNAL SQLSTATE '01001';
+END;
+#########################################################
+DECLARE CONTINUE HANDLER FOR SQLSTATE '01002'
+ SELECT 'OK' AS Msg;
+#########################################################
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+SELECT 'H2:5' AS HandlerId;
+SIGNAL SQLSTATE '01001';
+END;
+SELECT 'H2:4' AS HandlerId;
+SIGNAL SQLSTATE '01000';
+END;
+SELECT 'H2:3' AS HandlerId;
+SIGNAL SQLSTATE '01000';
+END;
+SELECT 'H2:2' AS HandlerId;
+SIGNAL SQLSTATE '01000';
+END;
+SELECT 'H2:1' AS HandlerId;
+SIGNAL SQLSTATE '01000';
+END;
+#######################################################
+SELECT 'Throw 01000' AS Msg;
+SIGNAL SQLSTATE '01000';
+END;
+END|
+
+CALL p12()|
+Msg
+Throw 01000
+HandlerId
+H2:1
+HandlerId
+H2:2
+HandlerId
+H2:3
+HandlerId
+H2:4
+HandlerId
+H2:5
+HandlerId
+H1:1
+HandlerId
+H1:2
+HandlerId
+H1:3
+HandlerId
+H1:4
+HandlerId
+H1:5
+Warnings:
+Warning 1642 Unhandled user-defined warning condition
+
+# -- Check that handler-call-frames are removed properly for EXIT
+# -- handlers.
+
+CREATE PROCEDURE p13()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING
+BEGIN
+DECLARE EXIT HANDLER FOR SQLWARNING
+BEGIN
+SELECT 'EXIT handler 3' AS Msg;
+END;
+SELECT 'CONTINUE handler 2: 1' AS Msg;
+SIGNAL SQLSTATE '01000';
+SELECT 'CONTINUE handler 2: 2' AS Msg;
+END;
+SELECT 'CONTINUE handler 1: 1' AS Msg;
+SIGNAL SQLSTATE '01000';
+SELECT 'CONTINUE handler 1: 2' AS Msg;
+END;
+SELECT 'Throw 01000' AS Msg;
+SIGNAL SQLSTATE '01000';
+END|
+
+CALL p13()|
+Msg
+Throw 01000
+Msg
+CONTINUE handler 1: 1
+Msg
+CONTINUE handler 2: 1
+Msg
+EXIT handler 3
+Msg
+CONTINUE handler 1: 2
+
+# That's it. Cleanup.
+
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP PROCEDURE p6;
+DROP PROCEDURE p7;
+DROP PROCEDURE p8;
+DROP PROCEDURE p9;
+DROP PROCEDURE p10;
+DROP PROCEDURE p11;
+DROP PROCEDURE p12;
+DROP PROCEDURE p13;
+
+# Bug#12731619: NESTED SP HANDLERS CAN TRIGGER ASSERTION
+
+DROP FUNCTION IF EXISTS f1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(msg VARCHAR(255));
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 1
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 2
+BEGIN
+INSERT INTO t1 VALUE('WRONG: Inside H2');
+RETURN 2;
+END;
+INSERT INTO t1 VALUE('CORRECT: Inside H1');
+RETURN 1;
+END;
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING # handler 3
+BEGIN
+INSERT INTO t1 VALUE('WRONG: Inside H3');
+RETURN 3;
+END;
+INSERT INTO t1 VALUE('CORRECT: Calling f1()');
+RETURN f1(); # -- exception here
+END;
+INSERT INTO t1 VALUE('WRONG: Returning 10');
+RETURN 10;
+END|
+
+SELECT f1();
+f1()
+1
+
+SELECT * FROM t1;
+msg
+CORRECT: Calling f1()
+CORRECT: Inside H1
+
+DROP FUNCTION f1;
+DROP TABLE t1;
+
+# Check that handled SQL-conditions are properly cleared from DA.
+
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+DROP PROCEDURE IF EXISTS p3;
+DROP PROCEDURE IF EXISTS p4;
+DROP PROCEDURE IF EXISTS p5;
+CREATE TABLE t1(a CHAR, b CHAR, c CHAR);
+CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT);
+
+# Check that SQL-conditions for which SQL-handler has been invoked,
+# are cleared from the Diagnostics Area. Note, there might be several
+# SQL-conditions, but SQL-handler must be invoked only once.
+
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE EXIT HANDLER FOR SQLWARNING
+SELECT 'Warning caught' AS msg;
+# The INSERT below raises 3 SQL-conditions (warnings). The EXIT HANDLER
+# above must be invoked once (for one condition), but all three conditions
+# must be cleared from the Diagnostics Area.
+INSERT INTO t1 VALUES('qqqq', 'ww', 'eee');
+# The following INSERT will not be executed, because of the EXIT HANDLER.
+INSERT INTO t1 VALUES('zzz', 'xx', 'yyyy');
+END|
+
+CALL p1()|
+msg
+Warning caught
+
+SELECT * FROM t1|
+a b c
+q w e
+
+# Check that SQL-conditions for which SQL-handler has *not* been
+# invoked, are *still* cleared from the Diagnostics Area.
+
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE CONTINUE HANDLER FOR 1292
+SELECT 'Warning 1292 caught' AS msg;
+# The following INSERT raises 6 SQL-warnings with code 1292,
+# and 3 SQL-warnings with code 1264. The CONTINUE HANDLER above must be
+# invoked once, and all nine SQL-warnings must be cleared from
+# the Diagnostics Area.
+INSERT INTO t2
+SELECT
+CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+CALL p2()|
+msg
+Warning 1292 caught
+
+# Check that if there are two equally ranked SQL-handlers to handle
+# SQL-conditions from SQL-statement, only one of them will be invoked.
+
+CREATE PROCEDURE p3()
+BEGIN
+DECLARE CONTINUE HANDLER FOR 1292
+SELECT 'Warning 1292 caught' AS msg;
+DECLARE CONTINUE HANDLER FOR 1264
+SELECT 'Warning 1264 caught' AS msg;
+# The following INSERT raises 6 SQL-warnings with code 1292,
+# and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above
+# must be called, and only once. The SQL Standard does not define, which one
+# should be invoked.
+INSERT INTO t2
+SELECT
+CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+CALL p3()|
+msg
+Warning 1264 caught
+
+# The same as p3, but 1264 comes first.
+
+CREATE PROCEDURE p4()
+BEGIN
+DECLARE CONTINUE HANDLER FOR 1292
+SELECT 'Warning 1292 caught' AS msg;
+DECLARE CONTINUE HANDLER FOR 1264
+SELECT 'Warning 1264 caught' AS msg;
+# The following INSERT raises 4 SQL-warnings with code 1292,
+# and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above
+# must be called, and only once. The SQL Standard does not define, which one
+# should be invoked.
+INSERT INTO t2
+SELECT
+CAST(999999 AS SIGNED INTEGER),
+CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+CALL p4()|
+msg
+Warning 1264 caught
+
+# Check that if a SQL-handler raised its own SQL-conditions, there are
+# preserved after handler exit.
+
+CREATE PROCEDURE p5()
+BEGIN
+DECLARE EXIT HANDLER FOR 1292
+BEGIN
+SELECT 'Handler for 1292 (1)' AS Msg;
+SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1234;
+SHOW WARNINGS;
+SELECT 'Handler for 1292 (2)' AS Msg;
+END;
+INSERT INTO t2
+SELECT
+CAST(999999 AS SIGNED INTEGER),
+CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+CALL p5()|
+Msg
+Handler for 1292 (1)
+Level Code Message
+Warning 1234 Unhandled user-defined warning condition
+Msg
+Handler for 1292 (2)
+Warnings:
+Warning 1234 Unhandled user-defined warning condition
+
+# Check that SQL-conditions are available inside the handler, but
+# cleared after the handler exits.
+
+CREATE PROCEDURE p6()
+BEGIN
+DECLARE CONTINUE HANDLER FOR 1292
+BEGIN
+SHOW WARNINGS;
+SELECT 'Handler for 1292' Msg;
+END;
+INSERT INTO t2
+SELECT
+CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+CALL p6()|
+Level Code Message
+Warning 1292 Truncated incorrect INTEGER value: '1 '
+Warning 1292 Truncated incorrect INTEGER value: '1999999 '
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1292 Truncated incorrect INTEGER value: '2 '
+Warning 1292 Truncated incorrect INTEGER value: '2999999 '
+Warning 1264 Out of range value for column 'b' at row 1
+Warning 1292 Truncated incorrect INTEGER value: '3 '
+Warning 1292 Truncated incorrect INTEGER value: '3999999 '
+Warning 1264 Out of range value for column 'c' at row 1
+Msg
+Handler for 1292
+
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP PROCEDURE p6;
+DROP TABLE t1;
+DROP TABLE t2;
+
+# Bug#13059316: ASSERTION FAILURE IN SP_RCONTEXT.CC
+# Check DECLARE statements that raise conditions before handlers
+# are declared.
+
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE var1 INTEGER DEFAULT 'string';
+DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H1';
+END|
+
+CALL p1()|
+Warnings:
+Warning 1366 Incorrect integer value: 'string' for column 'var1' at row 1
+
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H2';
+CALL p1();
+END|
+
+CALL p2()|
+H2
+H2
+
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+#
+# Bug#13113222 RQG_SIGNAL_RESIGNAL FAILED WITH ASSERTION.
+#
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SELECT 'triggered p1';
+# This will trigger an error.
+SIGNAL SQLSTATE 'HY000';
+END|
+CREATE PROCEDURE p2()
+BEGIN
+DECLARE CONTINUE HANDLER FOR SQLWARNING SELECT 'triggered p2';
+# This will trigger a warning.
+SIGNAL SQLSTATE '01000';
+END|
+SET @old_max_error_count= @@session.max_error_count;
+SET SESSION max_error_count= 0;
+CALL p1();
+triggered p1
+triggered p1
+CALL p2();
+SET SESSION max_error_count= @old_max_error_count;
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+
+# Bug#12652873: 61392: Continue handler for NOT FOUND being triggered
+# from internal stored function.
+
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP TABLE IF EXISTS t1;
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1, 2);
+
+# f1() raises NOT_FOUND condition.
+# Raising NOT_FOUND can not be simulated by SIGNAL,
+# because SIGNAL would raise SQL-error in that case.
+
+CREATE FUNCTION f1() RETURNS INTEGER
+BEGIN
+DECLARE v VARCHAR(5) DEFAULT -1;
+SELECT b FROM t1 WHERE a = 2 INTO v;
+RETURN v;
+END|
+
+# Here we check that the NOT_FOUND condition raised in f1()
+# is not visible in the outer function (f2), i.e. the continue
+# handler in f2() will not be called.
+
+CREATE FUNCTION f2() RETURNS INTEGER
+BEGIN
+DECLARE v INTEGER;
+DECLARE CONTINUE HANDLER FOR NOT FOUND
+SET @msg = 'Handler activated.';
+SELECT f1() INTO v;
+RETURN v;
+END|
+SET @msg = '';
+
+SELECT f2();
+f2()
+-1
+
+SELECT @msg;
+@msg
+
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP TABLE t1;
diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result
index 186b2c05d34..9e82a966268 100644
--- a/mysql-test/r/sp-prelocking.result
+++ b/mysql-test/r/sp-prelocking.result
@@ -22,7 +22,7 @@ call sp1();
my-col
1
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'mysqltest.t1'
select database();
database()
mysqltest
@@ -34,7 +34,7 @@ call mysqltest.sp1();
my-col
1
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'mysqltest.t1'
select database();
database()
test
diff --git a/mysql-test/r/sp-vars.result b/mysql-test/r/sp-vars.result
index a465a29ee4f..0a7ea0d68c5 100644
--- a/mysql-test/r/sp-vars.result
+++ b/mysql-test/r/sp-vars.result
@@ -400,7 +400,7 @@ Warnings:
Note 1305 PROCEDURE test.p2 does not exist
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(log_msg VARCHAR(1024));
CREATE PROCEDURE p1(arg VARCHAR(255))
BEGIN
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 6e6f05667ed..75a6c6278be 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -737,8 +737,6 @@ close c;
end|
insert into t2 values ("foo", 42, -1.9), ("bar", 3, 12.1), ("zap", 666, -3.14)|
call cur1()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t1|
id data
foo 40
@@ -774,8 +772,6 @@ close c1;
close c2;
end|
call cur2()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t3 order by i,s|
s i
bar 3
@@ -865,8 +861,6 @@ end$
set @@sql_mode = ''|
set sql_select_limit = 1|
call modes(@c1, @c2)|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
set sql_select_limit = default|
select @c1, @c2|
@c1 @c2
@@ -1688,64 +1682,42 @@ end|
call h_ee()|
h_ee
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
call h_es()|
h_es
-Outer (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Inner (bad)
call h_en()|
h_en
-Outer (good)
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
+Inner (bad)
call h_ew()|
h_ew
-Outer (good)
+Inner (bad)
call h_ex()|
h_ex
-Outer (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Inner (bad)
call h_se()|
h_se
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
call h_ss()|
h_ss
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
call h_sn()|
h_sn
-Outer (good)
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
+Inner (bad)
call h_sw()|
h_sw
-Outer (good)
+Inner (bad)
call h_sx()|
h_sx
-Outer (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
+Inner (bad)
call h_ne()|
h_ne
Inner (good)
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
call h_ns()|
h_ns
Inner (good)
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
call h_nn()|
h_nn
Inner (good)
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
call h_we()|
h_we
Inner (good)
@@ -1758,18 +1730,12 @@ Inner (good)
call h_xe()|
h_xe
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
call h_xs()|
h_xs
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
call h_xx()|
h_xx
Inner (good)
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
drop table t3|
drop procedure h_ee|
drop procedure h_es|
@@ -1918,8 +1884,6 @@ set @x2 = 2;
close c1;
end|
call bug2260()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select @x2|
@x2
2
@@ -2063,8 +2027,6 @@ insert into t3 values (123456789012);
insert into t3 values (0);
end|
call bug2780()|
-Warnings:
-Warning 1264 Out of range value for column 's1' at row 1
select @x|
@x
1
@@ -2487,8 +2449,6 @@ declare continue handler for sqlstate 'HY000' begin end;
select s1 from t3 union select s2 from t3;
end|
call bug4904()|
-Warnings:
-Error 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin2_general_ci,IMPLICIT) for operation 'UNION'
drop procedure bug4904|
drop table t3|
drop procedure if exists bug336|
@@ -2628,17 +2588,13 @@ select row_count()|
row_count()
1
call bug4905()|
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
select row_count()|
row_count()
--1
+0
call bug4905()|
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
select row_count()|
row_count()
--1
+0
select * from t3|
s1
1
@@ -2659,14 +2615,10 @@ insert into t3 values (1)|
call bug6029()|
sqlstate 23000
sqlstate 23000
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
delete from t3|
call bug6029()|
1136
1136
-Warnings:
-Error 1136 Column count doesn't match value count at row 1
drop procedure bug6029|
drop table t3|
drop procedure if exists bug8540|
@@ -2961,23 +2913,15 @@ end|
call bug6900()|
2
2
-Warnings:
-Error 1136 Column count doesn't match value count at row 1
call bug9074()|
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
call bug6900_9074(0)|
sqlexception
sqlexception
-Warnings:
-Error 1136 Column count doesn't match value count at row 1
call bug6900_9074(1)|
-23000
-23000
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
+sqlexception
+sqlexception
drop procedure bug6900|
drop procedure bug9074|
drop procedure bug6900_9074|
@@ -3020,13 +2964,9 @@ delete from t1|
call bug9856()|
16
16
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
call bug9856()|
16
16
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
drop procedure bug9856|
drop procedure if exists bug9674_1|
drop procedure if exists bug9674_2|
@@ -3256,8 +3196,6 @@ x
2
x
3
-Warnings:
-Error 1326 Cursor is not open
call bug10961()|
x
1
@@ -3265,8 +3203,6 @@ x
2
x
3
-Warnings:
-Error 1326 Cursor is not open
drop procedure bug10961|
DROP PROCEDURE IF EXISTS bug6866|
DROP VIEW IF EXISTS tv|
@@ -3274,9 +3210,9 @@ Warnings:
Note 1051 Unknown table 'test.tv'
DROP TABLE IF EXISTS tt1,tt2,tt3|
Warnings:
-Note 1051 Unknown table 'tt1'
-Note 1051 Unknown table 'tt2'
-Note 1051 Unknown table 'tt3'
+Note 1051 Unknown table 'test.tt1'
+Note 1051 Unknown table 'test.tt2'
+Note 1051 Unknown table '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))|
@@ -3382,11 +3318,7 @@ insert into t1 values
('Name4', 13),
('Name5', 14)|
call bug11529()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
call bug11529()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
delete from t1|
drop procedure bug11529|
set character set utf8|
@@ -3560,32 +3492,24 @@ end;
end if;
end|
call bug12168('a')|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t4|
a
1
3
truncate t4|
call bug12168('b')|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t4|
a
2
4
truncate t4|
call bug12168('a')|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t4|
a
1
3
truncate t4|
call bug12168('b')|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select * from t4|
a
2
@@ -3885,8 +3809,6 @@ end|
call bug7049_2()|
Result
Caught it
-Warnings:
-Error 1062 Duplicate entry '42' for key 'x'
select * from t3|
x
42
@@ -3894,16 +3816,12 @@ delete from t3|
call bug7049_4()|
Result
Caught it
-Warnings:
-Error 1062 Duplicate entry '42' for key 'x'
select * from t3|
x
42
select bug7049_2()|
bug7049_2()
1
-Warnings:
-Error 1062 Duplicate entry '42' for key 'x'
drop table t3|
drop procedure bug7049_1|
drop procedure bug7049_2|
@@ -4031,8 +3949,6 @@ end|
call bug14845()|
a
0
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
drop procedure bug14845|
drop procedure if exists bug13549_1|
drop procedure if exists bug13549_2|
@@ -4236,8 +4152,6 @@ end|
call bug13729()|
55
55
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
select * from t3|
s1
1
@@ -4274,15 +4188,11 @@ Handler
boo
v isnull(v)
NULL 1
-Warnings:
-Error 1054 Unknown column 'undefined_var' in 'field list'
call bug14643_2()|
Handler
boo
Handler
boo
-Warnings:
-Error 1054 Unknown column 'undefined_var' in 'field list'
drop procedure bug14643_1|
drop procedure bug14643_2|
drop procedure if exists bug14304|
@@ -4606,15 +4516,11 @@ Handler
error
End
done
-Warnings:
-Error 1054 Unknown column 'v' in 'field list'
call bug14498_2()|
Handler
error
End
done
-Warnings:
-Error 1054 Unknown column 'v' in 'field list'
call bug14498_3()|
v
maybe
@@ -4622,22 +4528,16 @@ Handler
error
End
done
-Warnings:
-Error 1054 Unknown column 'v' in 'field list'
call bug14498_4()|
Handler
error
End
done
-Warnings:
-Error 1054 Unknown column 'v' in 'field list'
call bug14498_5()|
Handler
error
End
done
-Warnings:
-Error 1054 Unknown column 'v' in 'field list'
drop procedure bug14498_1|
drop procedure bug14498_2|
drop procedure bug14498_3|
@@ -4702,8 +4602,6 @@ Before NOT FOUND condition is triggered
After NOT FOUND condtition is triggered
xid xdone
1 1
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
call bug15231_3()|
Result
Missed it (correct)
@@ -4711,8 +4609,6 @@ Level Code Message
Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1
Result
Caught it (correct)
-Warnings:
-Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1
call bug15231_5()|
Result
Missed it (correct)
@@ -4741,8 +4637,6 @@ end|
call bug15011()|
Handler
Inner
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
drop procedure bug15011|
drop table t3|
drop procedure if exists bug17476|
@@ -4818,8 +4712,6 @@ i
1
i
0
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
drop table t3|
drop procedure bug16887|
drop procedure if exists bug16474_1|
@@ -4892,8 +4784,6 @@ declare continue handler for sqlexception begin end;
select no_such_function();
end|
call bug18787()|
-Warnings:
-Error 1305 FUNCTION test.no_such_function does not exist
drop procedure bug18787|
create database bug18344_012345678901|
use bug18344_012345678901|
@@ -5267,8 +5157,6 @@ statement failed
statement failed
statement after update
statement after update
-Warnings:
-Error 1242 Subquery returns more than 1 row
select * from t3|
a
1
@@ -5280,8 +5168,6 @@ statement failed
statement failed
statement after update
statement after update
-Warnings:
-Error 1242 Subquery returns more than 1 row
select * from t3|
a
1
@@ -5314,8 +5200,6 @@ in continue handler
in continue handler
reachable code a2
reachable code a2
-Warnings:
-Error 1242 Subquery returns more than 1 row
select * from t3|
a
1
@@ -5331,8 +5215,6 @@ in continue handler
in continue handler
reachable code a2
reachable code a2
-Warnings:
-Error 1242 Subquery returns more than 1 row
select * from t3|
a
1
@@ -5366,8 +5248,6 @@ in continue handler
in continue handler
reachable code a2
reachable code a2
-Warnings:
-Error 1305 FUNCTION test.no_such_function does not exist
drop procedure bug8153_proc_a|
drop procedure bug8153_proc_b|
drop table t3|
@@ -5547,13 +5427,9 @@ end|
select func_20028_a()|
func_20028_a()
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_b()|
func_20028_b()
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_c()|
ERROR 22012: Division by 0
call proc_20028_a()|
@@ -5606,13 +5482,9 @@ end|
select func_20028_a()|
func_20028_a()
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_b()|
func_20028_b()
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select func_20028_c()|
func_20028_c()
NULL
@@ -5936,13 +5808,9 @@ end|
select func_8407_a()|
func_8407_a()
NULL
-Warnings:
-Error 1146 Table 'test.no_such_view' doesn't exist
select func_8407_b()|
func_8407_b()
1500
-Warnings:
-Error 1146 Table 'test.no_such_view' doesn't exist
drop function func_8407_a|
drop function func_8407_b|
drop table if exists table_26503|
@@ -6064,8 +5932,6 @@ looping i
looping 0
leaving handler
leaving handler
-Warnings:
-Error 1062 Duplicate entry '1' for key 'a'
call proc_26503_ok_2(2)|
do something
do something
@@ -6077,8 +5943,6 @@ looping i
looping 4
leaving handler
leaving handler
-Warnings:
-Error 1062 Duplicate entry '2' for key 'a'
call proc_26503_ok_3(3)|
do something
do something
@@ -6098,8 +5962,6 @@ looping i
looping 0
leaving handler
leaving handler
-Warnings:
-Error 1062 Duplicate entry '3' for key 'a'
call proc_26503_ok_4(4)|
do something
do something
@@ -6111,8 +5973,6 @@ looping i
looping 4
leaving handler
leaving handler
-Warnings:
-Error 1062 Duplicate entry '4' for key 'a'
drop table table_26503|
drop procedure proc_26503_ok_1|
drop procedure proc_26503_ok_2|
@@ -6244,8 +6104,6 @@ END|
SELECT bug5274_f2()|
bug5274_f2()
x
-Warnings:
-Warning 1265 Data truncated for column 'bug5274_f1' at row 1
DROP FUNCTION bug5274_f1|
DROP FUNCTION bug5274_f2|
drop procedure if exists proc_21513|
@@ -6338,19 +6196,13 @@ c1
SELECT f1(2);
f1(2)
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
PREPARE s1 FROM 'SELECT f1(2)';
EXECUTE s1;
f1(2)
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
EXECUTE s1;
f1(2)
0
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP FUNCTION f1;
@@ -6826,8 +6678,6 @@ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run';
SELECT x FROM t1;
END|
CALL bug29770();
-Warnings:
-Error 1054 Unknown column 'x' in 'field list'
SELECT @state, @exception;
@state @exception
run NULL
@@ -6866,8 +6716,6 @@ end;
end while;
end//
call proc_33618(20);
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
drop table t_33618;
drop procedure proc_33618;
#
@@ -7803,9 +7651,6 @@ END $
SELECT f1();
f1()
1
-Warnings:
-Error 1424 Recursive stored functions and triggers are not allowed.
-Error 1305 FUNCTION test.f1 does not exist
DROP FUNCTION f1;
# ------------------------------------------------------------------
# -- End of 5.1 tests
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result
index b91dc898f12..5526fc19aae 100644
--- a/mysql-test/r/sp_trans.result
+++ b/mysql-test/r/sp_trans.result
@@ -99,8 +99,6 @@ return i;
end|
set @error_in_func:= 0|
insert into t1 values (bug10015_6(5)), (bug10015_6(6))|
-Warnings:
-Error 1062 Duplicate entry '1' for key 'PRIMARY'
select @error_in_func|
@error_in_func
1
@@ -526,8 +524,6 @@ until done end repeat;
close c;
end|
call bug14210()|
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
select count(*) from t4|
count(*)
256
diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result
index ad12c60cce5..e7d25f3476c 100644
--- a/mysql-test/r/statistics.result
+++ b/mysql-test/r/statistics.result
@@ -1113,9 +1113,19 @@ test t2 idx4 4 1.0000
ALTER TABLE t2 CHANGE COLUMN b b varchar(32);
SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
db_name table_name index_name prefix_arity avg_frequency
+test t2 PRIMARY 1 1.0000
+test t2 PRIMARY 2 1.0000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
+test t2 idx2 3 1.0000
+test t2 idx2 4 1.0000
test t2 idx3 1 8.5000
+test t2 idx3 2 1.0000
+test t2 idx3 3 1.0000
+test t2 idx4 1 6.2000
+test t2 idx4 2 1.7222
+test t2 idx4 3 1.1154
+test t2 idx4 4 1.0000
ANALYZE TABLE t2 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
Table Op Msg_type Msg_text
test.t2 analyze status OK
@@ -1172,13 +1182,13 @@ test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t2 idx3 1 8.5000
-test t2 idx3 2 1.0000
-test t2 idx2 3 1.0000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
-test t2 idx4 3 1.0000
+test t2 idx2 3 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
+test t2 idx4 3 1.0000
+test t2 idx3 2 1.0000
test t2 PRIMARY 1 1.0000
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
@@ -1198,17 +1208,17 @@ test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 b NULL NULL 0.2000 17.1250 NULL NULL NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
-test t2 idx3 1 8.5000
-test t2 idx3 2 1.0000
-test t2 idx2 3 1.0000
-test t2 idx2 1 7.0000
-test t2 idx2 2 2.3846
test t1 idx2 1 7.0000
+test t2 idx3 1 8.5000
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
-test t2 idx4 3 1.0000
+test t2 idx2 1 7.0000
+test t2 idx2 2 2.3846
+test t2 idx2 3 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
+test t2 idx4 3 1.0000
+test t2 idx3 2 1.0000
test t2 PRIMARY 1 1.0000
test t1 idx2 2 2.3846
test t1 idx1 1 NULL
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index cee4cf3ebe6..1321545798f 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1190,8 +1190,6 @@ select'a'; insert into t1 values (200); end;|
call t1();
a
a
-Warnings:
-Error 1264 Out of range value for column 'col1' at row 1
select * from t1;
col1
drop procedure t1;
@@ -1501,3 +1499,30 @@ count(*)
0
drop table t1;
End of 5.0 tests
+#
+# Start of 5.6 tests
+#
+#
+# WL#946 TIME/TIMESTAMP/DATETIME with fractional seconds: CAST to DATETIME
+#
+#
+# STR_TO_DATE with NO_ZERO_DATE did not return NULL (with warning)
+# in get_date(). Only did in val_str() and val_int().
+SET sql_mode='NO_ZERO_DATE';
+SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0','%Y')+1, STR_TO_DATE('0000','%Y')+1;
+STR_TO_DATE('2001','%Y') CONCAT(STR_TO_DATE('2001','%Y')) STR_TO_DATE('2001','%Y')+1 STR_TO_DATE('0','%Y')+1 STR_TO_DATE('0000','%Y')+1
+2001-00-00 2001-00-00 20010001 20000001 NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '0000' for function str_to_date
+SET sql_mode='NO_ZERO_IN_DATE';
+SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0000','%Y')+1;
+STR_TO_DATE('2001','%Y') CONCAT(STR_TO_DATE('2001','%Y')) STR_TO_DATE('2001','%Y')+1 STR_TO_DATE('0000','%Y')+1
+NULL NULL NULL NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '2001' for function str_to_date
+Warning 1411 Incorrect datetime value: '0000' for function str_to_date
+#
+# End of 5.6 tests
+#
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index eac53365329..824079c3a59 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -5898,7 +5898,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ;
INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0);
DROP TABLE IF EXISTS t3;
Warnings:
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t3'
CREATE TABLE t3 ( f3 int) ;
INSERT INTO t3 VALUES (0),(0);
SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ;
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index 4fd303dfd44..38e955e349c 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -184,7 +184,7 @@ DROP TABLE t1,t2,t3;
#
DROP TABLE IF EXISTS `t1`;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE `t1` (
`node_uid` bigint(20) unsigned DEFAULT NULL,
`date` datetime DEFAULT NULL,
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index ff768886434..df7733a1cd3 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2174,7 +2174,7 @@ FROM t1 AS alias1
) IS NOT NULL;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t2;
-ERROR 42S02: Unknown table 't2'
+ERROR 42S02: Unknown table 'test.t2'
DROP TABLE t1;
#
# LP BUG#1000649 EXPLAIN shows incorrectly a non-correlated constant IN subquery is correlated
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result
index a5800883711..e9e1ccd0bf6 100644
--- a/mysql-test/r/subselect_innodb.result
+++ b/mysql-test/r/subselect_innodb.result
@@ -437,8 +437,8 @@ drop table t1;
#
drop table if exists `t1`,`t2`;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index bf98b912a9e..627e5b03e32 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -5899,7 +5899,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ;
INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0);
DROP TABLE IF EXISTS t3;
Warnings:
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t3'
CREATE TABLE t3 ( f3 int) ;
INSERT INTO t3 VALUES (0),(0);
SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ;
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 05f7a25e0ef..5368198f77a 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -5895,7 +5895,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ;
INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0);
DROP TABLE IF EXISTS t3;
Warnings:
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t3'
CREATE TABLE t3 ( f3 int) ;
INSERT INTO t3 VALUES (0),(0);
SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index ee84bfd1eca..ad0d2ffe6a6 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -5904,7 +5904,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ;
INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0);
DROP TABLE IF EXISTS t3;
Warnings:
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t3'
CREATE TABLE t3 ( f3 int) ;
INSERT INTO t3 VALUES (0),(0);
SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ;
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index 5a7e303f4b9..39cc060e955 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -5895,7 +5895,7 @@ CREATE TABLE t2 ( f3 int, f10 int, KEY (f10,f3)) ;
INSERT IGNORE INTO t2 VALUES (NULL,NULL),(5,0);
DROP TABLE IF EXISTS t3;
Warnings:
-Note 1051 Unknown table 't3'
+Note 1051 Unknown table 'test.t3'
CREATE TABLE t3 ( f3 int) ;
INSERT INTO t3 VALUES (0),(0);
SELECT a1.f3 AS r FROM t2 AS a1 , t1 WHERE a1.f3 < ALL ( SELECT f3 FROM t3 WHERE f3 = 1 ) ;
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 08c17b1afd5..eda11d95b22 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -15,15 +15,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -131,6 +127,7 @@ user CREATE TABLE `user` (
`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',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
@@ -253,7 +250,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -271,7 +268,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stats;
Table Create Table
diff --git a/mysql-test/r/system_mysql_db_fix40123.result b/mysql-test/r/system_mysql_db_fix40123.result
index 2f76ee654c8..71e94a7432d 100644
--- a/mysql-test/r/system_mysql_db_fix40123.result
+++ b/mysql-test/r/system_mysql_db_fix40123.result
@@ -15,15 +15,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -131,6 +127,7 @@ user CREATE TABLE `user` (
`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',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
@@ -253,7 +250,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -271,7 +268,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stats;
Table Create Table
diff --git a/mysql-test/r/system_mysql_db_fix50030.result b/mysql-test/r/system_mysql_db_fix50030.result
index 2f76ee654c8..71e94a7432d 100644
--- a/mysql-test/r/system_mysql_db_fix50030.result
+++ b/mysql-test/r/system_mysql_db_fix50030.result
@@ -15,15 +15,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -131,6 +127,7 @@ user CREATE TABLE `user` (
`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',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
@@ -253,7 +250,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -271,7 +268,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stats;
Table Create Table
diff --git a/mysql-test/r/system_mysql_db_fix50117.result b/mysql-test/r/system_mysql_db_fix50117.result
index 2f76ee654c8..71e94a7432d 100644
--- a/mysql-test/r/system_mysql_db_fix50117.result
+++ b/mysql-test/r/system_mysql_db_fix50117.result
@@ -15,15 +15,11 @@ host
index_stats
innodb_index_stats
innodb_table_stats
-ndb_binlog_index
plugin
proc
procs_priv
proxies_priv
servers
-slave_master_info
-slave_relay_log_info
-slave_worker_info
slow_log
table_stats
tables_priv
@@ -131,6 +127,7 @@ user CREATE TABLE `user` (
`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',
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
@@ -253,7 +250,7 @@ Table Create Table
general_log CREATE TABLE `general_log` (
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -271,7 +268,8 @@ slow_log CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` bigint(21) unsigned NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stats;
Table Create Table
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 33f5c6b5165..a5182a03e63 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -1,5 +1,25 @@
drop table if exists t1,t2;
drop view if exists v1;
+#
+# test basic creation of temporary tables together with normal table
+#
+create table t1 (a int);
+create temporary table t1 AS SELECT 1;
+create temporary table t1 AS SELECT 1;
+ERROR 42S01: Table 't1' already exists
+create temporary table t1 (a int);
+ERROR 42S01: Table 't1' already exists
+drop temporary table t1;
+drop table t1;
+create temporary table t1 AS SELECT 1;
+create temporary table t1 AS SELECT 1;
+ERROR 42S01: Table 't1' already exists
+create temporary table t1 (a int);
+ERROR 42S01: Table 't1' already exists
+drop temporary table t1;
+#
+# Test with rename
+#
CREATE TABLE t1 (c int not null, d char (10) not null);
insert into t1 values(1,""),(2,"a"),(3,"b");
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
@@ -145,7 +165,7 @@ DROP TABLE t1;
CREATE TABLE t1 (i INT);
CREATE TEMPORARY TABLE t2 (i INT);
DROP TEMPORARY TABLE t2, t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
SELECT * FROM t2;
ERROR 42S02: Table 'test.t2' doesn't exist
SELECT * FROM t1;
diff --git a/mysql-test/r/truncate_coverage.result b/mysql-test/r/truncate_coverage.result
index 728702f7ab5..395c71b2e6b 100644
--- a/mysql-test/r/truncate_coverage.result
+++ b/mysql-test/r/truncate_coverage.result
@@ -11,7 +11,7 @@ HANDLER t1 OPEN;
#
# connection default
LOCK TABLE t1 WRITE;
-SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting';
+SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting';
TRUNCATE TABLE t1;
#
# connection con2
@@ -37,7 +37,7 @@ HANDLER t1 OPEN;
#
# connection default
LOCK TABLE t1 WRITE;
-SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting';
+SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting';
TRUNCATE TABLE t1;
#
# connection con2
@@ -50,7 +50,7 @@ HANDLER t1 CLOSE;
ERROR 42S02: Table 'test.t1' doesn't exist
UNLOCK TABLES;
DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
SET DEBUG_SYNC='RESET';
CREATE TABLE t1 (c1 INT);
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index 6b6b5a2392c..5b3594fe503 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -680,7 +680,7 @@ select 0.8 = 0.7 + 0.1;
1
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (col1 decimal(38));
insert into t1 values (12345678901234567890123456789012345678);
select * from t1;
diff --git a/mysql-test/r/upgrade.result b/mysql-test/r/upgrade.result
index d565bb2dbd6..d9252791c0a 100644
--- a/mysql-test/r/upgrade.result
+++ b/mysql-test/r/upgrade.result
@@ -50,6 +50,10 @@ show tables;
Tables_in_test
txu#p#p1
txu@0023p@0023p1
+insert into `txu@0023p@0023p1` values (2);
+select * from `txu@0023p@0023p1`;
+s1
+2
select * from `txu#p#p1`;
s1
1
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 40d6c71b5af..98b4b77e425 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -205,7 +205,7 @@ ERROR 42S02: Unknown table 'v100'
drop view t1;
ERROR HY000: 'test.t1' is not VIEW
drop table v1;
-ERROR 42S02: Unknown table 'v1'
+ERROR 42S02: Unknown table 'test.v1'
drop view v1,v2;
drop table t1;
create table t1 (a int);
@@ -3951,8 +3951,6 @@ create view a as select 1;
end|
call p();
call p();
-Warnings:
-Error 1050 Table 'a' already exists
drop view a;
drop procedure p;
#
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index bfd09bfa9cd..2078bc6d63f 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -357,13 +357,9 @@ use mysqltest;
select * from v1;
f2()
NULL
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select * from v2;
f2()
NULL
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select * from v3;
ERROR HY000: View 'mysqltest.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
select * from v4;
@@ -403,13 +399,9 @@ ERROR HY000: View 'mysqltest.v2' references invalid table(s) or column(s) or fun
select * from v3;
f2()
NULL
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select * from v4;
f2()
NULL
-Warnings:
-Warning 1329 No data - zero rows fetched, selected, or processed
select * from v5;
ERROR HY000: View 'mysqltest.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
drop view v1, v2, v3, v4, v5;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index e033b358b6b..b4b345ca260 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -48,13 +48,13 @@ drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
Warnings:
-Note 1051 Unknown table 'not_exists'
+Note 1051 Unknown table 'test.not_exists'
drop table if exists not_exists_table;
Warnings:
-Note 1051 Unknown table 'not_exists_table'
+Note 1051 Unknown table 'test.not_exists_table'
show warnings limit 1;
Level Code Message
-Note 1051 Unknown table 'not_exists_table'
+Note 1051 Unknown table 'test.not_exists_table'
drop database if exists not_exists_db;
Warnings:
Note 1008 Can't drop database 'not_exists_db'; database doesn't exist
@@ -311,10 +311,10 @@ insert into t2 values(@q);
ERROR 22001: Data too long for column 'c_tinyblob' at row 1
drop table t1, t2;
DROP TABLE t1;
-ERROR 42S02: Unknown table 't1'
+ERROR 42S02: Unknown table 'test.t1'
SHOW ERRORS;
Level Code Message
-Error 1051 Unknown table 't1'
+Error 1051 Unknown table 'test.t1'
End of 5.0 tests
set sql_mode = default;
select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result
index a491b5bb9ee..67bbd3eb5e6 100644
--- a/mysql-test/suite/archive/archive.result
+++ b/mysql-test/suite/archive/archive.result
@@ -12731,15 +12731,6 @@ id id name name
DROP TABLE t1,t2;
flush tables;
SHOW CREATE TABLE t1;
-ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
-SELECT * FROM t1;
-ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
-INSERT INTO t1 (col1, col2) VALUES (1, "value");
-ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
-REPAIR TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 repair status OK
-SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`col1` int(11) DEFAULT NULL,
@@ -12747,6 +12738,10 @@ t1 CREATE TABLE `t1` (
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
SELECT * FROM t1;
col1 col2
+INSERT INTO t1 (col1, col2) VALUES (1, "value");
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair error Corrupt
DROP TABLE t1;
#
# Ensure that TRUNCATE fails for non-empty archive tables.
@@ -12811,6 +12806,14 @@ Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
#
+# Bug#13907676: HA_ARCHIVE::INFO
+#
+CREATE TABLE t1 (a INT) ENGINE=ARCHIVE;
+CREATE TABLE t2 SELECT * FROM t1;
+SELECT * FROM t2;
+a
+DROP TABLE t1, t2;
+#
# BUG#917689 Using wrong archive table causes crash
#
create table t1 (a int, b char(50)) engine=archive;
@@ -12821,7 +12824,6 @@ select * from t1;
ERROR HY000: Table 't1' is marked as crashed and should be repaired
show warnings;
Level Code Message
-Warning 127 Got error 127 when reading table `test`.`t1`
Error 1194 Table 't1' is marked as crashed and should be repaired
drop table t1;
create temporary table t1 (a int) engine=archive;
@@ -12835,7 +12837,7 @@ show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
`a` int(11) DEFAULT NULL
-) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
+) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 DELAY_KEY_WRITE=1
alter table t1 add column b varchar(10);
select * from t1;
a b
diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test
index 1114eb4e89a..5d96aa256fb 100644
--- a/mysql-test/suite/archive/archive.test
+++ b/mysql-test/suite/archive/archive.test
@@ -1653,18 +1653,13 @@ copy_file std_data/bug47012.frm $MYSQLD_DATADIR/test/t1.frm;
copy_file std_data/bug47012.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
copy_file std_data/bug47012.ARM $MYSQLD_DATADIR/test/t1.ARM;
---error ER_TABLE_NEEDS_UPGRADE
SHOW CREATE TABLE t1;
---error ER_TABLE_NEEDS_UPGRADE
SELECT * FROM t1;
---error ER_TABLE_NEEDS_UPGRADE
INSERT INTO t1 (col1, col2) VALUES (1, "value");
REPAIR TABLE t1;
-SHOW CREATE TABLE t1;
-SELECT * FROM t1;
DROP TABLE t1;
remove_file $MYSQLD_DATADIR/test/t1.ARM;
@@ -1700,6 +1695,7 @@ REPAIR TABLE t1 EXTENDED;
SELECT * FROM t1;
DROP TABLE t1;
+
--echo #
--echo # BUG#57162 - valgrind errors, random data when returning
--echo # ordered data from archive tables
@@ -1715,7 +1711,6 @@ SELECT * FROM t1 ORDER BY f LIMIT 1;
DROP TABLE t1;
SET sort_buffer_size=DEFAULT;
-
--echo #
--echo # BUG#11758979 - 51252: ARCHIVE TABLES STILL FAIL UNDER STRESS
--echo # TESTS: CRASH, CORRUPTION, 4G MEMOR
@@ -1731,6 +1726,14 @@ OPTIMIZE TABLE t1;
DROP TABLE t1;
--echo #
+--echo # Bug#13907676: HA_ARCHIVE::INFO
+--echo #
+CREATE TABLE t1 (a INT) ENGINE=ARCHIVE;
+CREATE TABLE t2 SELECT * FROM t1;
+SELECT * FROM t2;
+DROP TABLE t1, t2;
+
+--echo #
--echo # BUG#917689 Using wrong archive table causes crash
--echo #
create table t1 (a int, b char(50)) engine=archive;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
index c0062ddbaaa..8c008ae0bce 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
@@ -315,7 +315,7 @@ CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
DROP TABLE if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
INSERT INTO t1 values (3,3);
CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
@@ -324,7 +324,7 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb;
INSERT INTO t1 VALUES (4,4);
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
index 03fcb481245..10f3f5ddf2a 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
@@ -309,7 +309,7 @@ CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
DROP TABLE if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
INSERT INTO t1 values (3,3);
CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
@@ -318,7 +318,7 @@ Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb;
INSERT INTO t1 VALUES (4,4);
CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result
index be8ffa8f9e5..5ac79a23c47 100644
--- a/mysql-test/suite/csv/csv.result
+++ b/mysql-test/suite/csv/csv.result
@@ -4927,9 +4927,9 @@ period
9410
drop table if exists t1,t2,t3,t4;
Warnings:
-Note 1051 Unknown table 't2'
-Note 1051 Unknown table 't3'
-Note 1051 Unknown table 't4'
+Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table '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/federated/federated_server.result b/mysql-test/suite/federated/federated_server.result
index e2a5d60302b..3855964e2ba 100644
--- a/mysql-test/suite/federated/federated_server.result
+++ b/mysql-test/suite/federated/federated_server.result
@@ -5,7 +5,7 @@ create database second_db;
use first_db;
DROP TABLE IF EXISTS first_db.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'first_db.t1'
CREATE TABLE first_db.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -13,7 +13,7 @@ CREATE TABLE first_db.t1 (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS first_db.t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'first_db.t2'
CREATE TABLE first_db.t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -22,7 +22,7 @@ DEFAULT CHARSET=latin1;
use second_db;
DROP TABLE IF EXISTS second_db.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'second_db.t1'
CREATE TABLE second_db.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -30,7 +30,7 @@ CREATE TABLE second_db.t1 (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS second_db.t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'second_db.t2'
CREATE TABLE second_db.t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -60,7 +60,7 @@ server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
DROP TABLE IF EXISTS federated.old;
Warnings:
-Note 1051 Unknown table 'old'
+Note 1051 Unknown table 'federated.old'
CREATE TABLE federated.old (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -73,7 +73,7 @@ id name
1 federated.old-> first_db.t1, url format
DROP TABLE IF EXISTS federated.old2;
Warnings:
-Note 1051 Unknown table 'old2'
+Note 1051 Unknown table 'federated.old2'
CREATE TABLE federated.old2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -86,7 +86,7 @@ id name
1 federated.old2-> first_db.t2, url format
DROP TABLE IF EXISTS federated.urldb2t1;
Warnings:
-Note 1051 Unknown table 'urldb2t1'
+Note 1051 Unknown table 'federated.urldb2t1'
CREATE TABLE federated.urldb2t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -99,7 +99,7 @@ id name
1 federated.urldb2t1 -> second_db.t1, url format
DROP TABLE IF EXISTS federated.urldb2t2;
Warnings:
-Note 1051 Unknown table 'urldb2t2'
+Note 1051 Unknown table 'federated.urldb2t2'
CREATE TABLE federated.urldb2t2 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -112,7 +112,7 @@ id name
1 federated.urldb2t2 -> second_db.t2, url format
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
@@ -126,7 +126,7 @@ id name
1 server_one, new scheme, first_db.t1
DROP TABLE IF EXISTS federated.whatever;
Warnings:
-Note 1051 Unknown table 'whatever'
+Note 1051 Unknown table 'federated.whatever'
CREATE TABLE federated.whatever (
`id` int(20) NOT NULL,
`name` varchar(64) NOT NULL default ''
diff --git a/mysql-test/suite/federated/federated_transactions.result b/mysql-test/suite/federated/federated_transactions.result
index 2b88f4d0f36..52a0686741e 100644
--- a/mysql-test/suite/federated/federated_transactions.result
+++ b/mysql-test/suite/federated/federated_transactions.result
@@ -2,7 +2,7 @@ CREATE DATABASE federated;
CREATE DATABASE federated;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
@@ -10,7 +10,7 @@ CREATE TABLE federated.t1 (
DEFAULT CHARSET=latin1 ENGINE=innodb;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
diff --git a/mysql-test/suite/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result
index 5ae2abb46e5..c93ff1493d9 100644
--- a/mysql-test/suite/federated/federatedx.result
+++ b/mysql-test/suite/federated/federatedx.result
@@ -6,7 +6,7 @@ SET @OLD_SLAVE_CONCURRENT_INSERT= @@GLOBAL.CONCURRENT_INSERT;
SET @@GLOBAL.CONCURRENT_INSERT= 0;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
@@ -17,7 +17,7 @@ CREATE TABLE federated.t1 (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
@@ -50,7 +50,7 @@ CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3';
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: 'root' hostname: '127.0.0.1'
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
@@ -63,7 +63,7 @@ CONNECTION='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: 'user' hostname: '127.0.0.1'
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`group` int NOT NULL default 0,
@@ -89,7 +89,7 @@ DELETE FROM federated.t1;
DROP TABLE federated.t1;
DROP TABLE IF EXISTS federated.t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'federated.t2'
CREATE TABLE federated.t2 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
@@ -112,7 +112,7 @@ DROP TABLE federated.t2;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.`t1%`;
Warnings:
-Note 1051 Unknown table 't1%'
+Note 1051 Unknown table 'federated.t1%'
CREATE TABLE federated.`t1%` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
@@ -120,7 +120,7 @@ CREATE TABLE federated.`t1%` (
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
@@ -152,7 +152,7 @@ DROP TABLE IF EXISTS federated.`t1%`;
DROP TABLE IF EXISTS federated.`t1%`;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL default '',
@@ -1391,7 +1391,7 @@ PRIMARY KEY (`id`),
key (country_id));
DROP TABLE IF EXISTS federated.countries;
Warnings:
-Note 1051 Unknown table 'countries'
+Note 1051 Unknown table 'federated.countries'
CREATE TABLE federated.countries (
`id` int(20) NOT NULL auto_increment,
`country` varchar(32),
@@ -1544,13 +1544,13 @@ drop table federated.t1;
drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
PRIMARY KEY (`id`));
DROP TABLE IF EXISTS federated.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'federated.t1'
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
PRIMARY KEY (`id`)
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
index 126d6c2080a..8b96e54eefd 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
@@ -347,8 +347,6 @@ CALL h1();
-7- 1 1 1 1 1 1
END x1 x2 x3 x4 x5 x6
END 1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
DROP TABLE IF EXISTS tnull;
DROP PROCEDURE IF EXISTS sp1;
CREATE TABLE tnull(f1 int);
@@ -447,8 +445,6 @@ END//
CALL h2();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
SELECT * FROM res_t1;
w x
a b
@@ -554,8 +550,6 @@ exit handler 2
exit handler 2
exit handler 1
exit handler 1
-Warnings:
-Error 1146 Table 'db_storedproc.tqq' doesn't exist
create table res_t1(w char unique, x char);
insert into res_t1 values ('a', 'b');
CREATE PROCEDURE h1 ()
@@ -586,8 +580,6 @@ END//
CALL h1();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
This will fail, SQLSTATE 00000 is not allowed
CREATE PROCEDURE sp1()
begin1_label:BEGIN
@@ -631,8 +623,6 @@ CALL sp2();
NULL
@x2 @x
1 2
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -664,8 +654,6 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
CALL sp2();
-1- @x2 @x
-1- 0 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
SELECT '-3-', @x2, @x;
-3- @x2 @x
-3- 1 1
@@ -708,8 +696,6 @@ CALL sp2();
-2- 1 20
-4- @x2 @x
-4- 11 22
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -776,33 +762,21 @@ SELECT @done, @x;
0 1
INSERT INTO temp VALUES('1', NULL);
CALL sp1();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('2', NULL);
CALL sp2();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('3', NULL);
CALL sp3();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
INSERT INTO temp VALUES('4', NULL);
CALL sp4();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
@@ -911,26 +885,18 @@ SELECT @done, @x;
@done @x
0 1
CALL sp1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp2();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp3();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
CALL sp4();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
@@ -1065,8 +1031,6 @@ SQLSTATE
21000
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-1-', @x;
-1- @x
-1- 6
@@ -1077,24 +1041,18 @@ SQLSTATE
SQLEXCEPTION
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-2-', @x;
-2- @x
-2- 6
CALL sp3();
SQLSTATE
20000
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-3-', @x;
-3- @x
-3- 1
CALL sp4();
SQLSTATE
SQLEXCEPTION
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-4-', @x;
-4- @x
-4- 1
@@ -1377,8 +1335,6 @@ CLOSE cur1;
CLOSE cur2;
END//
CALL sp_outer();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM temp1;
f0 cnt f1 f2 f3 f4
_sp_out_ 1 a` a` 1000-01-01 -5000
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
index 330a9a315ee..77fabeaef77 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
@@ -185,7 +185,7 @@ Testcase 3.5.1.7: - need to fix
-------------------------------
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14';
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
index 7b7b13c6a8c..e2fba35c7f8 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
@@ -72,7 +72,7 @@ def mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL
def mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
def mysql general_log event_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP select,insert,update,references
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
-def mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
def mysql gtid_slave_pos domain_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql gtid_slave_pos seq_no 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
@@ -117,13 +117,6 @@ def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_
def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql index_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI select,insert,update,references
def mysql index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
-def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references
-def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references
-def mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def mysql plugin dl 2 NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
def mysql plugin name 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) PRI select,insert,update,references
def mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL NULL longblob select,insert,update,references
@@ -170,50 +163,6 @@ def mysql servers Server_name 1 NO char 64 192 NULL NULL NULL utf8 utf8_general
def mysql servers Socket 7 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
def mysql servers Username 4 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
def mysql servers Wrapper 8 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
-def mysql slave_master_info Bind 18 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references Displays which interface is employed when connecting to the MySQL server
-def mysql slave_master_info Connect_retry 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references The period (in seconds) that the slave will wait before trying to reconnect to the master.
-def mysql slave_master_info Enabled_ssl 10 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references Indicates whether the server supports SSL connections.
-def mysql slave_master_info Heartbeat 17 NULL NO float NULL NULL 12 NULL NULL NULL NULL float select,insert,update,references
-def mysql slave_master_info Host 5 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The host name of the master.
-def mysql slave_master_info Ignored_server_ids 19 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The number of server IDs to be ignored, followed by the actual server IDs
-def mysql slave_master_info Master_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
-def mysql slave_master_info Master_log_name 3 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the master binary log currently being read from the master.
-def mysql slave_master_info Master_log_pos 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references The master log position of the last read event.
-def mysql slave_master_info Number_of_lines 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references Number of lines in the file.
-def mysql slave_master_info Port 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references The network port used to connect to the master.
-def mysql slave_master_info Retry_count 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references Number of reconnect attempts, to the master, before giving up.
-def mysql slave_master_info Ssl_ca 11 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The file used for the Certificate Authority (CA) certificate.
-def mysql slave_master_info Ssl_capath 12 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The path to the Certificate Authority (CA) certificates.
-def mysql slave_master_info Ssl_cert 13 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the SSL certificate file.
-def mysql slave_master_info Ssl_cipher 14 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the cipher in use for the SSL connection.
-def mysql slave_master_info Ssl_crl 22 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The file used for the Certificate Revocation List (CRL)
-def mysql slave_master_info Ssl_crlpath 23 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The path used for Certificate Revocation List (CRL) files
-def mysql slave_master_info Ssl_key 15 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the SSL key file.
-def mysql slave_master_info Ssl_verify_server_cert 16 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references Whether to verify the server certificate.
-def mysql slave_master_info User_name 6 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The user name used to connect to the master.
-def mysql slave_master_info User_password 7 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The password used to connect to the master.
-def mysql slave_master_info Uuid 20 NULL YES text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The master server uuid.
-def mysql slave_relay_log_info Master_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
-def mysql slave_relay_log_info Master_log_name 5 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the master binary log file from which the events in the relay log file were read.
-def mysql slave_relay_log_info Master_log_pos 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references The master log position of the last executed event.
-def mysql slave_relay_log_info Number_of_lines 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references Number of lines in the file or rows in the table. Used to version table definitions.
-def mysql slave_relay_log_info Number_of_workers 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
-def mysql slave_relay_log_info Relay_log_name 3 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references The name of the current relay log file.
-def mysql slave_relay_log_info Relay_log_pos 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references The relay log position of the last executed event.
-def mysql slave_relay_log_info Sql_delay 7 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references The number of seconds that the slave must lag behind the master.
-def mysql slave_worker_info Checkpoint_group_bitmap 13 NULL NO blob 65535 65535 NULL NULL NULL NULL NULL blob select,insert,update,references
-def mysql slave_worker_info Checkpoint_group_size 12 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
-def mysql slave_worker_info Checkpoint_master_log_name 9 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references
-def mysql slave_worker_info Checkpoint_master_log_pos 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql slave_worker_info Checkpoint_relay_log_name 7 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references
-def mysql slave_worker_info Checkpoint_relay_log_pos 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql slave_worker_info Checkpoint_seqno 11 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
-def mysql slave_worker_info Master_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
-def mysql slave_worker_info Master_log_name 5 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references
-def mysql slave_worker_info Master_log_pos 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql slave_worker_info Relay_log_name 3 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references
-def mysql slave_worker_info Relay_log_pos 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def mysql slave_worker_info Worker_id 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI select,insert,update,references
def mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
def mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
def mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
@@ -224,6 +173,7 @@ def mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
def mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
def mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
def mysql slow_log start_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
def mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
def mysql tables_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
@@ -274,6 +224,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) u
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned select,insert,update,references
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
def mysql user Password 3 NO char 41 41 NULL NULL NULL latin1 latin1_bin char(41) select,insert,update,references
+def mysql user password_expired 43 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user plugin 41 NO char 64 64 NULL NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user References_priv 15 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
@@ -310,7 +261,6 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 varbinary NULL NULL
1.0000 char latin1 latin1_bin
1.0000 char latin1 latin1_swedish_ci
-1.0000 varchar latin1 latin1_swedish_ci
1.0000 text utf8 utf8_bin
1.0000 mediumtext utf8 utf8_general_ci
1.0000 text utf8 utf8_general_ci
@@ -344,7 +294,6 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL bigint NULL NULL
NULL datetime NULL NULL
NULL decimal NULL NULL
-NULL float NULL NULL
NULL int NULL NULL
NULL smallint NULL NULL
NULL time NULL NULL
@@ -434,7 +383,7 @@ NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1)
3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate')
NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp(6)
1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
-NULL mysql general_log thread_id int NULL NULL NULL NULL int(11)
+NULL mysql general_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64)
1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
@@ -481,13 +430,6 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5)
3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
-NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255)
-NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql ndb_binlog_index inserts bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql ndb_binlog_index updates bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql ndb_binlog_index deletes bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsigned
3.0000 mysql plugin name varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 mysql plugin dl varchar 128 384 utf8 utf8_general_ci varchar(128)
3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64)
@@ -534,50 +476,6 @@ NULL mysql servers Port int NULL NULL NULL NULL int(4)
3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64)
-NULL mysql slave_master_info Master_id int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_master_info Number_of_lines int NULL NULL NULL NULL int(10) unsigned
-1.0000 mysql slave_master_info Master_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_master_info Master_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_master_info Host text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info User_name text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info User_password text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_master_info Port int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_master_info Connect_retry int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_master_info Enabled_ssl tinyint NULL NULL NULL NULL tinyint(1)
-1.0000 mysql slave_master_info Ssl_ca text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ssl_capath text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ssl_cert text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ssl_cipher text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ssl_key text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_master_info Ssl_verify_server_cert tinyint NULL NULL NULL NULL tinyint(1)
-NULL mysql slave_master_info Heartbeat float NULL NULL NULL NULL float
-1.0000 mysql slave_master_info Bind text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ignored_server_ids text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Uuid text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_master_info Retry_count bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_master_info Ssl_crl text 65535 65535 utf8 utf8_bin text
-1.0000 mysql slave_master_info Ssl_crlpath text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_relay_log_info Master_id int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_relay_log_info Number_of_lines int NULL NULL NULL NULL int(10) unsigned
-1.0000 mysql slave_relay_log_info Relay_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_relay_log_info Relay_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_relay_log_info Master_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_relay_log_info Master_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql slave_relay_log_info Sql_delay int NULL NULL NULL NULL int(11)
-NULL mysql slave_relay_log_info Number_of_workers int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_worker_info Master_id int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_worker_info Worker_id int NULL NULL NULL NULL int(10) unsigned
-1.0000 mysql slave_worker_info Relay_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_worker_info Relay_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_worker_info Master_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_worker_info Master_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_worker_info Checkpoint_relay_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_worker_info Checkpoint_relay_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-1.0000 mysql slave_worker_info Checkpoint_master_log_name text 65535 65535 utf8 utf8_bin text
-NULL mysql slave_worker_info Checkpoint_master_log_pos bigint NULL NULL NULL NULL bigint(20) unsigned
-NULL mysql slave_worker_info Checkpoint_seqno int NULL NULL NULL NULL int(10) unsigned
-NULL mysql slave_worker_info Checkpoint_group_size int NULL NULL NULL NULL int(10) unsigned
-1.0000 mysql slave_worker_info Checkpoint_group_bitmap blob 65535 65535 NULL NULL blob
NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6)
1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
NULL mysql slow_log query_time time NULL NULL NULL NULL time(6)
@@ -589,6 +487,7 @@ NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11)
NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11)
NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext
+NULL mysql slow_log thread_id bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16)
@@ -656,3 +555,4 @@ NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11)
1.0000 mysql user plugin char 64 64 latin1 latin1_swedish_ci char(64)
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
+3.0000 mysql user password_expired enum 1 3 utf8 utf8_general_ci enum('N','Y')
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
index 66967267202..75cd59604ff 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
@@ -109,11 +109,8 @@ def mysql PRIMARY def mysql innodb_index_stats database_name
def mysql PRIMARY def mysql innodb_index_stats table_name
def mysql PRIMARY def mysql innodb_index_stats index_name
def mysql PRIMARY def mysql innodb_index_stats stat_name
-def mysql innodb_index_stats_ibfk_1 def mysql innodb_index_stats database_name
-def mysql innodb_index_stats_ibfk_1 def mysql innodb_index_stats table_name
def mysql PRIMARY def mysql innodb_table_stats database_name
def mysql PRIMARY def mysql innodb_table_stats table_name
-def mysql PRIMARY def mysql ndb_binlog_index epoch
def mysql PRIMARY def mysql plugin name
def mysql PRIMARY def mysql proc db
def mysql PRIMARY def mysql proc name
@@ -128,10 +125,6 @@ def mysql PRIMARY def mysql proxies_priv User
def mysql PRIMARY def mysql proxies_priv Proxied_host
def mysql PRIMARY def mysql proxies_priv Proxied_user
def mysql PRIMARY def mysql servers Server_name
-def mysql PRIMARY def mysql slave_master_info Master_id
-def mysql PRIMARY def mysql slave_relay_log_info Master_id
-def mysql PRIMARY def mysql slave_worker_info Master_id
-def mysql PRIMARY def mysql slave_worker_info Worker_id
def mysql PRIMARY def mysql table_stats db_name
def mysql PRIMARY def mysql table_stats table_name
def mysql PRIMARY def mysql tables_priv Host
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index 73407fa0a5a..c1afeb8db9b 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -116,7 +116,6 @@ def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
-def mysql ndb_binlog_index mysql PRIMARY
def mysql plugin mysql PRIMARY
def mysql proc mysql PRIMARY
def mysql proc mysql PRIMARY
@@ -133,10 +132,6 @@ def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql Grantor
def mysql servers mysql PRIMARY
-def mysql slave_master_info mysql PRIMARY
-def mysql slave_relay_log_info mysql PRIMARY
-def mysql slave_worker_info mysql PRIMARY
-def mysql slave_worker_info mysql PRIMARY
def mysql table_stats mysql PRIMARY
def mysql table_stats mysql PRIMARY
def mysql tables_priv mysql PRIMARY
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 1bee7c44cb1..5dbf3bc1488 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result
@@ -44,7 +44,6 @@ def mysql innodb_index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BT
def mysql innodb_index_stats 0 mysql PRIMARY 4 stat_name A #CARD# NULL NULL BTREE
def mysql innodb_table_stats 0 mysql PRIMARY 1 database_name A #CARD# NULL NULL BTREE
def mysql innodb_table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
-def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE
def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
def mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE
@@ -61,10 +60,6 @@ def mysql proxies_priv 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 3 Proxied_host A #CARD# NULL NULL BTREE
def mysql proxies_priv 0 mysql PRIMARY 4 Proxied_user A #CARD# NULL NULL BTREE
def mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE
-def mysql slave_master_info 0 mysql PRIMARY 1 Master_id A #CARD# NULL NULL BTREE
-def mysql slave_relay_log_info 0 mysql PRIMARY 1 Master_id A #CARD# NULL NULL BTREE
-def mysql slave_worker_info 0 mysql PRIMARY 1 Master_id A #CARD# NULL NULL BTREE
-def mysql slave_worker_info 0 mysql PRIMARY 2 Worker_id A #CARD# NULL NULL BTREE
def mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result
index fb62c16ec1e..0077f74396c 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result
@@ -73,17 +73,12 @@ def mysql name mysql help_topic
def mysql PRIMARY mysql host
def mysql PRIMARY mysql index_stats
def mysql PRIMARY mysql innodb_index_stats
-def mysql innodb_index_stats_ibfk_1 mysql innodb_index_stats
def mysql PRIMARY mysql innodb_table_stats
-def mysql PRIMARY mysql ndb_binlog_index
def mysql PRIMARY mysql plugin
def mysql PRIMARY mysql proc
def mysql PRIMARY mysql procs_priv
def mysql PRIMARY mysql proxies_priv
def mysql PRIMARY mysql servers
-def mysql PRIMARY mysql slave_master_info
-def mysql PRIMARY mysql slave_relay_log_info
-def mysql PRIMARY mysql slave_worker_info
def mysql PRIMARY mysql table_stats
def mysql PRIMARY mysql tables_priv
def mysql PRIMARY mysql time_zone
diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
index 4a51fe66f1f..38f79f30068 100644
--- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result
@@ -22,18 +22,13 @@ def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic PRIMARY KEY
def mysql PRIMARY mysql host PRIMARY KEY
def mysql PRIMARY mysql index_stats PRIMARY KEY
-def mysql innodb_index_stats_ibfk_1 mysql innodb_index_stats FOREIGN KEY
def mysql PRIMARY mysql innodb_index_stats PRIMARY KEY
def mysql PRIMARY mysql innodb_table_stats PRIMARY KEY
-def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY
def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY
def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql PRIMARY mysql servers PRIMARY KEY
-def mysql PRIMARY mysql slave_master_info PRIMARY KEY
-def mysql PRIMARY mysql slave_relay_log_info PRIMARY KEY
-def mysql PRIMARY mysql slave_worker_info PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql table_stats PRIMARY KEY
def mysql PRIMARY mysql time_zone PRIMARY KEY
diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
index 6693143e1b0..4587538ea0b 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
@@ -359,29 +359,6 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME ndb_binlog_index
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION latin1_swedish_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment
-Separator -----------------------------------------------------
-TABLE_CATALOG def
-TABLE_SCHEMA mysql
TABLE_NAME plugin
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
@@ -497,75 +474,6 @@ user_comment MySQL Foreign Servers table
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
-TABLE_NAME slave_master_info
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment Master Information
-Separator -----------------------------------------------------
-TABLE_CATALOG def
-TABLE_SCHEMA mysql
-TABLE_NAME slave_relay_log_info
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment Relay Log Information
-Separator -----------------------------------------------------
-TABLE_CATALOG def
-TABLE_SCHEMA mysql
-TABLE_NAME slave_worker_info
-TABLE_TYPE BASE TABLE
-ENGINE MYISAM_OR_MARIA
-VERSION 10
-ROW_FORMAT DYNAMIC_OR_PAGE
-TABLE_ROWS #TBLR#
-AVG_ROW_LENGTH #ARL#
-DATA_LENGTH #DL#
-MAX_DATA_LENGTH #MDL#
-INDEX_LENGTH #IL#
-DATA_FREE #DF#
-AUTO_INCREMENT NULL
-CREATE_TIME #CRT#
-UPDATE_TIME #UT#
-CHECK_TIME #CT#
-TABLE_COLLATION utf8_general_ci
-CHECKSUM NULL
-CREATE_OPTIONS #CO#
-TABLE_COMMENT #TC#
-user_comment Worker Information
-Separator -----------------------------------------------------
-TABLE_CATALOG def
-TABLE_SCHEMA mysql
TABLE_NAME slow_log
TABLE_TYPE BASE TABLE
ENGINE CSV
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 1ec1ffc4ce1..031067f2e64 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -129,6 +129,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -171,6 +172,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -213,6 +215,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
#
# Add GRANT OPTION db_datadict.* to testuser1;
GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
@@ -279,6 +282,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -321,6 +325,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -363,6 +368,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
# Establish connection testuser1 (user=testuser1)
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -415,6 +421,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -457,6 +464,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -499,6 +507,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -573,6 +582,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -615,6 +625,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -657,6 +668,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION;
#
# Here <SELECT YES> is shown correctly for testuser1;
@@ -723,6 +735,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -765,6 +778,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -807,6 +821,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -859,6 +874,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -901,6 +917,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -943,6 +960,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
SHOW GRANTS;
Grants for testuser1@localhost
GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION
@@ -1047,6 +1065,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -1089,6 +1108,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -1131,6 +1151,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1230,6 +1251,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -1272,6 +1294,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -1314,6 +1337,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -1366,6 +1390,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -1408,6 +1433,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -1450,6 +1476,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -1509,6 +1536,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -1551,6 +1579,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -1593,6 +1622,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
SHOW GRANTS;
Grants for testuser1@localhost
GRANT USAGE ON *.* TO 'testuser1'@'localhost'
@@ -1667,6 +1697,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser2
Password
@@ -1709,6 +1740,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
Host localhost
User testuser3
Password
@@ -1751,6 +1783,7 @@ max_connections 0
max_user_connections 0
plugin
authentication_string
+password_expired N
# Switch to connection testuser1
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
index 03c16d06595..0ee25154c50 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
@@ -348,8 +348,6 @@ CALL h1();
-7- 1 1 1 1 1 1
END x1 x2 x3 x4 x5 x6
END 1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
DROP TABLE IF EXISTS tnull;
DROP PROCEDURE IF EXISTS sp1;
CREATE TABLE tnull(f1 int);
@@ -448,8 +446,6 @@ END//
CALL h2();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
SELECT * FROM res_t1;
w x
a b
@@ -555,8 +551,6 @@ exit handler 2
exit handler 2
exit handler 1
exit handler 1
-Warnings:
-Error 1146 Table 'db_storedproc.tqq' doesn't exist
create table res_t1(w char unique, x char);
insert into res_t1 values ('a', 'b');
CREATE PROCEDURE h1 ()
@@ -587,8 +581,6 @@ END//
CALL h1();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
This will fail, SQLSTATE 00000 is not allowed
CREATE PROCEDURE sp1()
begin1_label:BEGIN
@@ -632,8 +624,6 @@ CALL sp2();
NULL
@x2 @x
1 2
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -665,8 +655,6 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
CALL sp2();
-1- @x2 @x
-1- 0 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
SELECT '-3-', @x2, @x;
-3- @x2 @x
-3- 1 1
@@ -709,8 +697,6 @@ CALL sp2();
-2- 1 20
-4- @x2 @x
-4- 11 22
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -777,33 +763,21 @@ SELECT @done, @x;
0 1
INSERT INTO temp VALUES('1', NULL);
CALL sp1();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('2', NULL);
CALL sp2();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('3', NULL);
CALL sp3();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
INSERT INTO temp VALUES('4', NULL);
CALL sp4();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
@@ -912,26 +886,18 @@ SELECT @done, @x;
@done @x
0 1
CALL sp1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp2();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp3();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
CALL sp4();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
@@ -1066,8 +1032,6 @@ SQLSTATE
21000
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-1-', @x;
-1- @x
-1- 6
@@ -1078,24 +1042,18 @@ SQLSTATE
SQLEXCEPTION
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-2-', @x;
-2- @x
-2- 6
CALL sp3();
SQLSTATE
20000
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-3-', @x;
-3- @x
-3- 1
CALL sp4();
SQLSTATE
SQLEXCEPTION
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-4-', @x;
-4- @x
-4- 1
@@ -1378,8 +1336,6 @@ CLOSE cur1;
CLOSE cur2;
END//
CALL sp_outer();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM temp1;
f0 cnt f1 f2 f3 f4
_sp_out_ 1 a` a` 1000-01-01 -5000
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
index b08eeb6754f..85da4aa7832 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
@@ -186,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
-------------------------------
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14';
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
index 03c16d06595..0ee25154c50 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
@@ -348,8 +348,6 @@ CALL h1();
-7- 1 1 1 1 1 1
END x1 x2 x3 x4 x5 x6
END 1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
DROP TABLE IF EXISTS tnull;
DROP PROCEDURE IF EXISTS sp1;
CREATE TABLE tnull(f1 int);
@@ -448,8 +446,6 @@ END//
CALL h2();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
SELECT * FROM res_t1;
w x
a b
@@ -555,8 +551,6 @@ exit handler 2
exit handler 2
exit handler 1
exit handler 1
-Warnings:
-Error 1146 Table 'db_storedproc.tqq' doesn't exist
create table res_t1(w char unique, x char);
insert into res_t1 values ('a', 'b');
CREATE PROCEDURE h1 ()
@@ -587,8 +581,6 @@ END//
CALL h1();
x1 x2 x3 x4 x5 x6
1 1 1 1 1 1
-Warnings:
-Error 1062 Duplicate entry 'a' for key 'w'
This will fail, SQLSTATE 00000 is not allowed
CREATE PROCEDURE sp1()
begin1_label:BEGIN
@@ -632,8 +624,6 @@ CALL sp2();
NULL
@x2 @x
1 2
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -665,8 +655,6 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
CALL sp2();
-1- @x2 @x
-1- 0 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
SELECT '-3-', @x2, @x;
-3- @x2 @x
-3- 1 1
@@ -709,8 +697,6 @@ CALL sp2();
-2- 1 20
-4- @x2 @x
-4- 11 22
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE sp1;
DROP PROCEDURE sp2;
@@ -777,33 +763,21 @@ SELECT @done, @x;
0 1
INSERT INTO temp VALUES('1', NULL);
CALL sp1();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('2', NULL);
CALL sp2();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 1
INSERT INTO temp VALUES('3', NULL);
CALL sp3();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
INSERT INTO temp VALUES('4', NULL);
CALL sp4();
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
-Warning 1265 Data truncated for column 'f2' at row 1
SELECT @done, @x;
@done @x
1 0
@@ -912,26 +886,18 @@ SELECT @done, @x;
@done @x
0 1
CALL sp1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp2();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 2
CALL sp3();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
CALL sp4();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT @done, @x;
@done @x
1 1
@@ -1066,8 +1032,6 @@ SQLSTATE
21000
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-1-', @x;
-1- @x
-1- 6
@@ -1078,24 +1042,18 @@ SQLSTATE
SQLEXCEPTION
SQLSTATE
24000
-Warnings:
-Error 1326 Cursor is not open
SELECT '-2-', @x;
-2- @x
-2- 6
CALL sp3();
SQLSTATE
20000
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-3-', @x;
-3- @x
-3- 1
CALL sp4();
SQLSTATE
SQLEXCEPTION
-Warnings:
-Error 1339 Case not found for CASE statement
SELECT '-4-', @x;
-4- @x
-4- 1
@@ -1378,8 +1336,6 @@ CLOSE cur1;
CLOSE cur2;
END//
CALL sp_outer();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM temp1;
f0 cnt f1 f2 f3 f4
_sp_out_ 1 a` a` 1000-01-01 -5000
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
index b08eeb6754f..85da4aa7832 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
@@ -186,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
-------------------------------
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14';
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index f9cdbb13d61..4ec9bfbd512 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -1822,7 +1822,7 @@ grant execute on db_storedproc.* to 'user_1'@'localhost';
flush privileges;
drop table IF EXISTS mysql.t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'mysql.t1'
create table mysql.t1( f1 char );
DROP PROCEDURE IF EXISTS sp11;
Warnings:
@@ -9327,8 +9327,6 @@ insert into t2 values (1);
set @x = 3;
END//
CALL sp1();
-Warnings:
-Error 1136 Column count doesn't match value count at row 1
DROP PROCEDURE sp1;
DROP PROCEDURE IF EXISTS sp1;
Warnings:
@@ -13754,8 +13752,6 @@ END//
CALL sp1();
x y @x
NULL a 3
-Warnings:
-Error 1305 PROCEDURE db_storedproc.nonsexist does not exist
SELECT @v1, @v2;
@v1 @v2
4 a
@@ -14940,8 +14936,6 @@ NULL NULL
NULL NULL
@x @y
NULL NULL
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE sp1;
Testcase 4.2.63:
@@ -15101,8 +15095,6 @@ END;
fetch cur1 into newf1, newf2, newf4, newf3;
END//
CALL sp1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE sp1;
Testcase 4.2.70:
@@ -16351,7 +16343,6 @@ fn7(99999999999)
9999999999
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn8;
CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill
BEGIN
@@ -16361,8 +16352,6 @@ END//
SELECT fn8(999999999);
fn8(999999999)
1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn9;
CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill
BEGIN
@@ -16374,7 +16363,6 @@ fn9(-1.00e+09)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn10;
CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0)
BEGIN
@@ -16395,7 +16383,6 @@ fn11(99999999999)
9999999999
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn12;
CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill
BEGIN
@@ -16405,8 +16392,6 @@ END//
SELECT fn12(999999999);
fn12(999999999)
1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn13;
CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill
BEGIN
@@ -16418,7 +16403,6 @@ fn13(-1.00e+09)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn14;
CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30)
BEGIN
@@ -16457,7 +16441,6 @@ fn17(-1.00e+21)
000000000000000000000000000000010.000000000000000000000000000000
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn18_d;
CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64)
BEGIN
@@ -16494,8 +16477,6 @@ END//
SELECT fn21_d_z(1.00e+00);
fn21_d_z(1.00e+00)
0000000000000000000000000000000000000000000000000000000000000010
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn22;
CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned
BEGIN
@@ -16505,8 +16486,6 @@ END//
SELECT fn22(1.00e+00);
fn22(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn23;
CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill
BEGIN
@@ -16516,8 +16495,6 @@ END//
SELECT fn23(1.00e+00);
fn23(1.00e+00)
0000000010
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn24;
CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill
BEGIN
@@ -16529,7 +16506,6 @@ fn24(-1.00e+09)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn25;
CREATE FUNCTION fn25( f1 double) returns double
BEGIN
@@ -16548,8 +16524,6 @@ END//
SELECT fn26(1.00e+00);
fn26(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn27;
CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill
BEGIN
@@ -16559,8 +16533,6 @@ END//
SELECT fn27(1.00e+00);
fn27(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn28;
CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill
BEGIN
@@ -16570,8 +16542,6 @@ END//
SELECT fn28(1.00e+00);
fn28(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn29;
CREATE FUNCTION fn29( f1 float) returns float
BEGIN
@@ -16590,8 +16560,6 @@ END//
SELECT fn30(1.00e+00);
fn30(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn31;
CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill
BEGIN
@@ -16601,8 +16569,6 @@ END//
SELECT fn31(1.00e+00);
fn31(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn32;
CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill
BEGIN
@@ -16612,8 +16578,6 @@ END//
SELECT fn32(1.00e+00);
fn32(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn33;
CREATE FUNCTION fn33( f1 float(0)) returns float(0)
BEGIN
@@ -16632,8 +16596,6 @@ END//
SELECT fn34(1.00e+00);
fn34(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn35;
CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill
BEGIN
@@ -16643,8 +16605,6 @@ END//
SELECT fn35(1.00e+00);
fn35(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn36;
CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill
BEGIN
@@ -16654,8 +16614,6 @@ END//
SELECT fn36(1.00e+00);
fn36(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn37;
CREATE FUNCTION fn37( f1 float(23)) returns float(23)
BEGIN
@@ -16674,8 +16632,6 @@ END//
SELECT fn38(1.00e+00);
fn38(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn39;
CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill
BEGIN
@@ -16685,8 +16641,6 @@ END//
SELECT fn39(1.00e+00);
fn39(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn40;
CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill
BEGIN
@@ -16696,8 +16650,6 @@ END//
SELECT fn40(1.00e+00);
fn40(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn41;
CREATE FUNCTION fn41( f1 float(24)) returns float(24)
BEGIN
@@ -16716,8 +16668,6 @@ END//
SELECT fn42(1.00e+00);
fn42(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn43;
CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill
BEGIN
@@ -16727,8 +16677,6 @@ END//
SELECT fn43(1.00e+00);
fn43(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn44;
CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill
BEGIN
@@ -16738,8 +16686,6 @@ END//
SELECT fn44(1.00e+00);
fn44(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn45;
CREATE FUNCTION fn45( f1 float(53)) returns float(53)
BEGIN
@@ -16758,8 +16704,6 @@ END//
SELECT fn46(1.00e+00);
fn46(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn47;
CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill
BEGIN
@@ -16769,8 +16713,6 @@ END//
SELECT fn47(1.00e+00);
fn47(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn48;
CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill
BEGIN
@@ -16780,8 +16722,6 @@ END//
SELECT fn48(1.00e+00);
fn48(1.00e+00)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn49;
CREATE FUNCTION fn49( f1 int) returns int
BEGIN
@@ -16793,7 +16733,6 @@ fn49(-2.15e+09)
-2147483638
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn50;
CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned
BEGIN
@@ -16830,8 +16769,6 @@ END//
SELECT fn53(-8388600);
fn53(-8388600)
-8388598
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn54;
CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned
BEGIN
@@ -16867,8 +16804,6 @@ END//
SELECT fn57(-999999999);
fn57(-999999999)
-1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn58;
CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0)
BEGIN
@@ -16878,8 +16813,6 @@ END//
SELECT fn58(-999999999);
fn58(-999999999)
-1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn59;
CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned
BEGIN
@@ -16889,8 +16822,6 @@ END//
SELECT fn59(9999999999);
fn59(9999999999)
9999999999
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn60;
CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill
BEGIN
@@ -16900,8 +16831,6 @@ END//
SELECT fn60(99999999);
fn60(99999999)
0100000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn61;
CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill
BEGIN
@@ -16913,7 +16842,6 @@ fn61(-99999999)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn62;
CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0)
BEGIN
@@ -16923,8 +16851,6 @@ END//
SELECT fn62(-999999999);
fn62(-999999999)
-1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn63;
CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned
BEGIN
@@ -16934,8 +16860,6 @@ END//
SELECT fn63(9999999999);
fn63(9999999999)
9999999999
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn64;
CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill
BEGIN
@@ -16945,8 +16869,6 @@ END//
SELECT fn64(99999999);
fn64(99999999)
0100000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn65;
CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill
BEGIN
@@ -16958,7 +16880,6 @@ fn65(-99999999)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn66;
CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30)
BEGIN
@@ -16970,7 +16891,6 @@ fn66(-1e+36)
-999999999999999999999999999999989.999999999999999999999999999999
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn67;
CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned
BEGIN
@@ -16982,7 +16902,6 @@ fn67(1e+36)
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn68;
CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill
BEGIN
@@ -16994,7 +16913,6 @@ fn68(1e+36)
999999999999999999999999999999999.999999999999999999999999999999
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn69;
CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill
BEGIN
@@ -17006,7 +16924,6 @@ fn69(-1e+36)
000000000000000000000000000000010.000000000000000000000000000000
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn70_n;
CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64)
BEGIN
@@ -17055,8 +16972,6 @@ END//
SELECT fn74(999999999);
fn74(999999999)
1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn75;
CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill
BEGIN
@@ -17066,8 +16981,6 @@ END//
SELECT fn75(999999999);
fn75(999999999)
1000000000
-Warnings:
-Note 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn76;
CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill
BEGIN
@@ -17079,7 +16992,6 @@ fn76(-999999999)
0000000010
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn77;
CREATE FUNCTION fn77( f1 real) returns real
BEGIN
@@ -17098,8 +17010,6 @@ END//
SELECT fn78(1.1);
fn78(1.1)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn79;
CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill
BEGIN
@@ -17109,8 +17019,6 @@ END//
SELECT fn79(1.1);
fn79(1.1)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn80;
CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill
BEGIN
@@ -17120,8 +17028,6 @@ END//
SELECT fn80(1.1);
fn80(1.1)
10
-Warnings:
-Warning 1264 Out of range value for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn81;
CREATE FUNCTION fn81( f1 smallint) returns smallint
BEGIN
@@ -17254,8 +17160,6 @@ END//
SELECT fn94( 'h');
fn94( 'h')
a
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn95;
CREATE FUNCTION fn95( f1 char ascii) returns char ascii
BEGIN
@@ -17265,8 +17169,6 @@ END//
SELECT fn95('h');
fn95('h')
a
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn96;
CREATE FUNCTION fn96( f1 binary) returns binary(2)
BEGIN
@@ -17276,8 +17178,6 @@ END//
SELECT fn96( 'h');
fn96( 'h')
a
-Warnings:
-Warning 1265 Data truncated for column 'f1' at row 1
DROP FUNCTION IF EXISTS fn97;
CREATE FUNCTION fn97( f1 longtext) returns longtext
BEGIN
@@ -22351,7 +22251,7 @@ Warnings:
Note 1305 FUNCTION db_storedproc.fn1 does not exist
drop table IF EXISTS res_t9;
Warnings:
-Note 1051 Unknown table 'res_t9'
+Note 1051 Unknown table 'db_storedproc.res_t9'
create table res_t9 (f1 int, f2 char(25), f3 int);
insert into res_t9 values (10, 'abc', 20);
CREATE FUNCTION fn1(i1 longtext) returns longtext
@@ -22377,7 +22277,7 @@ Warnings:
Note 1305 FUNCTION db_storedproc.fn1 does not exist
drop table IF EXISTS res_t9;
Warnings:
-Note 1051 Unknown table 'res_t9'
+Note 1051 Unknown table 'db_storedproc.res_t9'
create table res_t9 (f1 int, f2 char(25), f3 int);
CREATE FUNCTION fn1(i1 longtext) returns longtext
BEGIN
@@ -22453,8 +22353,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22472,8 +22370,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1305 PROCEDURE db_storedproc.sp1 does not exist
DROP PROCEDURE h1;
Testcase 4.11.3:
@@ -22493,8 +22389,6 @@ CALL sp1 (1);
set @x=0;
END//
CALL h1();
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
SELECT @x, @x2;
@x @x2
1 1
@@ -22513,8 +22407,6 @@ CALL sp1 (1);
set @x=0;
END//
CALL h1 ();
-Warnings:
-Error 1305 PROCEDURE db_storedproc.sp1 does not exist
SELECT @x, @x2;
@x @x2
1 1
@@ -22539,8 +22431,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22563,8 +22453,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22587,8 +22475,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22606,8 +22492,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1305 PROCEDURE db_storedproc.sp1 does not exist
DROP PROCEDURE h1;
Testcase 4.11.9:
@@ -22627,8 +22511,6 @@ CALL sp1 (1);
set @x=0;
END//
CALL h1();
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
SELECT @x, @x2;
@x @x2
1 1
@@ -22647,8 +22529,6 @@ CALL sp1 (1);
set @x=0;
END//
CALL h1 ();
-Warnings:
-Error 1305 PROCEDURE db_storedproc.sp1 does not exist
SELECT @x, @x2;
@x @x2
1 1
@@ -22673,8 +22553,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22697,8 +22575,6 @@ END//
CALL h1 ();
@x @x2
1 1
-Warnings:
-Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
DROP PROCEDURE h1;
DROP PROCEDURE sp1;
@@ -22734,8 +22610,6 @@ done
1
done
1
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22809,8 +22683,6 @@ done
0
done
1
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22848,8 +22720,6 @@ done
0
done
1
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22880,8 +22750,6 @@ done
0
done
1
-Warnings:
-Error 1328 Incorrect number of FETCH variables
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22912,8 +22780,6 @@ done
0
done
1
-Warnings:
-Error 1328 Incorrect number of FETCH variables
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22944,8 +22810,6 @@ END//
CALL h1();
done
0
-Warnings:
-Error 1328 Incorrect number of FETCH variables
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -22976,8 +22840,6 @@ END//
CALL h1();
done
0
-Warnings:
-Error 1328 Incorrect number of FETCH variables
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23008,8 +22870,6 @@ done
0
done
1
-Warnings:
-Error 1325 Cursor is already open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23041,8 +22901,6 @@ done
0
done @x
1 1
-Warnings:
-Error 1325 Cursor is already open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23073,8 +22931,6 @@ END//
CALL h1();
done
0
-Warnings:
-Error 1325 Cursor is already open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23105,8 +22961,6 @@ END//
CALL h1();
done
0
-Warnings:
-Error 1325 Cursor is already open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23134,8 +22988,6 @@ END//
CALL h1();
done @x
1 1
-Warnings:
-Error 1326 Cursor is not open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23163,8 +23015,6 @@ END//
CALL h1();
done @x
1 1
-Warnings:
-Error 1326 Cursor is not open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23190,8 +23040,6 @@ set @x=1;
SELECT done, @x;
END//
CALL h1();
-Warnings:
-Error 1326 Cursor is not open
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23217,8 +23065,6 @@ set @x=1;
SELECT done, @x;
END//
CALL h1();
-Warnings:
-Error 1326 Cursor is not open
DROP PROCEDURE IF EXISTS h1;
drop table IF EXISTS res_t1;
drop table IF EXISTS res_t2;
@@ -23249,8 +23095,6 @@ END//
CALL h1();
done @x
1 1
-Warnings:
-Error 1339 Case not found for CASE statement
DROP PROCEDURE IF EXISTS h1;
drop table IF EXISTS res_t1;
drop table IF EXISTS res_t2;
@@ -23281,8 +23125,6 @@ END//
CALL h1();
done @x
1 1
-Warnings:
-Error 1339 Case not found for CASE statement
DROP PROCEDURE IF EXISTS h1;
drop table IF EXISTS res_t1;
drop table IF EXISTS res_t2;
@@ -23311,8 +23153,6 @@ set @x=1;
SELECT done, @x;
END//
CALL h1();
-Warnings:
-Error 1339 Case not found for CASE statement
DROP PROCEDURE IF EXISTS h1;
drop table IF EXISTS res_t1;
drop table IF EXISTS res_t2;
@@ -23341,8 +23181,6 @@ set @x=1;
SELECT done, @x;
END//
CALL h1();
-Warnings:
-Error 1339 Case not found for CASE statement
DROP PROCEDURE IF EXISTS h1;
DROP TABLE IF EXISTS res_t1;
DROP TABLE IF EXISTS res_t2;
@@ -23491,9 +23329,6 @@ CREATE TABLE res_t1(w CHAR, x CHAR);
INSERT INTO res_t1 VALUES('a', 'b');
INSERT INTO res_t1 VALUES('c', 'd');
CALL h1();
-Warnings:
-Warning 1265 Data truncated for column 'w' at row 1
-Warning 1265 Data truncated for column 'x' at row 1
SELECT @done, @x;
@done @x
1 1
@@ -23516,9 +23351,6 @@ CREATE TABLE res_t1(w CHAR, x CHAR);
INSERT INTO res_t1 VALUES('a', 'b');
INSERT INTO res_t1 VALUES('c', 'd');
CALL h1();
-Warnings:
-Warning 1265 Data truncated for column 'w' at row 1
-Warning 1265 Data truncated for column 'x' at row 1
SELECT @done, @x;
@done @x
1 1
diff --git a/mysql-test/suite/handler/aria.result b/mysql-test/suite/handler/aria.result
index 630b16433a4..ab50da321db 100644
--- a/mysql-test/suite/handler/aria.result
+++ b/mysql-test/suite/handler/aria.result
@@ -582,7 +582,7 @@ select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (a int not null) ENGINE=csv;
--> client 2
handler t1 open;
@@ -741,7 +741,7 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
handler t2 close;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
handler t3 open;
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+ERROR HY000: Can't reopen table: 't3'
# After UNLOCK TABLES handlers should be around and
# we should be able to continue reading through them.
unlock tables;
diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc
index e099d22e3ce..d3134746033 100644
--- a/mysql-test/suite/handler/handler.inc
+++ b/mysql-test/suite/handler/handler.inc
@@ -581,7 +581,7 @@ handler t1 open;
handler t1 read next;
--error ER_LOCK_OR_ACTIVE_TRANSACTION
handler t2 close;
---error ER_LOCK_OR_ACTIVE_TRANSACTION
+--error ER_CANT_REOPEN_TABLE
handler t3 open;
--echo # After UNLOCK TABLES handlers should be around and
--echo # we should be able to continue reading through them.
diff --git a/mysql-test/suite/handler/heap.result b/mysql-test/suite/handler/heap.result
index 55f9fd41c7a..4b5af7afa72 100644
--- a/mysql-test/suite/handler/heap.result
+++ b/mysql-test/suite/handler/heap.result
@@ -582,7 +582,7 @@ select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (a int not null) ENGINE=csv;
--> client 2
handler t1 open;
@@ -741,7 +741,7 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
handler t2 close;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
handler t3 open;
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+ERROR HY000: Can't reopen table: 't3'
# After UNLOCK TABLES handlers should be around and
# we should be able to continue reading through them.
unlock tables;
diff --git a/mysql-test/suite/handler/innodb.result b/mysql-test/suite/handler/innodb.result
index d4103ddd6ff..4338c018052 100644
--- a/mysql-test/suite/handler/innodb.result
+++ b/mysql-test/suite/handler/innodb.result
@@ -583,7 +583,7 @@ select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (a int not null) ENGINE=csv;
--> client 2
handler t1 open;
@@ -743,7 +743,7 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
handler t2 close;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
handler t3 open;
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+ERROR HY000: Can't reopen table: 't3'
# After UNLOCK TABLES handlers should be around and
# we should be able to continue reading through them.
unlock tables;
diff --git a/mysql-test/suite/handler/myisam.result b/mysql-test/suite/handler/myisam.result
index 980b87768da..fcf6d4c133c 100644
--- a/mysql-test/suite/handler/myisam.result
+++ b/mysql-test/suite/handler/myisam.result
@@ -582,7 +582,7 @@ select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (a int not null) ENGINE=csv;
--> client 2
handler t1 open;
@@ -741,7 +741,7 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
handler t2 close;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
handler t3 open;
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+ERROR HY000: Can't reopen table: 't3'
# After UNLOCK TABLES handlers should be around and
# we should be able to continue reading through them.
unlock tables;
diff --git a/mysql-test/suite/innodb/include/restart_and_reinit.inc b/mysql-test/suite/innodb/include/restart_and_reinit.inc
index 207e9c5dc6e..9df66196edf 100644
--- a/mysql-test/suite/innodb/include/restart_and_reinit.inc
+++ b/mysql-test/suite/innodb/include/restart_and_reinit.inc
@@ -6,6 +6,9 @@
source include/not_embedded.inc;
--disable_query_log
+call mtr.add_suppression("InnoDB: New log files created");
+call mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
+
let $innodb_index_stats = query_get_value(show create table mysql.innodb_index_stats, Create Table, 1);
let $innodb_table_stats = query_get_value(show create table mysql.innodb_table_stats, Create Table, 1);
let $database=`select database()`;
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc-44030.result b/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
index 54e972843f5..93e6ede30f2 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
@@ -19,7 +19,9 @@ Table Create Table
t1 CREATE TABLE `t1` (
`d1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`d1`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
+INSERT INTO t1 VALUES(null);
+ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc-56228.result b/mysql-test/suite/innodb/r/innodb-autoinc-56228.result
index 492130d1f08..6a3fd85ebd3 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc-56228.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc-56228.result
@@ -1,9 +1,9 @@
DROP TABLE IF EXISTS t1_56228;
Warnings:
-Note 1051 Unknown table 't1_56228'
+Note 1051 Unknown table 'test.t1_56228'
DROP TABLE IF EXISTS t2_56228;
Warnings:
-Note 1051 Unknown table 't2_56228'
+Note 1051 Unknown table 'test.t2_56228'
DROP FUNCTION IF EXISTS bug56228;
Warnings:
Note 1305 FUNCTION test.bug56228 does not exist
@@ -27,4 +27,4 @@ DROP FUNCTION bug56228;
DROP TEMPORARY TABLE t2_56228;
DROP TEMPORARY TABLE IF EXISTS t1_56228;
Warnings:
-Note 1051 Unknown table 't1_56228'
+Note 1051 Unknown table 'test.t1_56228'
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index c4504f6d348..2ae51b62062 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -171,7 +171,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL, 1);
DELETE FROM t1 WHERE c1 = 1;
@@ -184,7 +184,7 @@ c1 c2
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL, 1);
DELETE FROM t1 WHERE c1 = 1;
@@ -203,7 +203,7 @@ auto_increment_increment 100
auto_increment_offset 10
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL),(5),(NULL);
INSERT INTO t1 VALUES (250),(NULL);
@@ -236,7 +236,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(0);
SELECT * FROM t1;
@@ -275,7 +275,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(-1);
SELECT * FROM t1;
@@ -321,7 +321,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(-1);
Warnings:
@@ -376,7 +376,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(-1);
Warnings:
@@ -425,7 +425,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(NULL);
INSERT INTO t1 VALUES (9223372036854775794);
@@ -458,7 +458,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(NULL);
INSERT INTO t1 VALUES (18446744073709551603);
@@ -486,7 +486,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(NULL);
INSERT INTO t1 VALUES (18446744073709551603);
@@ -514,7 +514,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(NULL);
INSERT INTO t1 VALUES(-9223372036854775806);
@@ -550,7 +550,7 @@ auto_increment_increment 1
auto_increment_offset 1
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES(NULL);
INSERT INTO t1 VALUES (18446744073709551610);
@@ -624,10 +624,10 @@ DROP TABLE t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 (
a INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
b INT(10) UNSIGNED NOT NULL,
@@ -844,10 +844,10 @@ DROP TABLE t1;
DROP TABLE t2;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t1(
c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT
PRIMARY KEY) ENGINE=InnoDB;
@@ -1093,7 +1093,7 @@ c1 c2
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
INSERT INTO t1(C2) VALUES ('innodb');
@@ -1118,7 +1118,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SET c1 = 1;
SHOW CREATE TABLE t1;
@@ -1157,7 +1157,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INTEGER AUTO_INCREMENT, PRIMARY KEY (c1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (-685113344), (1), (NULL), (NULL);
SELECT * FROM t1;
@@ -1240,7 +1240,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (18446744073709551615);
diff --git a/mysql-test/suite/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb/r/innodb-create-options.result
index c32af26c22d..a3dcaee3a10 100644
--- a/mysql-test/suite/innodb/r/innodb-create-options.result
+++ b/mysql-test/suite/innodb/r/innodb-create-options.result
@@ -1,4 +1,4 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_format=`Barracuda`;
SET GLOBAL innodb_file_per_table=ON;
SET SESSION innodb_strict_mode = ON;
@@ -6,14 +6,14 @@ SET SESSION innodb_strict_mode = ON;
# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
# 'FIXED' is sent to InnoDB since it is used by MyISAM.
# But it is an invalid mode in InnoDB
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: invalid ROW_FORMAT specifier.
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -46,11 +46,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: invalid ROW_FORMAT specifier.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact
@@ -61,78 +61,78 @@ CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=8
+t1 Compressed row_format=COMPRESSED key_block_size=2
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=8
+t1 Compressed row_format=COMPRESSED key_block_size=2
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: invalid ROW_FORMAT specifier.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
@@ -146,11 +146,11 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
Level Code Message
@@ -158,35 +158,35 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Redundant row_format=REDUNDANT
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
-ALTER TABLE t1 KEY_BLOCK_SIZE=8;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED
-ALTER TABLE t1 KEY_BLOCK_SIZE=16;
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=16
+t1 Compressed row_format=COMPRESSED key_block_size=1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
@@ -212,23 +212,23 @@ t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
ALTER TABLE t1 ROW_FORMAT=COMPACT;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
Level Code Message
@@ -253,7 +253,7 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
@@ -261,24 +261,24 @@ Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SET GLOBAL innodb_file_format=Antelope;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
@@ -297,35 +297,42 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
Level Code Message
-ALTER TABLE t1 KEY_BLOCK_SIZE=8;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SET GLOBAL innodb_file_format=Barracuda;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
Level Code Message
@@ -339,23 +346,23 @@ SET GLOBAL innodb_file_format=Barracuda;
# values during strict mode.
SET GLOBAL innodb_file_per_table=OFF;
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
@@ -375,23 +382,23 @@ CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
Level Code Message
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
@@ -415,12 +422,8 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_per_table=OFF;
ALTER TABLE t1 ADD COLUMN f1 INT;
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
Level Code Message
@@ -437,10 +440,10 @@ SET SESSION innodb_strict_mode = OFF;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
Warnings:
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=FIXED
@@ -477,10 +480,10 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
Warnings:
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=FIXED
@@ -489,70 +492,70 @@ t1 Compact row_format=FIXED
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT key_block_size=1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Redundant row_format=REDUNDANT key_block_size=2
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC key_block_size=4
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=8
+t1 Compressed row_format=COMPRESSED key_block_size=2
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=8
+t1 Compressed row_format=COMPRESSED key_block_size=2
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=FIXED key_block_size=1
@@ -560,10 +563,10 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT key_block_size=2
@@ -571,32 +574,32 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC key_block_size=4
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=8
+t1 Redundant row_format=REDUNDANT key_block_size=2
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=16
+t1 Compressed key_block_size=1
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
@@ -611,28 +614,28 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT key_block_size=2
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Redundant row_format=REDUNDANT key_block_size=2
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC key_block_size=2
@@ -650,23 +653,23 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED key_block_size=4
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=8
+t1 Compressed key_block_size=2
# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
# ALTER with each ROW_FORMAT
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
Level Code Message
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
@@ -675,40 +678,40 @@ Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL,
`f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
ALTER TABLE t1 ROW_FORMAT=COMPACT;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT key_block_size=16
+t1 Compact row_format=COMPACT key_block_size=1
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=16
+t1 Redundant row_format=REDUNDANT key_block_size=1
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC key_block_size=16
+t1 Dynamic row_format=DYNAMIC key_block_size=1
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=16
+t1 Compressed row_format=COMPRESSED key_block_size=1
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
Level Code Message
@@ -721,14 +724,15 @@ Level Code Message
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPACT
-# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8
+# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
+# it defaults to half of the page size.
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=15.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=15.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact key_block_size=15
@@ -745,16 +749,16 @@ t1 Compressed row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=COMPRESSED key_block_size=1
@@ -775,12 +779,12 @@ t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Antelope;
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compact row_format=DYNAMIC
@@ -803,20 +807,11 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED key_block_size=2
SET GLOBAL innodb_file_per_table=OFF;
ALTER TABLE t1 ADD COLUMN f1 INT;
-Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=2.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPRESSED key_block_size=2
+t1 Compressed row_format=COMPRESSED key_block_size=2
SET GLOBAL innodb_file_per_table=ON;
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
@@ -833,16 +828,11 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_per_table=OFF;
ALTER TABLE t1 ADD COLUMN f1 INT;
-Warnings:
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
SHOW WARNINGS;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=DYNAMIC
+t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_per_table=ON;
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index 9130b3a4ef2..d9242e8ee33 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -1,125 +1,12 @@
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
-CREATE TABLE t1_purge (
-A INT,
-B BLOB, C BLOB, D BLOB, E BLOB,
-F BLOB, G BLOB, H BLOB,
-PRIMARY KEY (B(767), C(767), D(767), E(767), A),
-INDEX (A)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-INSERT INTO t1_purge VALUES (1,
-REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
-REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
-CREATE TABLE t2_purge (
-A INT PRIMARY KEY,
-B BLOB, C BLOB, D BLOB, E BLOB,
-F BLOB, G BLOB, H BLOB, I BLOB,
-J BLOB, K BLOB, L BLOB,
-INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-INSERT INTO t2_purge VALUES (1,
-REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
-REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
-REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
-CREATE TABLE t3_purge (
-A INT,
-B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
-F VARCHAR(800), G VARCHAR(800), H VARCHAR(800),
-PRIMARY KEY (B(767), C(767), D(767), E(767), A),
-INDEX (A)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-INSERT INTO t3_purge SELECT * FROM t1_purge;
-CREATE TABLE t4_purge (
-A INT PRIMARY KEY,
-B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
-F VARCHAR(800), G VARCHAR(800), H VARCHAR(800), I VARCHAR(800),
-J VARCHAR(800), K VARCHAR(800), L VARCHAR(800),
-INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-INSERT INTO t4_purge SELECT * FROM t2_purge;
-DELETE FROM t1_purge;
-DELETE FROM t2_purge;
-DELETE FROM t3_purge;
-DELETE FROM t4_purge;
-SET @r=REPEAT('a',500);
-CREATE TABLE t12637786(a INT,
-v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
-v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
-v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
-v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
-v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
-v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-CREATE INDEX idx1 ON t12637786(a,v1);
-INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
-UPDATE t12637786 SET a=1000;
-DELETE FROM t12637786;
-create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
-i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
-engine=innodb row_format=dynamic;
-SET @r = repeat('a', 767);
-insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
-create index ndx_a on t12963823 (a(500));
-create index ndx_b on t12963823 (b(500));
-create index ndx_c on t12963823 (c(500));
-create index ndx_d on t12963823 (d(500));
-create index ndx_e on t12963823 (e(500));
-create index ndx_f on t12963823 (f(500));
-create index ndx_k on t12963823 (k(500));
-create index ndx_l on t12963823 (l(500));
-SET @r = repeat('b', 500);
-update t12963823 set a=@r,b=@r,c=@r,d=@r;
-update t12963823 set e=@r,f=@r,g=@r,h=@r;
-update t12963823 set i=@r,j=@r,k=@r,l=@r;
-update t12963823 set m=@r,n=@r,o=@r,p=@r;
-alter table t12963823 drop index ndx_a;
-alter table t12963823 drop index ndx_b;
-create index ndx_g on t12963823 (g(500));
-create index ndx_h on t12963823 (h(500));
-create index ndx_i on t12963823 (i(500));
-create index ndx_j on t12963823 (j(500));
-create index ndx_m on t12963823 (m(500));
-create index ndx_n on t12963823 (n(500));
-create index ndx_o on t12963823 (o(500));
-create index ndx_p on t12963823 (p(500));
-show create table t12963823;
-Table Create Table
-t12963823 CREATE TABLE `t12963823` (
- `a` blob,
- `b` blob,
- `c` blob,
- `d` blob,
- `e` blob,
- `f` blob,
- `g` blob,
- `h` blob,
- `i` blob,
- `j` blob,
- `k` blob,
- `l` blob,
- `m` blob,
- `n` blob,
- `o` blob,
- `p` blob,
- KEY `ndx_c` (`c`(500)),
- KEY `ndx_d` (`d`(500)),
- KEY `ndx_e` (`e`(500)),
- KEY `ndx_f` (`f`(500)),
- KEY `ndx_k` (`k`(500)),
- KEY `ndx_l` (`l`(500)),
- KEY `ndx_g` (`g`(500)),
- KEY `ndx_h` (`h`(500)),
- KEY `ndx_i` (`i`(500)),
- KEY `ndx_j` (`j`(500)),
- KEY `ndx_m` (`m`(500)),
- KEY `ndx_n` (`n`(500)),
- KEY `ndx_o` (`o`(500)),
- KEY `ndx_p` (`p`(500))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
create table t1(a varchar(2) primary key) engine=innodb;
insert into t1 values('');
create index t1a1 on t1(a(1));
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
drop table t1;
-set global innodb_file_per_table=0;
-set global innodb_file_format=Antelope;
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
@@ -128,6 +15,8 @@ ERROR 42000: Duplicate key name 'b'
alter table t1 add index (b,b);
ERROR 42S21: Duplicate column name 'b'
alter table t1 add index d2 (d);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -137,6 +26,7 @@ t1 CREATE TABLE `t1` (
`d` varchar(20) DEFAULT NULL,
KEY `d2` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+analyze table t1;
explain select * from t1 force index(d2) order by d;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL d2 23 NULL 4
@@ -158,6 +48,8 @@ t1 CREATE TABLE `t1` (
KEY `d2` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 add index (b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -169,6 +61,8 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 add unique index (c), add index (d);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -181,10 +75,15 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`),
KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL c 10 NULL 4
alter table t1 add primary key (a), drop index c;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -197,11 +96,14 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`),
KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
alter table t1 add primary key (c);
ERROR 42000: Multiple primary key defined
alter table t1 drop primary key, add primary key (b);
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
create unique index c on t1 (c);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -215,6 +117,9 @@ t1 CREATE TABLE `t1` (
KEY `b` (`b`),
KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL c 10 NULL 4
@@ -225,6 +130,8 @@ a b c d
5 5 oo oo
4 4 tr tr
alter table t1 drop index b, add index (b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -235,8 +142,8 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`),
UNIQUE KEY `c` (`c`),
KEY `d2` (`d`),
- KEY `d` (`d`),
- KEY `b` (`b`)
+ KEY `b` (`b`),
+ KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values(6,1,'ggg','ggg');
select * from t1;
@@ -267,6 +174,7 @@ a b c d
6 1 ggg ggg
5 5 oo oo
4 4 tr tr
+analyze table t1;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 5 NULL 5
@@ -286,14 +194,16 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`),
UNIQUE KEY `c` (`c`),
KEY `d2` (`d`),
- KEY `d` (`d`),
- KEY `b` (`b`)
+ KEY `b` (`b`),
+ KEY `d` (`d`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ad','ad'),(4,4,'afe','afe');
commit;
alter table t1 add index (c(2));
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -304,7 +214,10 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`),
KEY `c` (`c`(2))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
alter table t1 add unique index (d(10));
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -316,7 +229,9 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `d` (`d`(10)),
KEY `c` (`c`(2))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
insert into t1 values(5,1,'ggg','ggg');
+analyze table t1;
select * from t1;
a b c d
1 1 ab ab
@@ -359,6 +274,8 @@ t1 CREATE TABLE `t1` (
KEY `c` (`c`(2))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 drop index d;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values(8,9,'fff','fff');
select * from t1;
a b c d
@@ -376,6 +293,7 @@ a b c d
4 4 afe afe
8 9 fff fff
5 1 ggg ggg
+analyze table t1;
explain select * from t1 order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort
@@ -400,6 +318,8 @@ create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
commit;
alter table t1 add unique index (b,c);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values(8,9,'fff','fff');
select * from t1;
a b c d
@@ -415,6 +335,7 @@ a b c d
3 2 ad ad
4 4 afe afe
8 9 fff fff
+analyze table t1;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 16 NULL 5
@@ -429,6 +350,8 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `b` (`b`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 add index (b,c);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values(11,11,'kkk','kkk');
select * from t1;
a b c d
@@ -446,6 +369,7 @@ a b c d
4 4 afe afe
8 9 fff fff
11 11 kkk kkk
+analyze table t1;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 16 NULL 6
@@ -461,6 +385,8 @@ t1 CREATE TABLE `t1` (
KEY `b_2` (`b`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 add unique index (c,d);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values(13,13,'yyy','aaa');
select * from t1;
a b c d
@@ -489,6 +415,7 @@ a b c d
8 9 fff fff
11 11 kkk kkk
13 13 yyy aaa
+analyze table t1;
explain select * from t1 force index(b) order by b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL b 16 NULL 7
@@ -511,9 +438,9 @@ drop table t1;
create table t1(a int not null, b int not null, c int, primary key (a), key (b)) engine = innodb;
create table t3(a int not null, c int not null, d int, primary key (a), key (c)) engine = innodb;
create table t4(a int not null, d int not null, e int, primary key (a), key (d)) engine = innodb;
-create table t2(a int not null, b int not null, c int not null, d int not null, e int,
-foreign key (b) references t1(b) on delete cascade,
-foreign key (c) references t3(c), foreign key (d) references t4(d))
+create table t2(a int not null, b int, c int, d int, e int,
+foreign key (b) references t1(b) on delete set null,
+foreign key (c) references t3(c), foreign key (d) references t4(d) on update set null)
engine = innodb;
alter table t1 drop index b;
ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
@@ -525,15 +452,49 @@ alter table t2 drop index b;
ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
alter table t2 drop index b, drop index c, drop index d;
ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
+alter table t2 MODIFY b INT NOT NULL, ALGORITHM=COPY;
+ERROR HY000: Cannot change column 'b': used in a foreign key constraint 't2_ibfk_1'
+set @old_sql_mode = @@sql_mode;
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+alter table t2 MODIFY b INT NOT NULL, ALGORITHM=INPLACE;
+ERROR HY000: Column 'b' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
+set @@sql_mode = @old_sql_mode;
+SET FOREIGN_KEY_CHECKS=0;
+alter table t2 DROP COLUMN b, ALGORITHM=COPY;
+ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1'
+alter table t2 DROP COLUMN b;
+ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 'test/t2_ibfk_1'
+alter table t1 DROP COLUMN b, ALGORITHM=COPY;
+ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1' of table 'test.t2'
+alter table t1 DROP COLUMN b;
+ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 'test/t2_ibfk_1' of table '"test"."t2"'
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
create unique index dc on t2 (d,c);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
create index dc on t1 (b,c);
-alter table t2 add primary key (a);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+alter table t2 add primary key (alpha), change a alpha int,
+change b beta int not null, change c charlie int not null;
+ERROR HY000: Column 'b' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
+alter table t2 add primary key (alpha), change a alpha int,
+change c charlie int not null, change d delta int not null;
+ERROR HY000: Column 'd' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_3' SET NULL
+alter table t2 add primary key (alpha), change a alpha int,
+change b beta int, modify c int not null;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+set @@sql_mode = @old_sql_mode;
insert into t1 values (1,1,1);
insert into t3 values (1,1,1);
insert into t4 values (1,1,1);
insert into t2 values (1,1,1,1,1);
commit;
alter table t4 add constraint dc foreign key (a) references t1(a);
+affected rows: 1
+info: Records: 1 Duplicates: 0 Warnings: 0
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
@@ -546,6 +507,10 @@ t4 CREATE TABLE `t4` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t3 add constraint dc foreign key (a) references t1(a);
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
+SET FOREIGN_KEY_CHECKS=0;
+alter table t3 add constraint dc foreign key (a) references t1(a);
+ERROR HY000: Failed to add the foreign key constraint 'test/dc' to system tables
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
@@ -555,37 +520,41 @@ t3 CREATE TABLE `t3` (
PRIMARY KEY (`a`),
KEY `c` (`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-alter table t2 drop index b, add index (b);
-ERROR 42000: Incorrect index name 'b'
+alter table t2 drop index b, add index (beta);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` int(11) NOT NULL,
- `b` int(11) NOT NULL,
+ `alpha` int(11) NOT NULL DEFAULT '0',
+ `beta` int(11) DEFAULT NULL,
`c` int(11) NOT NULL,
- `d` int(11) NOT NULL,
+ `d` int(11) DEFAULT NULL,
`e` int(11) DEFAULT NULL,
- PRIMARY KEY (`a`),
+ PRIMARY KEY (`alpha`),
UNIQUE KEY `dc` (`d`,`c`),
- KEY `b` (`b`),
KEY `c` (`c`),
- CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`b`) ON DELETE CASCADE,
+ KEY `beta` (`beta`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`beta`) REFERENCES `t1` (`b`) ON DELETE SET NULL,
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t3` (`c`),
- CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`d`) REFERENCES `t4` (`d`)
+ CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`d`) REFERENCES `t4` (`d`) ON UPDATE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
delete from t1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
drop index dc on t4;
ERROR 42000: Can't DROP 'dc'; check that column/key exists
alter table t3 drop foreign key dc;
-ERROR HY000: Error on rename of './test/t3' to '#sql2-temporary' (errno: 152 "Cannot delete a parent row")
+ERROR 42000: Can't DROP 'dc'; check that column/key exists
alter table t4 drop foreign key dc;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
select * from t2;
-a b c d e
+alpha beta c d e
1 1 1 1 1
delete from t1;
select * from t2;
-a b c d e
+alpha beta c d e
+1 NULL 1 1 1
drop table t2,t4,t3,t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=utf8;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
@@ -759,6 +728,8 @@ drop table t1;
create table t1(a int not null, b int not null, c int, primary key (a), key(c)) engine=innodb;
insert into t1 values (5,1,5),(4,2,4),(3,3,3),(2,4,2),(1,5,1);
alter table t1 add unique index (b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values (10,20,20),(11,19,19),(12,18,18),(13,17,17);
show create table t1;
Table Create Table
@@ -773,6 +744,7 @@ t1 CREATE TABLE `t1` (
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+analyze table t1;
explain select * from t1 force index(c) order by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL c 5 NULL 9
@@ -819,6 +791,8 @@ drop table t1;
create table t1(a int not null, b int not null) engine=innodb;
insert into t1 values (1,1);
alter table t1 add primary key(b);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values (2,2);
show create table t1;
Table Create Table
@@ -834,6 +808,9 @@ select * from t1;
a b
1 1
2 2
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
@@ -850,6 +827,8 @@ drop table t1;
create table t1(a int not null) engine=innodb;
insert into t1 values (1);
alter table t1 add primary key(a);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
insert into t1 values (2);
show create table t1;
Table Create Table
@@ -865,6 +844,9 @@ select * from t1;
a
1
2
+analyze table t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
explain select * from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
@@ -872,188 +854,11 @@ explain select * from t1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
drop table t1;
-create table t2(d varchar(17) primary key) engine=innodb default charset=utf8;
-create table t3(a int primary key) engine=innodb;
-insert into t3 values(22),(44),(33),(55),(66);
-insert into t2 values ('jejdkrun87'),('adfd72nh9k'),
-('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik');
-create table t1(a int, b blob, c text, d text not null)
-engine=innodb default charset = utf8;
-insert into t1
-select a,left(repeat(d,100*a),65535),repeat(d,20*a),d from t2,t3;
-drop table t2, t3;
-select count(*) from t1 where a=44;
-count(*)
-5
-select a,
-length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a),d from t1;
-a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a) d
-22 22000 1 4400 1 adfd72nh9k
-22 35200 1 7040 1 adfdijn0loKNHJik
-22 28600 1 5720 1 adfdijnmnb78k
-22 26400 1 5280 1 adfdpplkeock
-22 22000 1 4400 1 jejdkrun87
-33 33000 1 6600 1 adfd72nh9k
-33 52800 1 10560 1 adfdijn0loKNHJik
-33 42900 1 8580 1 adfdijnmnb78k
-33 39600 1 7920 1 adfdpplkeock
-33 33000 1 6600 1 jejdkrun87
-44 44000 1 8800 1 adfd72nh9k
-44 65535 1 14080 1 adfdijn0loKNHJik
-44 57200 1 11440 1 adfdijnmnb78k
-44 52800 1 10560 1 adfdpplkeock
-44 44000 1 8800 1 jejdkrun87
-55 55000 1 11000 1 adfd72nh9k
-55 65535 1 17600 1 adfdijn0loKNHJik
-55 65535 1 14300 1 adfdijnmnb78k
-55 65535 1 13200 1 adfdpplkeock
-55 55000 1 11000 1 jejdkrun87
-66 65535 1 13200 1 adfd72nh9k
-66 65535 1 21120 1 adfdijn0loKNHJik
-66 65535 1 17160 1 adfdijnmnb78k
-66 65535 1 15840 1 adfdpplkeock
-66 65535 1 13200 1 jejdkrun87
-alter table t1 add primary key (a), add key (b(20));
-ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
-delete from t1 where a%2;
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-alter table t1 add primary key (a,b(255),c(255)), add key (b(767));
-select count(*) from t1 where a=44;
-count(*)
-5
-select a,
-length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a),d from t1;
-a length(b) b=left(repeat(d,100*a),65535) length(c) c=repeat(d,20*a) d
-22 22000 1 4400 1 adfd72nh9k
-22 35200 1 7040 1 adfdijn0loKNHJik
-22 28600 1 5720 1 adfdijnmnb78k
-22 26400 1 5280 1 adfdpplkeock
-22 22000 1 4400 1 jejdkrun87
-44 44000 1 8800 1 adfd72nh9k
-44 65535 1 14080 1 adfdijn0loKNHJik
-44 57200 1 11440 1 adfdijnmnb78k
-44 52800 1 10560 1 adfdpplkeock
-44 44000 1 8800 1 jejdkrun87
-66 65535 1 13200 1 adfd72nh9k
-66 65535 1 21120 1 adfdijn0loKNHJik
-66 65535 1 17160 1 adfdijnmnb78k
-66 65535 1 15840 1 adfdpplkeock
-66 65535 1 13200 1 jejdkrun87
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT '0',
- `b` blob NOT NULL,
- `c` text NOT NULL,
- `d` text NOT NULL,
- PRIMARY KEY (`a`,`b`(255),`c`(255)),
- KEY `b` (`b`(767))
-) ENGINE=InnoDB DEFAULT CHARSET=utf8
-check table t1;
-Table Op Msg_type Msg_text
-test.t1 check status OK
-explain select * from t1 where b like 'adfd%';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range b b 769 NULL 11 Using where
-drop table t1;
-set global innodb_file_per_table=on;
-set global innodb_file_format='Barracuda';
-create table t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
-i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob,
-q blob,r blob,s blob,t blob,u blob)
-engine=innodb row_format=dynamic;
-create index t1a on t1 (a(767));
-create index t1b on t1 (b(767));
-create index t1c on t1 (c(767));
-create index t1d on t1 (d(767));
-create index t1e on t1 (e(767));
-create index t1f on t1 (f(767));
-create index t1g on t1 (g(767));
-create index t1h on t1 (h(767));
-create index t1i on t1 (i(767));
-create index t1j on t1 (j(767));
-create index t1k on t1 (k(767));
-create index t1l on t1 (l(767));
-create index t1m on t1 (m(767));
-create index t1n on t1 (n(767));
-create index t1o on t1 (o(767));
-create index t1p on t1 (p(767));
-create index t1q on t1 (q(767));
-create index t1r on t1 (r(767));
-create index t1s on t1 (s(767));
-create index t1t on t1 (t(767));
-create index t1u on t1 (u(767));
-ERROR HY000: Too big row
-create index t1ut on t1 (u(767), t(767));
-ERROR HY000: Too big row
-create index t1st on t1 (s(767), t(767));
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` blob,
- `b` blob,
- `c` blob,
- `d` blob,
- `e` blob,
- `f` blob,
- `g` blob,
- `h` blob,
- `i` blob,
- `j` blob,
- `k` blob,
- `l` blob,
- `m` blob,
- `n` blob,
- `o` blob,
- `p` blob,
- `q` blob,
- `r` blob,
- `s` blob,
- `t` blob,
- `u` blob,
- KEY `t1a` (`a`(767)),
- KEY `t1b` (`b`(767)),
- KEY `t1c` (`c`(767)),
- KEY `t1d` (`d`(767)),
- KEY `t1e` (`e`(767)),
- KEY `t1f` (`f`(767)),
- KEY `t1g` (`g`(767)),
- KEY `t1h` (`h`(767)),
- KEY `t1i` (`i`(767)),
- KEY `t1j` (`j`(767)),
- KEY `t1k` (`k`(767)),
- KEY `t1l` (`l`(767)),
- KEY `t1m` (`m`(767)),
- KEY `t1n` (`n`(767)),
- KEY `t1o` (`o`(767)),
- KEY `t1p` (`p`(767)),
- KEY `t1q` (`q`(767)),
- KEY `t1r` (`r`(767)),
- KEY `t1s` (`s`(767)),
- KEY `t1t` (`t`(767)),
- KEY `t1st` (`s`(767),`t`(767))
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
-create index t1u on t1 (u(767));
-ERROR HY000: Too big row
-alter table t1 row_format=compact;
-create index t1u on t1 (u(767));
-drop table t1;
-CREATE TABLE bug12547647(
-a INT NOT NULL, b BLOB NOT NULL, c TEXT,
-PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7751));
-COMMIT;
-UPDATE bug12547647 SET c = REPEAT('b',16928);
-ERROR HY000: Undo log record is too big.
-DROP TABLE bug12547647;
-set global innodb_file_per_table=0;
+set global innodb_file_per_table=1;
set global innodb_file_format=Antelope;
set global innodb_file_format_max=Antelope;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
-SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
+SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
c1 BIGINT(12) NOT NULL,
PRIMARY KEY (c1)
@@ -1102,8 +907,10 @@ c2 BIGINT(12) NOT NULL,
c3 BIGINT(12) NOT NULL,
PRIMARY KEY (c1,c2,c3)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3) REFERENCES t1(c1);
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1144,21 +951,44 @@ c2 BIGINT(12) NOT NULL,
c3 BIGINT(12) NOT NULL,
PRIMARY KEY (c1)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+SET FOREIGN_KEY_CHECKS=0;
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
+ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
+ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
-ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t2 DROP FOREIGN KEY fk_t2_ca;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
-FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
+FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
+ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
+affected rows: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1166,6 +996,7 @@ t1 CREATE TABLE `t1` (
`c2` bigint(12) NOT NULL,
PRIMARY KEY (`c2`,`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1176,7 +1007,10 @@ t2 CREATE TABLE `t2` (
KEY `fk_t2_ca` (`c3`,`c2`),
CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
CREATE INDEX i_t2_c2_c1 ON t2(c2, c1);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1188,7 +1022,10 @@ t2 CREATE TABLE `t2` (
KEY `i_t2_c2_c1` (`c2`,`c1`),
CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
CREATE INDEX i_t2_c3_c1_c2 ON t2(c3, c1, c2);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1201,7 +1038,10 @@ t2 CREATE TABLE `t2` (
KEY `i_t2_c3_c1_c2` (`c3`,`c1`,`c2`),
CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
CREATE INDEX i_t2_c3_c2 ON t2(c3, c2);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1214,11 +1054,131 @@ t2 CREATE TABLE `t2` (
KEY `i_t2_c3_c2` (`c3`,`c2`),
CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
+affected rows: 1
DROP TABLE t2;
DROP TABLE t1;
-SELECT SLEEP(10);
-SLEEP(10)
-0
-DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
-DROP TABLE t12637786;
-DROP TABLE t12963823;
+CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
+CREATE TABLE t2 (a INT, b CHAR(1)) ENGINE=InnoDB;
+CREATE TABLE t2i (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
+CREATE TABLE t2c (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t2 SELECT * FROM t1;
+INSERT INTO t2i SELECT * FROM t1;
+INSERT INTO t2c SELECT * FROM t1;
+BEGIN;
+SELECT * FROM t1;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+SET lock_wait_timeout=1;
+CREATE INDEX t1a ON t1(a);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+CREATE INDEX t2a ON t2(a);
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+set @old_sql_mode = @@sql_mode;
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+ALTER TABLE t2i ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=INPLACE;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+set @@sql_mode = @old_sql_mode;
+ALTER TABLE t2c ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=COPY;
+affected rows: 5
+info: Records: 5 Duplicates: 0 Warnings: 0
+SELECT * FROM t2i;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2c;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+ERROR HY000: Table definition has changed, please retry transaction
+SELECT * FROM t2;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+COMMIT;
+SELECT * FROM t2;
+a b
+3 a
+3 b
+1 c
+0 d
+1 e
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+SELECT * FROM t2i;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+SELECT * FROM t2c;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
+a b
+0 d
+1 c
+1 e
+3 a
+3 b
+alter table t2 add index t2a(b);
+ERROR 42000: Duplicate key name 't2a'
+alter table t2 drop index t2a, add index t2a(b);
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` char(1) DEFAULT NULL,
+ KEY `t2a` (`b`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+show create table t2i;
+Table Create Table
+t2i CREATE TABLE `t2i` (
+ `a` int(11) NOT NULL DEFAULT '0',
+ `b` char(1) NOT NULL,
+ PRIMARY KEY (`a`,`b`),
+ KEY `t2a` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+show create table t2c;
+Table Create Table
+t2c CREATE TABLE `t2c` (
+ `a` int(11) NOT NULL DEFAULT '0',
+ `b` char(1) NOT NULL,
+ PRIMARY KEY (`a`,`b`),
+ KEY `t2a` (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE t1,t2,t2c,t2i;
diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result
index 69e463a4390..95a3142068b 100644
--- a/mysql-test/suite/innodb/r/innodb-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-zip.result
@@ -5,62 +5,64 @@ SELECT table_name, row_format, data_length, index_length
FROM information_schema.tables
WHERE table_schema='mysqltest_innodb_zip';
table_name row_format data_length index_length
+SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
+SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
Warnings:
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=4.
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t1(a int primary key) engine=innodb row_format=dynamic;
Warnings:
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t2(a int primary key) engine=innodb row_format=redundant;
create table t3(a int primary key) engine=innodb row_format=compact;
create table t4(a int primary key) engine=innodb key_block_size=9;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=9.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
create table t5(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_per_table=on;
create table t6(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
set global innodb_file_format=`1`;
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t8(a int primary key) engine=innodb
key_block_size=1 row_format=fixed;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t10(a int primary key) engine=innodb
key_block_size=1 row_format=dynamic;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
create table t11(a int primary key) engine=innodb
key_block_size=1 row_format=compressed;
create table t12(a int primary key) engine=innodb
@@ -69,43 +71,39 @@ create table t13(a int primary key) engine=innodb
row_format=compressed;
create table t14(a int primary key) engine=innodb key_block_size=9;
Warnings:
-Warning 140 InnoDB: ignoring KEY_BLOCK_SIZE=9.
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9.
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t0 Compact 16384 0
-mysqltest_innodb_zip t00 Compact 16384 0
-mysqltest_innodb_zip t1 Compact 16384 0
-mysqltest_innodb_zip t10 Dynamic 16384 0
+mysqltest_innodb_zip t0 Compact {valid} 0
+mysqltest_innodb_zip t00 Compact {valid} 0
+mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t10 Dynamic {valid} 0
mysqltest_innodb_zip t11 Compressed 1024 0
mysqltest_innodb_zip t12 Compressed 1024 0
-mysqltest_innodb_zip t13 Compressed 8192 0
-mysqltest_innodb_zip t14 Compact 16384 0
-mysqltest_innodb_zip t2 Redundant 16384 0
-mysqltest_innodb_zip t3 Compact 16384 0
-mysqltest_innodb_zip t4 Compact 16384 0
-mysqltest_innodb_zip t5 Redundant 16384 0
-mysqltest_innodb_zip t6 Redundant 16384 0
-mysqltest_innodb_zip t7 Redundant 16384 0
-mysqltest_innodb_zip t8 Compact 16384 0
-mysqltest_innodb_zip t9 Compact 16384 0
+mysqltest_innodb_zip t13 Compressed {valid} 0
+mysqltest_innodb_zip t14 Compact {valid} 0
+mysqltest_innodb_zip t2 Redundant {valid} 0
+mysqltest_innodb_zip t3 Compact {valid} 0
+mysqltest_innodb_zip t4 Compact {valid} 0
+mysqltest_innodb_zip t5 Redundant {valid} 0
+mysqltest_innodb_zip t6 Redundant {valid} 0
+mysqltest_innodb_zip t7 Redundant {valid} 0
+mysqltest_innodb_zip t8 Compact {valid} 0
+mysqltest_innodb_zip t9 Compact {valid} 0
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
alter table t1 row_format=dynamic;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Dynamic 16384 0
+mysqltest_innodb_zip t1 Dynamic {valid} 0
alter table t1 row_format=compact;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Compact 16384 0
+mysqltest_innodb_zip t1 Compact {valid} 0
alter table t1 row_format=redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Redundant 16384 0
+mysqltest_innodb_zip t1 Redundant {valid} 0
drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb
key_block_size=1;
@@ -122,35 +120,17 @@ rollback;
select a,left(b,40) from t1 natural join t2;
a left(b,40)
1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+analyze table t1;
+Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t1 analyze status OK
+analyze table t2;
+Table Op Msg_type Msg_text
+mysqltest_innodb_zip.t2 analyze status OK
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
mysqltest_innodb_zip t1 Compressed 2048 1024
-mysqltest_innodb_zip t2 Compact 16384 0
+mysqltest_innodb_zip t2 Compact {valid} 0
drop table t1,t2;
-SET SESSION innodb_strict_mode = off;
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE t1(
-c TEXT NOT NULL, d TEXT NOT NULL,
-PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
-drop table t1;
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
-DROP TABLE t1;
create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
primary key(c1, c2(22), c3(22)))
engine = innodb row_format = dynamic;
@@ -203,139 +183,119 @@ create table t2 (id int primary key) engine = innodb key_block_size = 9;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
create table t3 (id int primary key) engine = innodb key_block_size = 1;
create table t4 (id int primary key) engine = innodb key_block_size = 2;
create table t5 (id int primary key) engine = innodb key_block_size = 4;
-create table t6 (id int primary key) engine = innodb key_block_size = 8;
-create table t7 (id int primary key) engine = innodb key_block_size = 16;
create table t8 (id int primary key) engine = innodb row_format = compressed;
create table t9 (id int primary key) engine = innodb row_format = dynamic;
create table t10(id int primary key) engine = innodb row_format = compact;
create table t11(id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Compact 16384 0
-mysqltest_innodb_zip t10 Compact 16384 0
-mysqltest_innodb_zip t11 Redundant 16384 0
+mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t10 Compact {valid} 0
+mysqltest_innodb_zip t11 Redundant {valid} 0
mysqltest_innodb_zip t3 Compressed 1024 0
-mysqltest_innodb_zip t4 Compressed 2048 0
-mysqltest_innodb_zip t5 Compressed 4096 0
-mysqltest_innodb_zip t6 Compressed 8192 0
-mysqltest_innodb_zip t7 Compressed 16384 0
-mysqltest_innodb_zip t8 Compressed 8192 0
-mysqltest_innodb_zip t9 Dynamic 16384 0
-drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
+mysqltest_innodb_zip t4 Compressed {valid} 0
+mysqltest_innodb_zip t5 Compressed {valid} 0
+mysqltest_innodb_zip t8 Compressed {valid} 0
+mysqltest_innodb_zip t9 Dynamic {valid} 0
+drop table t1, t3, t4, t5, t8, t9, t10, t11;
create table t1 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compressed;
+key_block_size = 4 row_format = compressed;
create table t2 (id int primary key) engine = innodb
-key_block_size = 8 row_format = redundant;
+key_block_size = 4 row_format = redundant;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
create table t3 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compact;
+key_block_size = 4 row_format = compact;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
create table t4 (id int primary key) engine = innodb
-key_block_size = 8 row_format = dynamic;
+key_block_size = 4 row_format = dynamic;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
create table t5 (id int primary key) engine = innodb
-key_block_size = 8 row_format = default;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+key_block_size = 4 row_format = default;
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Compressed 8192 0
-mysqltest_innodb_zip t5 Compressed 8192 0
+mysqltest_innodb_zip t1 Compressed 4096 0
+mysqltest_innodb_zip t5 Compressed 4096 0
drop table t1, t5;
create table t1 (id int primary key) engine = innodb
key_block_size = 9 row_format = redundant;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 140 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = compact;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 140 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = dynamic;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Warning 140 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
+Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
+Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
set global innodb_file_per_table = off;
create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
create table t2 (id int primary key) engine = innodb key_block_size = 2;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
create table t3 (id int primary key) engine = innodb key_block_size = 4;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
-show warnings;
-Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t5` (errno: 140 "Wrong create options")
-show warnings;
-Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table `mysqltest_innodb_zip`.`t5` (errno: 140 "Wrong create options")
create table t6 (id int primary key) engine = innodb row_format = compressed;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
create table t7 (id int primary key) engine = innodb row_format = dynamic;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t8 Compact 16384 0
-mysqltest_innodb_zip t9 Redundant 16384 0
+mysqltest_innodb_zip t8 Compact {valid} 0
+mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
@@ -343,53 +303,40 @@ create table t1 (id int primary key) engine = innodb key_block_size = 1;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t1` (errno: 140 "Wrong create options")
create table t2 (id int primary key) engine = innodb key_block_size = 2;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t2` (errno: 140 "Wrong create options")
create table t3 (id int primary key) engine = innodb key_block_size = 4;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t3` (errno: 140 "Wrong create options")
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
-ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
-show warnings;
-Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table `mysqltest_innodb_zip`.`t4` (errno: 140 "Wrong create options")
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
-ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t5` (errno: 140 "Wrong create options")
-show warnings;
-Level Code Message
-Warning 140 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table `mysqltest_innodb_zip`.`t5` (errno: 140 "Wrong create options")
create table t6 (id int primary key) engine = innodb row_format = compressed;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
create table t7 (id int primary key) engine = innodb row_format = dynamic;
ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 140 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t8 Compact 16384 0
-mysqltest_innodb_zip t9 Redundant 16384 0
+mysqltest_innodb_zip t8 Compact {valid} 0
+mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
-set global innodb_file_per_table=0;
+set global innodb_file_per_table=1;
set global innodb_file_format=Antelope;
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
@@ -402,7 +349,7 @@ select @@innodb_file_format_max;
Antelope
create table zip_table (
c1 int
-) engine = innodb key_block_size = 8;
+) engine = innodb key_block_size = 4;
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index da5f77fcdca..c67a200d513 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -696,8 +696,6 @@ select count(*) from t1 where sca_pic is null;
count(*)
2
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
-alter table t1 drop index sca_pic;
-alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*)
1
@@ -705,9 +703,6 @@ select count(*) from t1 where cat_code='E';
count(*)
0
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
-ERROR 42000: Incorrect index name 'sca_pic'
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
select count(*) from t1 where sca_code='PD' and sca_pic is null;
count(*)
1
@@ -1696,7 +1691,7 @@ variable_value - @innodb_rows_deleted_orig
71
SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
variable_value - @innodb_rows_inserted_orig
-1071
+1007
SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
variable_value - @innodb_rows_updated_orig
866
@@ -2261,7 +2256,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings:
-Warning 140 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2977,8 +2972,11 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
+set @old_sql_mode = @@sql_mode;
+set @@sql_mode = 'STRICT_TRANS_TABLES';
ALTER TABLE t2 MODIFY a INT NOT NULL;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150 "Foreign key constraint is incorrectly formed")
+ERROR HY000: Column 'a' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
+set @@sql_mode = @old_sql_mode;
DELETE FROM t1;
DROP TABLE t2,t1;
CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
@@ -3029,7 +3027,7 @@ c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(
id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE=InnoDB;
@@ -3048,8 +3046,8 @@ SET TX_ISOLATION='read-committed';
SET AUTOCOMMIT=0;
DROP TABLE IF EXISTS t1, t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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_bug14007649.result b/mysql-test/suite/innodb/r/innodb_bug14007649.result
index 8338c7b2ba2..50de5868be4 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14007649.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14007649.result
@@ -39,17 +39,18 @@ update t1 set f2 = 6 where f1 = 1 and f2 is null;
(a) Number of rows updated:
select row_count();
row_count()
-0
+1
(a) After the update statement is executed.
select rowid, f1, f2 from t1;
rowid f1 f2
1 1 10
2 1 NULL
+3 1 6
commit;
"The trx with consistent snapshot ended."
select rowid, f1, f2 from t1;
rowid f1 f2
1 1 10
2 1 4
-3 1 NULL
+3 1 6
drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug21704.result b/mysql-test/suite/innodb/r/innodb_bug21704.result
index 3a6b38d50da..239aeaa354d 100644
--- a/mysql-test/suite/innodb/r/innodb_bug21704.result
+++ b/mysql-test/suite/innodb/r/innodb_bug21704.result
@@ -5,9 +5,6 @@
# Test that it's not possible to rename columns participating in a
# foreign key (either in the referencing or referenced table).
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
@@ -21,35 +18,72 @@ INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
# Test renaming the column in the referenced table.
-ALTER TABLE t1 CHANGE a c INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
+ALTER TABLE t1 CHANGE a e INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Ensure that online column rename works.
ALTER TABLE t1 CHANGE b c INT;
-affected rows: 3
-info: Records: 3 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Test renaming the column in the referencing table
-ALTER TABLE t2 CHANGE a c INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150 "Foreign key constraint is incorrectly formed")
+ALTER TABLE t2 CHANGE a z INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Ensure that online column rename works.
ALTER TABLE t2 CHANGE b c INT;
-affected rows: 3
-info: Records: 3 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Test with self-referential constraints
-ALTER TABLE t3 CHANGE a d INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150 "Foreign key constraint is incorrectly formed")
-ALTER TABLE t3 CHANGE b d INT;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150 "Foreign key constraint is incorrectly formed")
+ALTER TABLE t3 CHANGE a f INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+ALTER TABLE t3 CHANGE b g INT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Ensure that online column rename works.
ALTER TABLE t3 CHANGE c d INT;
-affected rows: 3
-info: Records: 3 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Cleanup.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `e` int(11) NOT NULL DEFAULT '0',
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`e`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `z` int(11) NOT NULL DEFAULT '0',
+ `c` int(11) DEFAULT NULL,
+ PRIMARY KEY (`z`),
+ CONSTRAINT `fk1` FOREIGN KEY (`z`) REFERENCES `t1` (`e`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `f` int(11) NOT NULL DEFAULT '0',
+ `g` int(11) DEFAULT NULL,
+ `d` int(11) DEFAULT NULL,
+ PRIMARY KEY (`f`),
+ KEY `b` (`g`),
+ CONSTRAINT `fk2` FOREIGN KEY (`g`) REFERENCES `t3` (`f`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT f.*, c.*
+FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS c
+INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FOREIGN f
+ON c.ID=f.ID
+WHERE FOR_NAME LIKE 'test/t%';
+ID FOR_NAME REF_NAME N_COLS TYPE ID FOR_COL_NAME REF_COL_NAME POS
+test/fk1 test/t2 test/t1 1 0 test/fk1 z e 0
+test/fk2 test/t3 test/t3 1 0 test/fk2 g f 0
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb/r/innodb_bug52745.result
index 927ba0e0e53..f4393e8fae0 100644
--- a/mysql-test/suite/innodb/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb/r/innodb_bug52745.result
@@ -127,4 +127,4 @@ Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745;
SET GLOBAL innodb_file_format=Antelope;
-SET GLOBAL innodb_file_per_table=0;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb/r/innodb_bug53591.result
index b0196318801..dbebb9d2d33 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53591.result
@@ -4,11 +4,10 @@ set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
-ERROR HY000: Too big row
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
SHOW WARNINGS;
Level Code Message
-Error 139 Too big row
-Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Antelope;
-SET GLOBAL innodb_file_per_table=0;
+SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-test/suite/innodb/r/innodb_bug54044.result
index 47aa8805834..4935febcbfb 100644
--- a/mysql-test/suite/innodb/r/innodb_bug54044.result
+++ b/mysql-test/suite/innodb/r/innodb_bug54044.result
@@ -5,5 +5,13 @@ Table Create Table
table_54044 CREATE TEMPORARY TABLE `table_54044` (
`IF(NULL IS NOT NULL, NULL, NULL)` binary(0) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
-CREATE TEMPORARY TABLE tmp1 ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL);
-CREATE TEMPORARY TABLE tmp2 ENGINE = INNODB AS SELECT GREATEST(NULL, NULL);
+DROP TABLE table_54044;
+CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
+SHOW CREATE TABLE tmp;
+Table Create Table
+tmp CREATE TABLE `tmp` (
+ `COALESCE(NULL, NULL, NULL)` binary(0) DEFAULT NULL,
+ `GREATEST(NULL, NULL)` binary(0) DEFAULT NULL,
+ `NULL` binary(0) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE tmp;
diff --git a/mysql-test/suite/innodb/r/innodb_bug56947.result b/mysql-test/suite/innodb/r/innodb_bug56947.result
index 8b864b62e81..0b436ce2656 100644
--- a/mysql-test/suite/innodb/r/innodb_bug56947.result
+++ b/mysql-test/suite/innodb/r/innodb_bug56947.result
@@ -1,8 +1,11 @@
-SET @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
-CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
+SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
alter table bug56947 add unique index (a);
-ERROR 42S01: Table 'test.bug56947#1' already exists
-drop table `bug56947#1`;
+ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine
+SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
+check table bug56947;
+Table Op Msg_type Msg_text
+test.bug56947 check status OK
drop table bug56947;
+SET @@global.innodb_file_per_table=DEFAULT;
diff --git a/mysql-test/suite/innodb/r/innodb_bug60049.result b/mysql-test/suite/innodb/r/innodb_bug60049.result
index a1788a8ab0a..8e3be130e48 100644
--- a/mysql-test/suite/innodb/r/innodb_bug60049.result
+++ b/mysql-test/suite/innodb/r/innodb_bug60049.result
@@ -1,9 +1,10 @@
-set @@global.innodb_fast_shutdown=0;
-CREATE TABLE t(a INT)ENGINE=InnoDB;
+call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
+call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
+CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0;
RENAME TABLE t TO u;
DROP TABLE u;
SELECT @@innodb_fast_shutdown;
@@innodb_fast_shutdown
0
Last record of ID_IND root page (9):
-1808000018050074000000000000000c5359535f464f524549474e5f434f4c53
+18080000180500c0000000000000000c5359535f464f524549474e5f434f4c53
diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
index e194f67f5c5..8ec10a86b37 100644
--- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
+++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
@@ -46,7 +46,6 @@ ERROR HY000: Index corrupt_bit_test_ā is corrupted
show warnings;
Level Code Message
Warning 180 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
-Warning 180 Got error 180 when reading table `test`.`corrupt_bit_test_ā`
Error 1712 Index corrupt_bit_test_ā is corrupted
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
select * from corrupt_bit_test_ā use index(primary) where a = 10001;
diff --git a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb/r/innodb_index_large_prefix.result
index f966574506a..330ade923b3 100644
--- a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb/r/innodb_index_large_prefix.result
@@ -1,11 +1,16 @@
+SET default_storage_engine=InnoDB;
set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
-create table worklog5743(a TEXT not null, primary key (a(1000)))
-ROW_FORMAT=DYNAMIC, engine = innodb;
+### Test 1 ###
+create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
insert into worklog5743 values(repeat("a", 20000));
update worklog5743 set a = (repeat("b", 16000));
create index idx on worklog5743(a(2000));
+show warnings;
+Level Code Message
begin;
update worklog5743 set a = (repeat("x", 17000));
select @@session.tx_isolation;
@@ -26,9 +31,13 @@ a = repeat("x", 17000)
1
rollback;
drop table worklog5743;
-create table worklog5743(a1 int, a2 TEXT not null)
-ROW_FORMAT=DYNAMIC, engine = innodb;
+### Test 2 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
create index idx on worklog5743(a1, a2(2000));
+show warnings;
+Level Code Message
insert into worklog5743 values(9, repeat("a", 10000));
begin;
update worklog5743 set a1 = 1000;
@@ -49,8 +58,8 @@ select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
rollback;
drop table worklog5743;
-create table worklog5743(a1 int, a2 TEXT not null)
-ROW_FORMAT=DYNAMIC, engine = innodb;
+### Test 3 ###
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
create index idx on worklog5743(a1, a2(50));
insert into worklog5743 values(9, repeat("a", 10000));
begin;
@@ -72,48 +81,328 @@ select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
a1 a2 = repeat("a", 10000)
rollback;
drop table worklog5743;
-create table worklog5743_2(a1 int, a2 TEXT not null)
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-create table worklog5743_4(a1 int, a2 TEXT not null)
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-create index idx1 on worklog5743_2(a1, a2(942));
-ERROR HY000: Too big row
-create index idx1 on worklog5743_2(a1, a2(940));
-create index idx1 on worklog5743_4(a1, a2(1966));
-ERROR HY000: Too big row
-create index idx1 on worklog5743_4(a1, a2(1964));
+### Test 4 ###
+create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
+create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
+create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
+create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
+create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_1(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_1(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_1(a2(436));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_1(a2(434));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_1(a1, a2(430));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_1(a1, a2(428));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_2(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_2(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_2(a2(948));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_2(a2(946));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_2(a1, a2(942));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_2(a1, a2(940));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_4(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_4(a2(4000));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx3 on worklog5743_4(a2(1972));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx4 on worklog5743_4(a2(1970));
+show warnings;
+Level Code Message
+create index idx5 on worklog5743_4(a1, a2(1966));
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+show warnings;
+Level Code Message
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+create index idx6 on worklog5743_4(a1, a2(1964));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_8(a2(1000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_8(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743_8(a2(3072));
+show warnings;
+Level Code Message
+create index idx4 on worklog5743_8(a1, a2(3069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743_8(a1, a2(3068));
+show warnings;
+Level Code Message
+create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_16(a2(1000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_16(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743_16(a2(3072));
+show warnings;
+Level Code Message
+create index idx4 on worklog5743_16(a1, a2(3069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743_16(a1, a2(3068));
+show warnings;
+Level Code Message
+create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
+show warnings;
+Level Code Message
+insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
+insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
+insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
+set global innodb_large_prefix=0;
+insert into worklog5743_1 values(2, repeat("b", 10000));
+insert into worklog5743_2 values(2, repeat("b", 10000));
+insert into worklog5743_4 values(2, repeat("b", 10000));
+insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
+insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
+set global innodb_large_prefix=1;
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_16;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+2 bbbbbbbbbbbbbbbbbbbb
begin;
+update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_4 set a1 = 1000;
+update worklog5743_8 set a1 = 1000;
+update worklog5743_16 set a1 = 1000;
+select a1, left(a2, 20) from worklog5743_1;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_2;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_4;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_8;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
+select a1, left(a2, 20) from worklog5743_16;
+a1 left(a2, 20)
+1000 aaaaaaaaaaaaaaaaaaaa
+1000 bbbbbbbbbbbbbbbbbbbb
select @@session.tx_isolation;
@@session.tx_isolation
REPEATABLE-READ
-explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE worklog5743_2 ref idx1 idx1 5 const 1
-select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
-a1 a2 = repeat("a", 10000)
-9 1
-select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9;
-a1 a2 = repeat("a", 10000)
-9 1
+1 SIMPLE worklog5743_1 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_2 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_4 ref idx6 idx6 5 const 1
+explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_8 ref idx5,idx7 idx5 5 const 1
+explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE worklog5743_16 ref idx5,idx7 idx5 5 const 1
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+a1 left(a2, 20)
+9 aaaaaaaaaaaaaaaaaaaa
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@session.tx_isolation
READ-UNCOMMITTED
-select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
-a1 a2 = repeat("a", 10000)
-select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9;
-a1 a2 = repeat("a", 10000)
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+a1 left(a2, 20)
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+a1 left(a2, 20)
rollback;
+drop table worklog5743_1;
drop table worklog5743_2;
drop table worklog5743_4;
-create table worklog5743(a1 int, a2 varchar(3000))
-ROW_FORMAT=DYNAMIC, engine = innodb;
-create index idx on worklog5743(a1, a2);
-insert into worklog5743 values(9, repeat("a", 3000));
+drop table worklog5743_8;
+drop table worklog5743_16;
+### Test 5 ###
+create table worklog5743(a1 int,
+a2 varchar(20000),
+a3 varchar(3073),
+a4 varchar(3072),
+a5 varchar(3069),
+a6 varchar(3068))
+ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx2 on worklog5743(a3);
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx3 on worklog5743(a4);
+show warnings;
+Level Code Message
+create index idx4 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx5 on worklog5743(a1, a5);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 3072 bytes
+create index idx6 on worklog5743(a1, a6);
+show warnings;
+Level Code Message
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` varchar(20000) DEFAULT NULL,
+ `a3` varchar(3073) DEFAULT NULL,
+ `a4` varchar(3072) DEFAULT NULL,
+ `a5` varchar(3069) DEFAULT NULL,
+ `a6` varchar(3068) DEFAULT NULL,
+ KEY `idx1` (`a2`(3072)),
+ KEY `idx2` (`a3`(3072)),
+ KEY `idx3` (`a4`),
+ KEY `idx6` (`a1`,`a6`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+insert into worklog5743 values(9,
+repeat("a", 20000), repeat("a", 3073),
+repeat("a", 3072), repeat("a", 3069),
+repeat("a", 3068));
begin;
update worklog5743 set a1 = 1000;
select @@session.tx_isolation;
@@ -121,7 +410,7 @@ select @@session.tx_isolation;
REPEATABLE-READ
explain select a1 from worklog5743 where a1 = 9;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE worklog5743 ref idx idx 5 const 1 Using index
+1 SIMPLE worklog5743 ref idx6 idx6 5 const 1 Using index
select a1 from worklog5743 where a1 = 9;
a1
9
@@ -133,13 +422,13 @@ select a1 from worklog5743 where a1 = 9;
a1
rollback;
drop table worklog5743;
-create table worklog5743(a TEXT not null, primary key (a(1000)))
-engine = innodb;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-create table worklog5743(a TEXT) engine = innodb;
-create index idx on worklog5743(a(1000));
+create table worklog5743(a TEXT);
+create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-create index idx on worklog5743(a(725));
+create index idx on worklog5743(a(767));
insert into worklog5743 values(repeat("a", 20000));
begin;
insert into worklog5743 values(repeat("b", 20000));
@@ -160,25 +449,30 @@ a = repeat("x", 25000)
1
rollback;
drop table worklog5743;
-create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb;
-create index idx on worklog5743(a(3073));
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
-Warning 1071 Specified key was too long; max key length is 3072 bytes
create index idx2 on worklog5743(a(3072));
show create table worklog5743;
Table Create Table
worklog5743 CREATE TABLE `worklog5743` (
`a` text NOT NULL,
- KEY `idx` (`a`(3072)),
+ KEY `idx1` (`a`(3072)),
KEY `idx2` (`a`(3072))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
drop table worklog5743;
-create table worklog5743(a TEXT not null) engine = innodb;
+create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
+create index idx on worklog5743(a(768));
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
create index idx2 on worklog5743(a(767));
drop table worklog5743;
SET GLOBAL innodb_file_format=Antelope;
-SET GLOBAL innodb_file_per_table=0;
+SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=0;
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result
index 0c4413282f7..6f97fdcc0a0 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema.result
@@ -1,18 +1,18 @@
lock_mode lock_type lock_table lock_index lock_rec lock_data
-X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
-X RECORD `test`.```t'\"_str` `PRIMARY` 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
-X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
-X RECORD `test`.```t'\"_str` `PRIMARY` 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
-X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
-X RECORD `test`.```t'\"_str` `PRIMARY` 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
-X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
-X RECORD `test`.```t'\"_str` `PRIMARY` 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
-X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
-X RECORD `test`.`t_min` `PRIMARY` 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
-X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
-X RECORD `test`.`t_max` `PRIMARY` 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
-X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record
-X RECORD `test`.```t'\"_str` `PRIMARY` 1 supremum pseudo-record
+X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
+X RECORD `test`.```t'\"_str` PRIMARY 2 '1', 'abc', '''abc', 'abc''', 'a''bc', 'a''bc''', '''abc'''''
+X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
+X RECORD `test`.```t'\"_str` PRIMARY 3 '2', 'abc', '"abc', 'abc"', 'a"bc', 'a"bc"', '"abc""'
+X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
+X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a\\bc\\', '\\abc\\\\'
+X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
+X RECORD `test`.```t'\"_str` PRIMARY 5 '4', 'abc', '\0abc', 'abc\0', 'a\0bc', 'a\0bc\0', 'a\0bc\0\0'
+X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
+X RECORD `test`.`t_min` PRIMARY 2 -128, 0, -32768, 0, -8388608, 0, -2147483648, 0, -9223372036854775808, 0
+X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
+X RECORD `test`.`t_max` PRIMARY 2 127, 255, 32767, 65535, 8388607, 16777215, 2147483647, 4294967295, 9223372036854775807, 18446744073709551615
+X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
+X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
lock_table COUNT(*)
`test`.`t_max` 2
`test`.`t_min` 2
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 b4a350e77a3..dcdf3082067 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
@@ -6,28 +6,28 @@ 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"
+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
+`test`.`infoschema_buffer_test` GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
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"
+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
+`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"
+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
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";
+WHERE TABLE_NAME like "%infoschema_buffer_test%";
TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
ENGINE=INNODB;
@@ -38,93 +38,9 @@ ON DELETE CASCADE)
ENGINE=INNODB;
SELECT count(*)
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
+WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
and PAGE_TYPE="index";
count(*)
2
DROP TABLE infoschema_child;
DROP TABLE infoschema_parent;
-show create table information_schema.innodb_buffer_page;
-Table Create Table
-INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
- `POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
- `BLOCK_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
- `SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
- `PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
- `PAGE_TYPE` varchar(64) DEFAULT NULL,
- `FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
- `FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
- `IS_HASHED` varchar(3) DEFAULT NULL,
- `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(1024) 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` varchar(64) DEFAULT NULL,
- `IO_FIX` varchar(64) DEFAULT NULL,
- `IS_OLD` varchar(3) DEFAULT NULL,
- `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MEMORY DEFAULT CHARSET=utf8
-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` bigint(21) unsigned NOT NULL DEFAULT '0',
- `LRU_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
- `SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
- `PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
- `PAGE_TYPE` varchar(64) DEFAULT NULL,
- `FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
- `FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
- `IS_HASHED` varchar(3) DEFAULT NULL,
- `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(1024) 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` varchar(3) DEFAULT NULL,
- `IO_FIX` varchar(64) DEFAULT NULL,
- `IS_OLD` varchar(3) DEFAULT NULL,
- `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
-) ENGINE=MEMORY DEFAULT CHARSET=utf8
-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` bigint(21) 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` double NOT NULL DEFAULT '0',
- `PAGES_MADE_NOT_YOUNG_RATE` double 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` double NOT NULL DEFAULT '0',
- `PAGES_CREATE_RATE` double NOT NULL DEFAULT '0',
- `PAGES_WRITTEN_RATE` double 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` double NOT NULL DEFAULT '0',
- `READ_AHEAD_EVICTED_RATE` double 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/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 7247b26e86b..236529fd8d6 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -1,6 +1,6 @@
set global innodb_support_xa=default;
set session innodb_support_xa=default;
-SET SESSION STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
drop procedure if exists p1;
create table t1 (
@@ -335,7 +335,7 @@ a count(a)
1 1
NULL 1
drop table t1;
-create table t1 (f1 int, f2 char(1), primary key(f1,f2));
+create table t1 (f1 int, f2 char(1), primary key(f1,f2)) stats_persistent=0;
insert into t1 values ( 1,"e"),(2,"a"),( 3,"c"),(4,"d");
alter table t1 drop primary key, add primary key (f2, f1);
explain select distinct f1 a, f1 b from t1;
@@ -371,7 +371,7 @@ dept varchar(20) NOT NULL,
age tinyint(3) unsigned NOT NULL,
PRIMARY KEY (id),
INDEX (name,dept)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1(id, dept, age, name) VALUES
(3987, 'cs1', 10, 'rs1'), (3988, 'cs2', 20, 'rs1'), (3995, 'cs3', 10, 'rs2'),
(3996, 'cs4', 20, 'rs2'), (4003, 'cs5', 10, 'rs3'), (4004, 'cs6', 20, 'rs3'),
@@ -435,7 +435,7 @@ set global query_cache_size=10*1024*1024;
set global query_cache_type=1;
drop table if exists `test`;
Warnings:
-Note 1051 Unknown table 'test'
+Note 1051 Unknown table 'test.test'
CREATE TABLE `test` (`test1` varchar(3) NOT NULL,
`test2` varchar(4) NOT NULL,PRIMARY KEY (`test1`))
ENGINE=InnoDB DEFAULT CHARSET=latin1;
@@ -544,7 +544,7 @@ stat_id int NOT NULL,
acct_id int DEFAULT NULL,
INDEX idx1 (stat_id, acct_id),
INDEX idx2 (acct_id)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1(stat_id,acct_id) VALUES
(1,759), (2,831), (3,785), (4,854), (1,921),
(1,553), (2,589), (3,743), (2,827), (2,545),
@@ -709,12 +709,12 @@ CREATE TABLE t2 (primary key (a)) select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TEMPORARY TABLE t2 (primary key (a)) select * from t1;
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
drop table if exists t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t2 (a int, b int, primary key (a));
BEGIN;
INSERT INTO t2 values(100,100);
@@ -1129,7 +1129,6 @@ insert into t1 values('aaa');
alter table t1 add index(a(1024));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
-Warning 1071 Specified key was too long; max key length is 767 bytes
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1788,6 +1787,33 @@ id select_type table type possible_keys key key_len ref rows Extra
DROP TABLE t1;
End of 5.1 tests
#
+# Bug#43600: Incorrect type conversion caused wrong result.
+#
+CREATE TABLE t1 (
+a int NOT NULL
+) engine= innodb;
+CREATE TABLE t2 (
+a int NOT NULL,
+b int NOT NULL,
+filler char(100) DEFAULT NULL,
+KEY a (a,b)
+) engine= innodb;
+insert into t1 values (0),(1),(2),(3),(4);
+insert into t2 select A.a + 10 *B.a, 1, 'filler' from t1 A, t1 B;
+explain select * from t1, t2 where t2.a=t1.a and t2.b + 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5
+1 SIMPLE t2 ref a a 4 test.t1.a 1 Using index condition
+select * from t1, t2 where t2.a=t1.a and t2.b + 1;
+a a b filler
+0 0 1 filler
+1 1 1 filler
+2 2 1 filler
+3 3 1 filler
+4 4 1 filler
+drop table t1,t2;
+# End of test case for the bug#43600
+#
# Bug#42643: InnoDB does not support replication of TRUNCATE TABLE
#
# Check that a TRUNCATE TABLE statement, needing an exclusive meta
@@ -1819,15 +1845,21 @@ a
# Connection default
DROP TABLE t1;
drop table if exists t1, t2, t3;
+#
+# BUG#35850: Performance regression in 5.1.23/5.1.24
+#
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, pk int, key(a,b), primary key(pk)) engine=innodb;
insert into t2 select @a:=A.a+10*(B.a + 10*C.a),@a, @a from t1 A, t1 B, t1 C;
-this must use key 'a', not PRIMARY:
+# this must use key 'a', not PRIMARY:
explain select a from t2 where a=b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index NULL a 10 NULL # Using where; Using index
drop table t1, t2;
+#
+# Bug #40360: Binlog related errors with binlog off
+#
SET SESSION BINLOG_FORMAT=STATEMENT;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
@@ -1837,12 +1869,19 @@ select @@session.sql_log_bin, @@session.binlog_format, @@session.tx_isolation;
CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
DROP TABLE t1;
+#
+# Bug#37284 Crash in Field_string::type()
+#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a char(50)) ENGINE=InnoDB;
CREATE INDEX i1 on t1 (a(3));
SELECT * FROM t1 WHERE a = 'abcde';
a
DROP TABLE t1;
+#
+# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
+# requested column
+#
CREATE TABLE foo (a int, b int, c char(10),
PRIMARY KEY (c(3)),
KEY b (b)
@@ -1860,6 +1899,9 @@ INSERT INTO foo VALUES
(4,5,'uvwxyz'), (5,6,'meotnsyglt'), (4,5,'asfdewe');
INSERT INTO bar SELECT * FROM foo;
INSERT INTO foo2 SELECT * FROM foo;
+ANALYZE TABLE bar;
+ANALYZE TABLE foo;
+ANALYZE TABLE foo2;
EXPLAIN SELECT c FROM bar WHERE b>2;;
id 1
select_type SIMPLE
@@ -1927,6 +1969,9 @@ ref NULL
rows 6
Extra Using where; Using index
DROP TABLE foo, bar, foo2;
+#
+# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
+#
DROP TABLE IF EXISTS t1,t3,t2;
DROP FUNCTION IF EXISTS f1;
CREATE FUNCTION f1() RETURNS VARCHAR(250)
@@ -1948,6 +1993,9 @@ DEALLOCATE PREPARE stmt1;
DEALLOCATE PREPARE stmt3;
DROP TABLE t1,t3,t2;
DROP FUNCTION f1;
+#
+# Bug#37016: TRUNCATE TABLE removes some rows but not all
+#
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
CREATE TABLE t2 (id INT PRIMARY KEY,
@@ -2154,6 +2202,9 @@ DROP TABLE t4;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
+#
+# Bug#43580: Issue with Innodb on multi-table update
+#
CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
CREATE TABLE t3 (a INT, b INT KEY, KEY (a)) ENGINE = INNODB;
@@ -2259,6 +2310,7 @@ INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+ANALYZE TABLE t1;
EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
@@ -2267,7 +2319,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using where
+1 SIMPLE t1 index NULL PRIMARY 4 NULL {checked} Using where
DROP TABLE t1;
#
# Bug #47963: Wrong results when index is used
@@ -2337,7 +2389,7 @@ DROP TABLE t1,t2;
# Bug #49324: more valgrind errors in test_if_skip_sort_order
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ;
-#should not cause valgrind warnings
+# should not cause valgrind warnings
SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a;
1
DROP TABLE t1;
@@ -2349,6 +2401,8 @@ create table t1(f1 int not null primary key, f2 int) engine=innodb;
create table t2(f1 int not null, key (f1)) engine=innodb;
insert into t1 values (1,1),(2,2),(3,3);
insert into t2 values (1),(2),(3);
+analyze table t1;
+analyze table t2;
explain select t1.* from t1 left join t2 using(f1) group by t1.f1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 3
@@ -2365,6 +2419,9 @@ INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
(4,4,4,4,4,4), (5,5,5,5,5,5), (6,6,6,6,6,6),
(7,7,7,7,7,7), (8,8,8,8,8,8), (9,9,9,9,9,9),
(11,11,11,11,11,11);
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
EXPLAIN SELECT COUNT(*) FROM t1;
id 1
select_type SIMPLE
@@ -2413,36 +2470,6 @@ Comment
Index_comment
DROP TABLE t1;
#
-# Bug #53334: wrong result for outer join with impossible ON condition
-# (see the same test case for MyISAM in join.test)
-#
-create table t1 (id int primary key);
-create table t2 (id int);
-insert into t1 values (75);
-insert into t1 values (79);
-insert into t1 values (78);
-insert into t1 values (77);
-replace into t1 values (76);
-replace into t1 values (76);
-insert into t1 values (104);
-insert into t1 values (103);
-insert into t1 values (102);
-insert into t1 values (101);
-insert into t1 values (105);
-insert into t1 values (106);
-insert into t1 values (107);
-insert into t2 values (107),(75),(1000);
-select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
-where t2.id=75 and t1.id is null;
-id id
-NULL 75
-explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
-where t2.id=75 and t1.id is null;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
-drop table t1,t2;
-#
# Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
# JOINed during an UPDATE
#
@@ -2450,7 +2477,7 @@ CREATE TABLE t1 (d INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT, b INT,
c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
-set up our data elements
+# set up our data elements
INSERT INTO t1 (d) VALUES (1);
INSERT INTO t2 (a,b) VALUES (1,1);
SELECT SECOND(c) INTO @bug47453 FROM t2;
@@ -2465,7 +2492,7 @@ SELECT SLEEP(1);
SLEEP(1)
0
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
-#should be 0
+# should be 0
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
SECOND(c)-@bug47453
0
@@ -2535,6 +2562,7 @@ KEY idx1 (f2,f5,f4),
KEY idx2 (f2,f4)
) ENGINE=InnoDB;
LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
+ANALYZE TABLE t1;
SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
@@ -2570,7 +2598,7 @@ f4 tinyint(1) NOT NULL,
PRIMARY KEY (f1),
UNIQUE KEY (f2, f3),
KEY (f4)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES
(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
(6,1,996,1), (7,1,997,1), (8,1,998,1), (10,1,999,1), (11,1,9910,1),
@@ -2600,44 +2628,10 @@ ALTER TABLE t1 COMMENT 'test';
UNLOCK TABLES;
DROP TABLE t1;
#
-# Bug#55826: create table .. select crashes with when KILL_BAD_DATA
-# is returned
-#
-CREATE TABLE t1(a INT) ENGINE=innodb;
-INSERT INTO t1 VALUES (0);
-SET SQL_MODE='STRICT_ALL_TABLES';
-CREATE TABLE t2
-SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
-ERROR 22007: Incorrect datetime value: ''
-DROP TABLE t1;
-SET SQL_MODE=DEFAULT;
-#
-# Bug#55580: segfault in read_view_sees_trx_id
-#
-CREATE TABLE t1 (a INT) ENGINE=Innodb;
-CREATE TABLE t2 (a INT) ENGINE=Innodb;
-INSERT INTO t1 VALUES (1),(2);
-INSERT INTO t2 VALUES (1),(2);
-START TRANSACTION;
-SELECT * FROM t2 LOCK IN SHARE MODE;
-a
-1
-2
-START TRANSACTION;
-SELECT * FROM t1 LOCK IN SHARE MODE;
-a
-1
-2
-SELECT * FROM t1 FOR UPDATE;
-# should not crash
-SELECT * FROM t1 GROUP BY (SELECT a FROM t2 LIMIT 1 FOR UPDATE) + t1.a;
-ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
-DROP TABLE t1,t2;
-#
# Bug#55656: mysqldump can be slower after bug #39653 fix
#
CREATE TABLE t1 (a INT , b INT, c INT, d INT,
-KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB;
+KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3);
EXPLAIN SELECT COUNT(*) FROM t1;
id 1
@@ -2691,58 +2685,6 @@ rows 3
Extra Using index
DROP TABLE t1;
#
-# Bug#56862 Execution of a query that uses index merge returns a wrong result
-#
-CREATE TABLE t1 (
-pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-a int,
-b int,
-INDEX idx(a))
-ENGINE=INNODB;
-INSERT INTO t1(a,b) VALUES
-(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
-(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
-(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
-(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
-INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1 VALUES (1000000, 0, 0);
-SET SESSION sort_buffer_size = 1024*36;
-EXPLAIN
-SELECT COUNT(*) FROM
-(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
-WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1536 Using sort_union(idx,PRIMARY); Using where
-SELECT COUNT(*) FROM
-(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
-WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-COUNT(*)
-1537
-SET SESSION sort_buffer_size = DEFAULT;
-DROP TABLE t1;
-#
-# ALTER TABLE IGNORE didn't ignore duplicates for unique add index
-#
-create table t1 (a int primary key, b int) engine = innodb;
-insert into t1 values (1,1),(2,1);
-alter ignore table t1 add unique `main` (b);
-select * from t1;
-a b
-1 1
-drop table t1;
-End of 5.1 tests
-#
-#
# Bug#55826: create table .. select crashes with when KILL_BAD_DATA
# is returned
#
@@ -2755,55 +2697,14 @@ ERROR 22007: Incorrect datetime value: ''
DROP TABLE t1;
SET SQL_MODE=DEFAULT;
#
-# Bug#56862 Execution of a query that uses index merge returns a wrong result
+# Bug#56862 Moved to innodb_16k.test
#
-CREATE TABLE t1 (
-pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
-a int,
-b int,
-INDEX idx(a))
-ENGINE=INNODB;
-INSERT INTO t1(a,b) VALUES
-(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
-(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
-(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
-(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
-INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1 VALUES (1000000, 0, 0);
-SET SESSION sort_buffer_size = 1024*36;
-EXPLAIN
-SELECT COUNT(*) FROM
-(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
-WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1536 Using sort_union(idx,PRIMARY); Using where
-SELECT COUNT(*) FROM
-(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
-WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-COUNT(*)
-1537
-SET SESSION sort_buffer_size = DEFAULT;
-DROP TABLE t1;
#
# Test for bug #39932 "create table fails if column for FK is in different
# case than in corr index".
#
drop tables if exists t1, t2;
create table t1 (pk int primary key) engine=InnoDB;
-# Even although the below statement uses uppercased field names in
-# foreign key definition it still should be able to find explicitly
-# created supporting index. So it should succeed and should not
-# create any additional supporting indexes.
create table t2 (fk int, key x (fk),
constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
show create table t2;
@@ -2815,130 +2716,6 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2, t1;
#
-# Bug #663818: wrong result when BNLH is used
-#
-CREATE TABLE t1(pk int NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES
-(1), (2), (11), (12), (13), (14),
-(15), (16), (17), (18), (19);
-CREATE TABLE t2(pk int NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t2 VALUES
-(1), (10), (11), (12), (13), (14),
-(15), (16), (17), (18), (19), (20), (21);
-SET SESSION join_buffer_size=10000;
-Warnings:
-Warning 1292 Truncated incorrect join_buffer_size value: '10000'
-SET SESSION join_cache_level=3;
-EXPLAIN
-SELECT t1.pk FROM t1,t2
-WHERE t1.pk = t2.pk AND t2.pk <> 8;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 11 Using where; Using index
-1 SIMPLE t2 hash_index PRIMARY #hash#PRIMARY:PRIMARY 4:4 test.t1.pk 13 Using join buffer (flat, BNLH join)
-SELECT t1.pk FROM t1,t2
-WHERE t1.pk = t2.pk AND t2.pk <> 8;
-pk
-1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-SET SESSION join_cache_level=1;
-EXPLAIN
-SELECT t1.pk FROM t1,t2
-WHERE t1.pk = t2.pk AND t2.pk <> 8;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 11 Using where; Using index
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.pk 1 Using index
-SELECT t1.pk FROM t1,t2
-WHERE t1.pk = t2.pk AND t2.pk <> 8;
-pk
-1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-DROP TABLE t1,t2;
-SET SESSION join_cache_level=DEFAULT;
-SET SESSION join_buffer_size=DEFAULT;
-#
-# Bug#668644: HAVING + ORDER BY
-#
-CREATE TABLE t1 (
-pk int NOT NULL PRIMARY KEY, i int DEFAULT NULL,
-INDEX idx (i)
-) ENGINE=INNODB;
-INSERT INTO t1 VALUES
-(6,-1636630528),(2,-1097924608),(1,6),(3,6),(4,1148715008),(5,1541734400);
-CREATE TABLE t2 (
-i int DEFAULT NULL,
-pk int NOT NULL PRIMARY KEY,
-INDEX idx (i)
-) ENGINE= INNODB;
-INSERT INTO t2 VALUES
-(-1993998336,20),(-1036582912,1),(-733413376,5),(-538247168,16),
-(-514260992,4),(-249561088,9),(1,2),(1,6),(2,10),(2,19),(4,17),
-(5,14),(5,15),(6,8),(7,13),(8,18),(9,11),(9,12),(257425408,7),
-(576061440,3);
-EXPLAIN
-SELECT t1 .i AS f FROM t1, t2
-WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
-HAVING f > 7
-ORDER BY f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index PRIMARY idx 5 NULL 6 Using where; Using index
-1 SIMPLE t2 ref idx idx 5 test.t1.pk 1 Using index
-SELECT t1 .i AS f FROM t1, t2
-WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
-HAVING f > 7
-ORDER BY f;
-f
-1148715008
-1541734400
-1541734400
-DROP TABLE t1, t2;
-#
-# Test for bug #56619 - Assertion failed during
-# ALTER TABLE RENAME, DISABLE KEYS
-#
-DROP TABLE IF EXISTS t1, t2;
-CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb;
-ALTER TABLE t1 RENAME TO t2, DISABLE KEYS;
-DROP TABLE IF EXISTS t1, t2;
-#
-# Bug#702322: HAVING with two ANDed predicates + ORDER BY
-#
-CREATE TABLE t1 (pk int PRIMARY KEY, a int, KEY (a)) ENGINE=InnoDB;
-CREATE TABLE t2 (a int, KEY (a)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES
-(18,0),(9,10),(8,11),(2,15),(7,19),(1,20);
-SET SESSION join_cache_level = 0;
-EXPLAIN
-SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
-WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
-ORDER BY t1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using index condition; Using filesort
-1 SIMPLE t2 ref a a 5 test.t1.pk 1 Using index
-SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
-WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
-ORDER BY t1.a;
-a
-10
-19
-DROP TABLE t1,t2;
-End of 5.3 tests
-#
# Test for bug #11762012 - "54553: INNODB ASSERTS IN HA_INNOBASE::
# UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".
#
@@ -2954,7 +2731,39 @@ LOCK TABLES t1 READ;
UPDATE t1 SET c = 5;
UNLOCK TABLES;
DROP TEMPORARY TABLE t1;
-End of 5.1 tests
+# End of 5.1 tests
+#
+# Bug#49604 "6.0 processing compound WHERE clause incorrectly
+# with Innodb - extra rows"
+#
+CREATE TABLE t1 (
+c1 INT NOT NULL,
+c2 INT,
+PRIMARY KEY (c1),
+KEY k1 (c2)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (12,1);
+INSERT INTO t1 VALUES (15,1);
+INSERT INTO t1 VALUES (16,1);
+INSERT INTO t1 VALUES (22,1);
+INSERT INTO t1 VALUES (20,2);
+CREATE TABLE t2 (
+c1 INT NOT NULL,
+c2 INT,
+PRIMARY KEY (c1)
+) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,9);
+SELECT STRAIGHT_JOIN t2.c2, t1.c2, t2.c1
+FROM t1 JOIN t2 ON t1.c2 = t2.c1
+WHERE t2.c1 IN (2, 1, 6) OR t2.c1 NOT IN (1);
+c2 c2 c1
+2 1 1
+2 1 1
+2 1 1
+2 1 1
+9 2 2
+DROP TABLE t1, t2;
#
# Bug#44613 SELECT statement inside FUNCTION takes a shared lock
#
@@ -2981,13 +2790,86 @@ COMMIT;
DROP TABLE t1;
DROP FUNCTION f1;
#
+# Bug#42744: Crash when using a join buffer to join a table with a blob
+# column and an additional column used for duplicate elimination.
+#
+CREATE TABLE t1 (a tinyblob) ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY, b tinyblob) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1'), (NULL);
+INSERT INTO t2 VALUES (1, '1');
+EXPLAIN
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+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 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t2 index NULL PRIMARY 4 NULL 1 Using index; FirstMatch(t1); Using join buffer (incremental, BNL join)
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+b
+1
+DROP TABLE t1,t2;
+#
+# Bug#48093: 6.0 Server not processing equivalent IN clauses properly
+# with Innodb tables
+#
+CREATE TABLE t1 (
+i int(11) DEFAULT NULL,
+v1 varchar(1) DEFAULT NULL,
+v2 varchar(20) DEFAULT NULL,
+KEY i (i),
+KEY v (v1,i)
+) ENGINE=innodb;
+INSERT INTO t1 VALUES (1,'f','no');
+INSERT INTO t1 VALUES (2,'u','yes-u');
+INSERT INTO t1 VALUES (2,'h','yes-h');
+INSERT INTO t1 VALUES (3,'d','no');
+
+SELECT v2
+FROM t1
+WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
+v2
+yes-u
+yes-h
+
+# Should not use index_merge
+EXPLAIN
+SELECT v2
+FROM t1
+WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref i,v i 5 const 2 Using where
+DROP TABLE t1;
+#
# Bug#54606 innodb fast alter table + pack_keys=0
# prevents adding new indexes
#
+DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b))
ENGINE=InnoDB
PACK_KEYS=0;
CREATE INDEX a ON t1 (a);
CREATE INDEX c on t1 (c);
DROP TABLE t1;
-End of 5.1 tests
+#
+# Additional coverage for refactoring which is made as part
+# of fix for Bug#27480 "Extend CREATE TEMPORARY TABLES privilege
+# to allow temp table operations".
+#
+# Check that OPTIMIZE table works for temporary InnoDB tables.
+DROP TABLE IF EXISTS t1;
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
+test.t1 optimize status OK
+DROP TABLE t1;
+#
+# Bug#11762345 54927: DROPPING AND ADDING AN INDEX IN ONE
+# COMMAND CAN FAIL IN INNODB PLUGIN 1.0
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (id int, a int, b int, PRIMARY KEY (id),
+INDEX a (a)) ENGINE=innodb;
+ALTER TABLE t1 DROP INDEX a, ADD INDEX a (b, a);
+ALTER TABLE t1 DROP INDEX a, ADD INDEX (a, b);
+DROP TABLE t1;
+End of 6.0 tests
diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
index 0c68c8a6975..746072781bd 100644
--- a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
+++ b/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
@@ -31,6 +31,11 @@ SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
col_1_varchar = REPEAT("c", 4000)
0
1
+ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+ALTER TABLE worklog5743 ROW_FORMAT=COMPACT;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+ALTER TABLE worklog5743 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
DROP TABLE worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
@@ -539,13 +544,15 @@ col_1_blob = REPEAT("c", 4000)
DROP TABLE worklog5743_key8;
CREATE TABLE worklog5743 (
col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
-col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000),
+col_3_text TEXT (4000), col_4_blob BLOB (4000), col_5_text TEXT (4000),
col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
) ROW_FORMAT=DYNAMIC, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
+CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
+CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
@@ -570,6 +577,19 @@ SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
col_1_varbinary = REPEAT("c", 4000)
1
0
+INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
+REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
+REPEAT("a", 4000) , REPEAT("a", 255)
+);
+CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
+CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
+CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
+UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
+WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
+ERROR HY000: Undo log record is too big.
+SHOW WARNINGS;
+Level Code Message
+Error 1713 Undo log record is too big.
DROP TABLE worklog5743;
CREATE TABLE worklog5743 (
col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
@@ -607,6 +627,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
ROLLBACK;
+UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
+WHERE col_1_varbinary = REPEAT("a", 4000)
+AND col_2_varchar = REPEAT("o", 4000);
+ERROR HY000: Undo log record is too big.
+SHOW WARNINGS;
+Level Code Message
+Error 1713 Undo log record is too big.
SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
col_1_varbinary = REPEAT("c", 4000)
@@ -873,6 +900,7 @@ SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
COMMIT;
+"Disconnect the connections 1 and 2"
DROP TABLE worklog5743;
CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
@@ -1172,7 +1200,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
-Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
col_1_varbinary = REPEAT("a", 4000)
@@ -1230,7 +1257,6 @@ DROP INDEX prefix_idx ON worklog5743;
CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
-Warning 1071 Specified key was too long; max key length is 3072 bytes
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
col_1_text = REPEAT("a", 4000)
@@ -1288,7 +1314,7 @@ AND col_2_text = REPEAT("o", 4000);
col_1_text = REPEAT("c", 4000)
ALTER TABLE worklog5743 DROP PRIMARY KEY;
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
-ERROR HY000: Too big row
+ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
col_1_text = REPEAT("a", 4000)
@@ -1343,11 +1369,22 @@ CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(767))
) engine = innodb;
+INSERT INTO worklog5743 VALUES(REPEAT('a',4000),REPEAT('b',4000));
CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000));
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 1
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
-Warning 1071 Specified key was too long; max key length is 767 bytes
+ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
+SHOW CREATE TABLE worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `col_1_varchar` varchar(4000) NOT NULL DEFAULT '',
+ `col_2_varchar` varchar(4000) DEFAULT NULL,
+ PRIMARY KEY (`col_1_varchar`(767)),
+ KEY `prefix_idx` (`col_1_varchar`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
DROP TABLE worklog5743;
-SET GLOBAL innodb_file_format=Antelope;
-SET GLOBAL innodb_file_per_table=0;
-SET GLOBAL innodb_large_prefix=0;
+"Disconnect the connection 1"
diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
index abd4c243912..e1f6f8608e1 100644
--- a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
+++ b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
@@ -86,5 +86,5 @@ col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
DROP TABLE worklog5743;
SET GLOBAL innodb_file_format=Antelope;
-SET GLOBAL innodb_file_per_table=0;
+SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=0;
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
index 07e9ca30fd6..fd90d5d92de 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc-44030.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+-- source include/have_innodb.inc
# embedded server ignores 'delayed', so skip this
-- source include/not_embedded.inc
@@ -27,8 +27,14 @@ SELECT * FROM t1;
# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621.
#-- error ER_AUTOINC_READ_FAILED,1467
INSERT INTO t1 VALUES(null);
+# Before WL#5534, the following statement would copy the table,
+# and effectively set AUTO_INCREMENT to 4, because while copying
+# it would write values 1,2,3 to the column.
+# WL#5534 makes this an in-place ALTER, setting AUTO_INCREMENT=3 for real.
ALTER TABLE t1 AUTO_INCREMENT = 3;
SHOW CREATE TABLE t1;
+-- error ER_DUP_ENTRY
+INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb/t/innodb-create-options.test
index 0f8e6f8dda2..c09d707ab11 100644
--- a/mysql-test/suite/innodb/t/innodb-create-options.test
+++ b/mysql-test/suite/innodb/t/innodb-create-options.test
@@ -55,8 +55,12 @@
# ignore all non-zero KEY_BLOCK_SIZEs.
#
# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors"
+# This test case does not try to create tables with KEY_BLOCK_SIZE > 4
+# since they are rejected for InnoDB page sizes of 8k and 16k.
+# See innodb_16k and innodb_8k for those tests.
-SET storage_engine=InnoDB;
+-- source include/have_innodb.inc
+SET default_storage_engine=InnoDB;
--disable_query_log
# These values can change during the test
@@ -76,10 +80,8 @@ SET SESSION innodb_strict_mode = ON;
DROP TABLE IF EXISTS t1;
--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
--echo # But it is an invalid mode in InnoDB
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -96,10 +98,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
@@ -108,29 +108,23 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
--echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
--echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ADD COLUMN f1 INT;
@@ -141,27 +135,19 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
--echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
@@ -173,31 +159,25 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 KEY_BLOCK_SIZE=2;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
-ALTER TABLE t1 KEY_BLOCK_SIZE=8;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 KEY_BLOCK_SIZE=16;
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
@@ -213,20 +193,14 @@ CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW CREATE TABLE t1;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPACT;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
@@ -240,10 +214,8 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
--echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
@@ -251,20 +223,14 @@ SHOW WARNINGS;
--echo # and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope;
DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
@@ -276,29 +242,21 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
-ALTER TABLE t1 KEY_BLOCK_SIZE=8;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
SET GLOBAL innodb_file_format=Barracuda;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD COLUMN f1 INT;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+SHOW CREATE TABLE t1;
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -312,20 +270,14 @@ SET GLOBAL innodb_file_format=Barracuda;
--echo # values during strict mode.
SET GLOBAL innodb_file_per_table=OFF;
DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
---replace_regex / - .*[0-9]*)/)/
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
---replace_regex / - .*[0-9]*)/)/
SHOW WARNINGS;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
@@ -337,20 +289,14 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 KEY_BLOCK_SIZE=1;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
@@ -365,10 +311,7 @@ SET GLOBAL innodb_file_per_table=ON;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_per_table=OFF;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
ALTER TABLE t1 ADD COLUMN f1 INT;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -422,14 +365,14 @@ CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ADD COLUMN f1 INT;
@@ -455,12 +398,12 @@ SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8;
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
@@ -489,14 +432,14 @@ SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
--echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
--echo # ALTER with each ROW_FORMAT
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
SHOW WARNINGS;
SHOW CREATE TABLE t1;
ALTER TABLE t1 ADD COLUMN f1 INT;
@@ -521,7 +464,8 @@ ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8
+--echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
+--echo # it defaults to half of the page size.
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
SHOW WARNINGS;
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index a8ef524c3e9..b9b98a98f58 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -7,127 +7,16 @@ let $format=`select @@innodb_file_format`;
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
-# Bug #12429576 - Test an assertion failure on purge.
-CREATE TABLE t1_purge (
-A INT,
-B BLOB, C BLOB, D BLOB, E BLOB,
-F BLOB, G BLOB, H BLOB,
-PRIMARY KEY (B(767), C(767), D(767), E(767), A),
-INDEX (A)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO t1_purge VALUES (1,
-REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
-REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766));
-
-CREATE TABLE t2_purge (
-A INT PRIMARY KEY,
-B BLOB, C BLOB, D BLOB, E BLOB,
-F BLOB, G BLOB, H BLOB, I BLOB,
-J BLOB, K BLOB, L BLOB,
-INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO t2_purge VALUES (1,
-REPEAT('b', 766), REPEAT('c', 766), REPEAT('d', 766), REPEAT('e', 766),
-REPEAT('f', 766), REPEAT('g', 766), REPEAT('h', 766), REPEAT('i', 766),
-REPEAT('j', 766), REPEAT('k', 766), REPEAT('l', 766));
-
-CREATE TABLE t3_purge (
-A INT,
-B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
-F VARCHAR(800), G VARCHAR(800), H VARCHAR(800),
-PRIMARY KEY (B(767), C(767), D(767), E(767), A),
-INDEX (A)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO t3_purge SELECT * FROM t1_purge;
-
-CREATE TABLE t4_purge (
-A INT PRIMARY KEY,
-B VARCHAR(800), C VARCHAR(800), D VARCHAR(800), E VARCHAR(800),
-F VARCHAR(800), G VARCHAR(800), H VARCHAR(800), I VARCHAR(800),
-J VARCHAR(800), K VARCHAR(800), L VARCHAR(800),
-INDEX (B(767))) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO t4_purge SELECT * FROM t2_purge;
-
-# This would trigger the failure (Bug #12429576)
-# if purge gets a chance to run before DROP TABLE t1_purge, ....
-DELETE FROM t1_purge;
-DELETE FROM t2_purge;
-DELETE FROM t3_purge;
-DELETE FROM t4_purge;
-# Instead of doing a --sleep 10, wait until the rest of the tests in
-# this file complete before dropping the tables. By then, the purge thread
-# will have delt with the updates above.
-
-# Bug#12637786 - Bad assert by purge thread for records with external data
-# used in secondary indexes.
-SET @r=REPEAT('a',500);
-CREATE TABLE t12637786(a INT,
- v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
- v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
- v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
- v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
- v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
- v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-CREATE INDEX idx1 ON t12637786(a,v1);
-INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
-UPDATE t12637786 SET a=1000;
-DELETE FROM t12637786;
-# We need to activate the purge thread at this point to make sure it does not
-# assert and is able to clean up the old versions of secondary index entries.
-# But instead of doing a --sleep 10, wait until the rest of the tests in
-# this file complete before dropping the table. By then, the purge thread
-# will have delt with the updates above.
-
-# Bug#12963823 - Test that the purge thread does not crash when
-# the number of indexes has changed since the UNDO record was logged.
-create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
- i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
- engine=innodb row_format=dynamic;
-SET @r = repeat('a', 767);
-insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
-create index ndx_a on t12963823 (a(500));
-create index ndx_b on t12963823 (b(500));
-create index ndx_c on t12963823 (c(500));
-create index ndx_d on t12963823 (d(500));
-create index ndx_e on t12963823 (e(500));
-create index ndx_f on t12963823 (f(500));
-create index ndx_k on t12963823 (k(500));
-create index ndx_l on t12963823 (l(500));
-
-SET @r = repeat('b', 500);
-update t12963823 set a=@r,b=@r,c=@r,d=@r;
-update t12963823 set e=@r,f=@r,g=@r,h=@r;
-update t12963823 set i=@r,j=@r,k=@r,l=@r;
-update t12963823 set m=@r,n=@r,o=@r,p=@r;
-alter table t12963823 drop index ndx_a;
-alter table t12963823 drop index ndx_b;
-create index ndx_g on t12963823 (g(500));
-create index ndx_h on t12963823 (h(500));
-create index ndx_i on t12963823 (i(500));
-create index ndx_j on t12963823 (j(500));
-create index ndx_m on t12963823 (m(500));
-create index ndx_n on t12963823 (n(500));
-create index ndx_o on t12963823 (o(500));
-create index ndx_p on t12963823 (p(500));
-show create table t12963823;
-# We need to activate the purge thread at this point to see if it crashes
-# but instead of doing a --sleep 10, wait until the rest of the tests in
-# this file complete before dropping the table. By then, the purge thread
-# will have delt with the updates above.
+SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
# Bug#13654923 BOGUS DEBUG ASSERTION IN INDEX CREATION FOR ZERO-LENGTH RECORD
create table t1(a varchar(2) primary key) engine=innodb;
insert into t1 values('');
+--enable_info
create index t1a1 on t1(a(1));
+--disable_info
drop table t1;
-eval set global innodb_file_per_table=$per_table;
-eval set global innodb_file_format=$format;
-
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
@@ -135,19 +24,30 @@ commit;
alter table t1 add index b (b), add index b (b);
--error ER_DUP_FIELDNAME
alter table t1 add index (b,b);
+--enable_info
alter table t1 add index d2 (d);
+--disable_info
show create table t1;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(d2) order by d;
select * from t1 force index (d2) order by d;
--error ER_DUP_ENTRY
alter table t1 add unique index (b);
show create table t1;
+--enable_info
alter table t1 add index (b);
+--disable_info
show create table t1;
+--enable_info
alter table t1 add unique index (c), add index (d);
+--disable_info
show create table t1;
+analyze table t1;
explain select * from t1 force index(c) order by c;
+--enable_info
alter table t1 add primary key (a), drop index c;
show create table t1;
--error ER_MULTIPLE_PRI_KEY
@@ -155,16 +55,23 @@ alter table t1 add primary key (c);
--error ER_DUP_ENTRY
alter table t1 drop primary key, add primary key (b);
create unique index c on t1 (c);
+--disable_info
show create table t1;
+analyze table t1;
explain select * from t1 force index(c) order by c;
select * from t1 force index(c) order by c;
+--enable_info
alter table t1 drop index b, add index (b);
+--disable_info
show create table t1;
insert into t1 values(6,1,'ggg','ggg');
select * from t1;
select * from t1 force index(b) order by b;
select * from t1 force index(c) order by c;
select * from t1 force index(d) order by d;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(b) order by b;
explain select * from t1 force index(c) order by c;
explain select * from t1 force index(d) order by d;
@@ -174,11 +81,16 @@ drop table t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ad','ad'),(4,4,'afe','afe');
commit;
+--enable_info
alter table t1 add index (c(2));
show create table t1;
alter table t1 add unique index (d(10));
show create table t1;
+--disable_info
insert into t1 values(5,1,'ggg','ggg');
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
select * from t1;
select * from t1 force index(c) order by c;
select * from t1 force index(d) order by d;
@@ -186,10 +98,15 @@ explain select * from t1 order by b;
explain select * from t1 force index(c) order by c;
explain select * from t1 force index(d) order by d;
show create table t1;
+--enable_info
alter table t1 drop index d;
+--disable_info
insert into t1 values(8,9,'fff','fff');
select * from t1;
select * from t1 force index(c) order by c;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 order by b;
explain select * from t1 force index(c) order by c;
explain select * from t1 order by d;
@@ -199,23 +116,38 @@ drop table t1;
create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
commit;
+--enable_info
alter table t1 add unique index (b,c);
+--disable_info
insert into t1 values(8,9,'fff','fff');
select * from t1;
select * from t1 force index(b) order by b;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(b) order by b;
show create table t1;
+--enable_info
alter table t1 add index (b,c);
+--disable_info
insert into t1 values(11,11,'kkk','kkk');
select * from t1;
select * from t1 force index(b) order by b;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(b) order by b;
show create table t1;
+--enable_info
alter table t1 add unique index (c,d);
+--disable_info
insert into t1 values(13,13,'yyy','aaa');
select * from t1;
select * from t1 force index(b) order by b;
select * from t1 force index(c) order by c;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(b) order by b;
explain select * from t1 force index(c) order by c;
show create table t1;
@@ -224,9 +156,9 @@ drop table t1;
create table t1(a int not null, b int not null, c int, primary key (a), key (b)) engine = innodb;
create table t3(a int not null, c int not null, d int, primary key (a), key (c)) engine = innodb;
create table t4(a int not null, d int not null, e int, primary key (a), key (d)) engine = innodb;
-create table t2(a int not null, b int not null, c int not null, d int not null, e int,
-foreign key (b) references t1(b) on delete cascade,
-foreign key (c) references t3(c), foreign key (d) references t4(d))
+create table t2(a int not null, b int, c int, d int, e int,
+foreign key (b) references t1(b) on delete set null,
+foreign key (c) references t3(c), foreign key (d) references t4(d) on update set null)
engine = innodb;
--error ER_DROP_INDEX_FK
alter table t1 drop index b;
@@ -238,38 +170,80 @@ alter table t4 drop index d;
alter table t2 drop index b;
--error ER_DROP_INDEX_FK
alter table t2 drop index b, drop index c, drop index d;
+--error ER_FK_COLUMN_CANNOT_CHANGE
+alter table t2 MODIFY b INT NOT NULL, ALGORITHM=COPY;
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+set @old_sql_mode = @@sql_mode;
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+--error ER_FK_COLUMN_NOT_NULL
+alter table t2 MODIFY b INT NOT NULL, ALGORITHM=INPLACE;
+set @@sql_mode = @old_sql_mode;
+
+SET FOREIGN_KEY_CHECKS=0;
+--error ER_FK_COLUMN_CANNOT_DROP
+alter table t2 DROP COLUMN b, ALGORITHM=COPY;
+--error ER_FK_COLUMN_CANNOT_DROP
+alter table t2 DROP COLUMN b;
+--error ER_FK_COLUMN_CANNOT_DROP_CHILD
+alter table t1 DROP COLUMN b, ALGORITHM=COPY;
+--error ER_FK_COLUMN_CANNOT_DROP_CHILD
+alter table t1 DROP COLUMN b;
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
+
+--enable_info
# Apparently, the following makes mysql_alter_table() drop index d.
create unique index dc on t2 (d,c);
create index dc on t1 (b,c);
# This should preserve the foreign key constraints.
-alter table t2 add primary key (a);
+--disable_info
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+# And adding a PRIMARY KEY will also add NOT NULL implicitly!
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+--enable_info
+--error ER_FK_COLUMN_NOT_NULL
+alter table t2 add primary key (alpha), change a alpha int,
+change b beta int not null, change c charlie int not null;
+--error ER_FK_COLUMN_NOT_NULL
+alter table t2 add primary key (alpha), change a alpha int,
+change c charlie int not null, change d delta int not null;
+alter table t2 add primary key (alpha), change a alpha int,
+change b beta int, modify c int not null;
+--disable_info
+set @@sql_mode = @old_sql_mode;
insert into t1 values (1,1,1);
insert into t3 values (1,1,1);
insert into t4 values (1,1,1);
insert into t2 values (1,1,1,1,1);
commit;
+--enable_info
alter table t4 add constraint dc foreign key (a) references t1(a);
+--disable_info
show create table t4;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLD_DATADIR ./ master-data/ ''
# a foreign key 'test/dc' already exists
--error ER_CANT_CREATE_TABLE
alter table t3 add constraint dc foreign key (a) references t1(a);
+SET FOREIGN_KEY_CHECKS=0;
+--error ER_FK_FAIL_ADD_SYSTEM
+alter table t3 add constraint dc foreign key (a) references t1(a);
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
show create table t3;
-# this should be fixed by MySQL (see Bug #51451)
---error ER_WRONG_NAME_FOR_INDEX
-alter table t2 drop index b, add index (b);
+--enable_info
+alter table t2 drop index b, add index (beta);
+--disable_info
show create table t2;
--error ER_ROW_IS_REFERENCED_2
delete from t1;
--error ER_CANT_DROP_FIELD_OR_KEY
drop index dc on t4;
-# there is no foreign key dc on t3
---replace_regex /'[^']*test\/#sql2-[0-9a-f-]*'/'#sql2-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLD_DATADIR ./ master-data/ ''
---error ER_ERROR_ON_RENAME
+--enable_info
+--error ER_CANT_DROP_FIELD_OR_KEY
alter table t3 drop foreign key dc;
alter table t4 drop foreign key dc;
+--disable_info
select * from t2;
delete from t1;
select * from t2;
@@ -311,10 +285,15 @@ drop table t1;
create table t1(a int not null, b int not null, c int, primary key (a), key(c)) engine=innodb;
insert into t1 values (5,1,5),(4,2,4),(3,3,3),(2,4,2),(1,5,1);
+--enable_info
alter table t1 add unique index (b);
+--disable_info
insert into t1 values (10,20,20),(11,19,19),(12,18,18),(13,17,17);
show create table t1;
check table t1;
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
explain select * from t1 force index(c) order by c;
explain select * from t1 order by a;
explain select * from t1 force index(b) order by b;
@@ -325,11 +304,14 @@ drop table t1;
create table t1(a int not null, b int not null) engine=innodb;
insert into t1 values (1,1);
+--enable_info
alter table t1 add primary key(b);
+--disable_info
insert into t1 values (2,2);
show create table t1;
check table t1;
select * from t1;
+analyze table t1;
explain select * from t1;
explain select * from t1 order by a;
explain select * from t1 order by b;
@@ -338,205 +320,19 @@ drop table t1;
create table t1(a int not null) engine=innodb;
insert into t1 values (1);
+--enable_info
alter table t1 add primary key(a);
+--disable_info
insert into t1 values (2);
show create table t1;
check table t1;
commit;
select * from t1;
+analyze table t1;
explain select * from t1;
explain select * from t1 order by a;
drop table t1;
-create table t2(d varchar(17) primary key) engine=innodb default charset=utf8;
-create table t3(a int primary key) engine=innodb;
-
-insert into t3 values(22),(44),(33),(55),(66);
-
-insert into t2 values ('jejdkrun87'),('adfd72nh9k'),
-('adfdpplkeock'),('adfdijnmnb78k'),('adfdijn0loKNHJik');
-
-create table t1(a int, b blob, c text, d text not null)
-engine=innodb default charset = utf8;
-
-# r2667 The following test is disabled because MySQL behavior changed.
-# r2667 The test was added with this comment:
-# r2667
-# r2667 ------------------------------------------------------------------------
-# r2667 r1699 | marko | 2007-08-10 19:53:19 +0300 (Fri, 10 Aug 2007) | 5 lines
-# r2667
-# r2667 branches/zip: Add changes that accidentally omitted from r1698:
-# r2667
-# r2667 innodb-index.test, innodb-index.result: Add a test for creating
-# r2667 a PRIMARY KEY on a column that contains a NULL value.
-# r2667 ------------------------------------------------------------------------
-# r2667
-# r2667 but in BZR-r2667:
-# r2667 http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.1/revision/davi%40mysql.com-20080617141221-8yre8ys9j4uw3xx5?start_revid=joerg%40mysql.com-20080630105418-7qoe5ehomgrcdb89
-# r2667 MySQL changed the behavior to do full table copy when creating PRIMARY INDEX
-# r2667 on a non-NULL column instead of calling ::add_index() which would fail (and
-# r2667 this is what we were testing here). Before r2667 the code execution path was
-# r2667 like this (when adding PRIMARY INDEX on a non-NULL column with ALTER TABLE):
-# r2667
-# r2667 mysql_alter_table()
-# r2667 compare_tables() // would return ALTER_TABLE_INDEX_CHANGED
-# r2667 ::add_index() // would fail with "primary index cannot contain NULL"
-# r2667
-# r2667 after r2667 the code execution path is the following:
-# r2667
-# r2667 mysql_alter_table()
-# r2667 compare_tables() // returns ALTER_TABLE_DATA_CHANGED
-# r2667 full copy is done, without calling ::add_index()
-# r2667
-# r2667 To enable, remove "# r2667: " below.
-# r2667
-# r2667: insert into t1 values (null,null,null,'null');
-insert into t1
-select a,left(repeat(d,100*a),65535),repeat(d,20*a),d from t2,t3;
-drop table t2, t3;
-select count(*) from t1 where a=44;
-select a,
-length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a),d from t1;
-# r2667: --error ER_PRIMARY_CANT_HAVE_NULL
-# r2667: alter table t1 add primary key (a), add key (b(20));
-# r2667: delete from t1 where d='null';
---error ER_DUP_ENTRY
-alter table t1 add primary key (a), add key (b(20));
-delete from t1 where a%2;
-check table t1;
-alter table t1 add primary key (a,b(255),c(255)), add key (b(767));
-select count(*) from t1 where a=44;
-select a,
-length(b),b=left(repeat(d,100*a),65535),length(c),c=repeat(d,20*a),d from t1;
-show create table t1;
-check table t1;
-explain select * from t1 where b like 'adfd%';
-
-# The following tests are disabled because of the introduced timeouts for
-# metadata locks at the MySQL level as part of the fix for
-# Bug#45225 Locking: hang if drop table with no timeout
-# The following commands now play with MySQL metadata locks instead of
-# InnoDB locks
-# start disabled45225_1
-##
-## Test locking
-##
-#
-#create table t2(a int, b varchar(255), primary key(a,b)) engine=innodb;
-#insert into t2 select a,left(b,255) from t1;
-#drop table t1;
-#rename table t2 to t1;
-#
-#connect (a,localhost,root,,);
-#connect (b,localhost,root,,);
-#connection a;
-#set innodb_lock_wait_timeout=1;
-#begin;
-## Obtain an IX lock on the table
-#select a from t1 limit 1 for update;
-#connection b;
-#set innodb_lock_wait_timeout=1;
-## This would require an S lock on the table, conflicting with the IX lock.
-#--error ER_LOCK_WAIT_TIMEOUT
-#create index t1ba on t1 (b,a);
-#connection a;
-#commit;
-#begin;
-## Obtain an IS lock on the table
-#select a from t1 limit 1 lock in share mode;
-#connection b;
-## This will require an S lock on the table. No conflict with the IS lock.
-#create index t1ba on t1 (b,a);
-## This would require an X lock on the table, conflicting with the IS lock.
-#--error ER_LOCK_WAIT_TIMEOUT
-#drop index t1ba on t1;
-#connection a;
-#commit;
-#explain select a from t1 order by b;
-#--send
-#select a,sleep(2+a/100) from t1 order by b limit 3;
-#
-## The following DROP INDEX will succeed, altough the SELECT above has
-## opened a read view. However, during the execution of the SELECT,
-## MySQL should hold a table lock that should block the execution
-## of the DROP INDEX below.
-#
-#connection b;
-#select sleep(1);
-#drop index t1ba on t1;
-#
-## After the index was dropped, subsequent SELECTs will use the same
-## read view, but they should not be accessing the dropped index any more.
-#
-#connection a;
-#reap;
-#explain select a from t1 order by b;
-#select a from t1 order by b limit 3;
-#commit;
-#
-#connection default;
-#disconnect a;
-#disconnect b;
-#
-# end disabled45225_1
-drop table t1;
-
-set global innodb_file_per_table=on;
-set global innodb_file_format='Barracuda';
-# Test creating a table that could lead to undo log overflow.
-# In the undo log, we write a 768-byte prefix (REC_MAX_INDEX_COL_LEN)
-# of each externally stored column that appears as a column prefix in an index.
-# For this test case, it would suffice to write 1 byte, though.
-create table t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
- i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob,
- q blob,r blob,s blob,t blob,u blob)
- engine=innodb row_format=dynamic;
-create index t1a on t1 (a(767));
-create index t1b on t1 (b(767));
-create index t1c on t1 (c(767));
-create index t1d on t1 (d(767));
-create index t1e on t1 (e(767));
-create index t1f on t1 (f(767));
-create index t1g on t1 (g(767));
-create index t1h on t1 (h(767));
-create index t1i on t1 (i(767));
-create index t1j on t1 (j(767));
-create index t1k on t1 (k(767));
-create index t1l on t1 (l(767));
-create index t1m on t1 (m(767));
-create index t1n on t1 (n(767));
-create index t1o on t1 (o(767));
-create index t1p on t1 (p(767));
-create index t1q on t1 (q(767));
-create index t1r on t1 (r(767));
-create index t1s on t1 (s(767));
-create index t1t on t1 (t(767));
---error 139
-create index t1u on t1 (u(767));
---error 139
-create index t1ut on t1 (u(767), t(767));
-create index t1st on t1 (s(767), t(767));
-show create table t1;
---error 139
-create index t1u on t1 (u(767));
-alter table t1 row_format=compact;
-create index t1u on t1 (u(767));
-
-drop table t1;
-
-# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
-CREATE TABLE bug12547647(
-a INT NOT NULL, b BLOB NOT NULL, c TEXT,
-PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
-) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
-
-INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7751));
-COMMIT;
-# The following used to cause infinite undo log allocation.
---error ER_UNDO_RECORD_TOO_BIG
-UPDATE bug12547647 SET c = REPEAT('b',16928);
-DROP TABLE bug12547647;
-
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;
eval set global innodb_file_format_max=$format;
@@ -546,7 +342,7 @@ eval set global innodb_file_format_max=$format;
# constraint modifications (Issue #70, Bug #38786)
#
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
-SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
+SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
c1 BIGINT(12) NOT NULL,
@@ -589,8 +385,10 @@ CREATE TABLE t2(
PRIMARY KEY (c1,c2,c3)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3) REFERENCES t1(c1);
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SHOW CREATE TABLE t2;
@@ -620,26 +418,60 @@ CREATE TABLE t2(
PRIMARY KEY (c1)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+SET FOREIGN_KEY_CHECKS=0;
+--enable_info
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+ FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
+--error ER_FK_NO_INDEX_PARENT
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+ FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
+--error ER_FK_NO_INDEX_PARENT
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
---error ER_CANT_CREATE_TABLE
+
+# FIXME (WL#6251 problem): this should fail, like the ALGORITHM=COPY below
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
+ALTER TABLE t2 DROP FOREIGN KEY fk_t2_ca;
+
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLD_DATADIR ./ master-data/ ''
+--error ER_CANT_CREATE_TABLE
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+ FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
+
ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
---replace_regex /#sql-[0-9a-f_]+/#sql-temporary/
+# mysqltest first does replace_regex, then replace_result
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+# Embedded server doesn't chdir to data directory
+--replace_result $MYSQLD_DATADIR ./ master-data/ ''
--error ER_CANT_CREATE_TABLE
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
+ FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
+--error ER_FK_NO_INDEX_PARENT
+ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
+
+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
+
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
CREATE INDEX i_t2_c2_c1 ON t2(c2, c1);
@@ -648,40 +480,79 @@ CREATE INDEX i_t2_c3_c1_c2 ON t2(c3, c1, c2);
SHOW CREATE TABLE t2;
CREATE INDEX i_t2_c3_c2 ON t2(c3, c2);
SHOW CREATE TABLE t2;
+--disable_info
DROP TABLE t2;
DROP TABLE t1;
-# The following tests are disabled because of the introduced timeouts for
-# metadata locks at the MySQL level as part of the fix for
-# Bug#45225 Locking: hang if drop table with no timeout
-# The following CREATE INDEX t1a ON t1(a); causes a lock wait timeout
-# start disabled45225_2
-#connect (a,localhost,root,,);
-#connect (b,localhost,root,,);
-#connection a;
-#CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
-#INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
-#connection b;
-#BEGIN;
-#SELECT * FROM t1;
-#connection a;
-#CREATE INDEX t1a ON t1(a);
-#connection b;
-#SELECT * FROM t1;
-#--error ER_TABLE_DEF_CHANGED
-#SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
-#SELECT * FROM t1;
-#COMMIT;
-#SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a;
-#connection default;
-#disconnect a;
-#disconnect b;
-#
-#DROP TABLE t1;
-# end disabled45225_2
-#this delay is needed because 45225_2 is disabled, to allow the purge to run
-SELECT SLEEP(10);
-DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
-DROP TABLE t12637786;
-DROP TABLE t12963823;
+connect (a,localhost,root,,);
+connect (b,localhost,root,,);
+connection a;
+CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
+CREATE TABLE t2 (a INT, b CHAR(1)) ENGINE=InnoDB;
+CREATE TABLE t2i (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
+CREATE TABLE t2c (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
+INSERT INTO t2 SELECT * FROM t1;
+INSERT INTO t2i SELECT * FROM t1;
+INSERT INTO t2c SELECT * FROM t1;
+connection b;
+BEGIN;
+# This acquires a MDL lock on t1 until commit.
+SELECT * FROM t1;
+connection a;
+# This times out before of the MDL lock held by connection b.
+SET lock_wait_timeout=1;
+--error ER_LOCK_WAIT_TIMEOUT
+CREATE INDEX t1a ON t1(a);
+--enable_info
+CREATE INDEX t2a ON t2(a);
+--disable_info
+set @old_sql_mode = @@sql_mode;
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+# And adding a PRIMARY KEY will also add NOT NULL implicitly!
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+--enable_info
+ALTER TABLE t2i ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=INPLACE;
+--disable_info
+set @@sql_mode = @old_sql_mode;
+--enable_info
+ALTER TABLE t2c ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=COPY;
+--disable_info
+connection b;
+# t2i and t2c are too new for this transaction, because they were rebuilt
+--error ER_TABLE_DEF_CHANGED
+SELECT * FROM t2i;
+--error ER_TABLE_DEF_CHANGED
+SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
+--error ER_TABLE_DEF_CHANGED
+SELECT * FROM t2c;
+--error ER_TABLE_DEF_CHANGED
+SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
+# In t2, only the new index t2a is too new for this transaction.
+SELECT * FROM t2;
+--error ER_TABLE_DEF_CHANGED
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+SELECT * FROM t2;
+COMMIT;
+# For a new transaction, all of t2, t2i, t2c are accessible.
+SELECT * FROM t2;
+SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
+SELECT * FROM t2i;
+SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
+SELECT * FROM t2c;
+SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
+connection default;
+disconnect a;
+disconnect b;
+
+--error ER_DUP_KEYNAME
+alter table t2 add index t2a(b);
+alter table t2 drop index t2a, add index t2a(b);
+show create table t2;
+show create table t2i;
+show create table t2c;
+
+--disable_info
+
+DROP TABLE t1,t2,t2c,t2i;
diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test
index 5de41ea6c37..1d904f69ffc 100644
--- a/mysql-test/suite/innodb/t/innodb-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-zip.test
@@ -14,10 +14,15 @@ SELECT table_name, row_format, data_length, index_length
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
+SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
+
+
+--let $query_i_s = SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
+SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
create table t00(a int primary key) engine=innodb
@@ -49,20 +54,20 @@ create table t13(a int primary key) engine=innodb
row_format=compressed;
create table t14(a int primary key) engine=innodb key_block_size=9;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid} 2048 {valid}
+--eval $query_i_s
drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14;
alter table t1 key_block_size=0;
alter table t1 row_format=dynamic;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
+--eval $query_i_s
alter table t1 row_format=compact;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
+--eval $query_i_s
alter table t1 row_format=redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
+--eval $query_i_s
drop table t1;
create table t1(a int not null, b text, index(b(10))) engine=innodb
@@ -94,35 +99,15 @@ connection default;
disconnect a;
disconnect b;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+analyze table t1;
+analyze table t2;
+--replace_result 16384 {valid} 12288 {valid}
+--eval $query_i_s
drop table t1,t2;
-# The following should fail in non-strict mode too.
-# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.)
-SET SESSION innodb_strict_mode = off;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
-CREATE TABLE t1(
- c TEXT NOT NULL, d TEXT NOT NULL,
- PRIMARY KEY (c(767),d(767)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
-drop table t1;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438)))
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
-INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512));
-DROP TABLE t1;
+#
+# Bug #50945 moved to innodb_16k.test, innodb_8k.test, & innodb_4k.test
+#
#
# Test blob column inheritance (mantis issue#36)
@@ -188,18 +173,18 @@ set innodb_strict_mode = on;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 9;
---replace_regex / - .*[0-9]*)/)/
show warnings;
create table t3 (id int primary key) engine = innodb key_block_size = 1;
create table t4 (id int primary key) engine = innodb key_block_size = 2;
create table t5 (id int primary key) engine = innodb key_block_size = 4;
-create table t6 (id int primary key) engine = innodb key_block_size = 8;
-create table t7 (id int primary key) engine = innodb key_block_size = 16;
+# These tests are now done in innodb_16k, innodb_8k and innodb_4k
+# where they get different result depending on page size
+# create table t6 (id int primary key) engine = innodb key_block_size = 8;
+# create table t7 (id int primary key) engine = innodb key_block_size = 16;
#check various ROW_FORMAT values.
create table t8 (id int primary key) engine = innodb row_format = compressed;
@@ -207,156 +192,110 @@ create table t9 (id int primary key) engine = innodb row_format = dynamic;
create table t10(id int primary key) engine = innodb row_format = compact;
create table t11(id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
-drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11;
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid} 2048 {valid}
+--eval $query_i_s
+drop table t1, t3, t4, t5, t8, t9, t10, t11;
#test different values of ROW_FORMAT with KEY_BLOCK_SIZE
create table t1 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compressed;
+key_block_size = 4 row_format = compressed;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb
-key_block_size = 8 row_format = redundant;
---replace_regex / - .*[0-9]*)/)/
+key_block_size = 4 row_format = redundant;
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb
-key_block_size = 8 row_format = compact;
---replace_regex / - .*[0-9]*)/)/
+key_block_size = 4 row_format = compact;
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t4 (id int primary key) engine = innodb
-key_block_size = 8 row_format = dynamic;
---replace_regex / - .*[0-9]*)/)/
+key_block_size = 4 row_format = dynamic;
show warnings;
create table t5 (id int primary key) engine = innodb
-key_block_size = 8 row_format = default;
+key_block_size = 4 row_format = default;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--eval $query_i_s
drop table t1, t5;
#test multiple errors
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb
key_block_size = 9 row_format = redundant;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = compact;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb
key_block_size = 9 row_format = dynamic;
---replace_regex / - .*[0-9]*)/)/
show warnings;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--eval $query_i_s
#test valid values with innodb_file_per_table unset
set global innodb_file_per_table = off;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb key_block_size = 1;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 2;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb key_block_size = 4;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
---error ER_CANT_CREATE_TABLE
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
---replace_regex / - .*[0-9]*)/)/
-show warnings;
---replace_regex / - .*[0-9]*)/)/
---error ER_CANT_CREATE_TABLE
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
---replace_regex / - .*[0-9]*)/)/
-show warnings;
---replace_regex / - .*[0-9]*)/)/
+
+# Tests for key_block_size = 8 and 16 were moved to innodb_16k, innodb_8k
+# and innodb_4k since they get different warnings with smaller page sizes.
+
--error ER_CANT_CREATE_TABLE
create table t6 (id int primary key) engine = innodb row_format = compressed;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic;
---replace_regex / - .*[0-9]*)/)/
show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
+--eval $query_i_s
drop table t8, t9;
#test valid values with innodb_file_format unset
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t1 (id int primary key) engine = innodb key_block_size = 1;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t2 (id int primary key) engine = innodb key_block_size = 2;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t3 (id int primary key) engine = innodb key_block_size = 4;
---replace_regex / - .*[0-9]*)/)/
-show warnings;
---replace_regex / - .*[0-9]*)/)/
---error ER_CANT_CREATE_TABLE
-create table t4 (id int primary key) engine = innodb key_block_size = 8;
---replace_regex / - .*[0-9]*)/)/
-show warnings;
---replace_regex / - .*[0-9]*)/)/
---error ER_CANT_CREATE_TABLE
-create table t5 (id int primary key) engine = innodb key_block_size = 16;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
+
+# Tests for key_block_size = 8 and 16 were moved to innodb_16k, innodb_8k
+# and innodb_4k since they get different warnings with smaller page sizes.
+
--error ER_CANT_CREATE_TABLE
create table t6 (id int primary key) engine = innodb row_format = compressed;
---replace_regex / - .*[0-9]*)/)/
show warnings;
---replace_regex / - .*[0-9]*)/)/
--error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic;
---replace_regex / - .*[0-9]*)/)/
show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
-SELECT table_schema, table_name, row_format, data_length, index_length
-FROM information_schema.tables WHERE table_schema='mysqltest_innodb_zip';
+--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
+--eval $query_i_s
drop table t8, t9;
eval set global innodb_file_per_table=$per_table;
@@ -374,7 +313,7 @@ create table normal_table (
select @@innodb_file_format_max;
create table zip_table (
c1 int
-) engine = innodb key_block_size = 8;
+) engine = innodb key_block_size = 4;
select @@innodb_file_format_max;
set global innodb_file_format_max=`Antelope`;
select @@innodb_file_format_max;
@@ -394,5 +333,8 @@ eval set global innodb_file_format=$format;
eval set global innodb_file_per_table=$per_table;
eval set session innodb_strict_mode=$innodb_strict_mode_orig;
+SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
+
USE test;
DROP DATABASE mysqltest_innodb_zip;
+
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 532870fd29c..e2056d66855 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -20,10 +20,11 @@
#######################################################################
-- source include/have_innodb.inc
+
let $MYSQLD_DATADIR= `select @@datadir`;
+
let collation=utf8_unicode_ci;
--source include/have_collation.inc
-
set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
# Save the original values of some variables in order to be able to
@@ -445,21 +446,11 @@ INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca
select count(*) from t1 where sca_code = 'PD';
select count(*) from t1 where sca_code <= 'PD';
select count(*) from t1 where sca_pic is null;
-# this should be fixed by MySQL (see Bug #51451)
-# now that http://bugs.mysql.com/49838 is fixed the following ALTER does
-# copy the table instead of failing
-# --error ER_WRONG_NAME_FOR_INDEX
alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
-alter table t1 drop index sca_pic;
-alter table t1 add index sca_pic (cat_code, sca_pic);
select count(*) from t1 where sca_code='PD' and sca_pic is null;
select count(*) from t1 where cat_code='E';
-# this should be fixed by MySQL (see Bug #51451)
---error ER_WRONG_NAME_FOR_INDEX
alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
-alter table t1 drop index sca_pic;
-alter table t1 add index (sca_pic, cat_code);
select count(*) from t1 where sca_code='PD' and sca_pic is null;
select count(*) from t1 where sca_pic >= 'n';
select sca_pic from t1 where sca_pic is null;
@@ -1259,7 +1250,7 @@ drop table t1;
#
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
---error 1765
+--error 1764
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
DROP TABLE t1;
@@ -2323,12 +2314,12 @@ CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLD_DATADIR ./ master-data/ ''
---error 1025
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+set @old_sql_mode = @@sql_mode;
+set @@sql_mode = 'STRICT_TRANS_TABLES';
+--error ER_FK_COLUMN_NOT_NULL
ALTER TABLE t2 MODIFY a INT NOT NULL;
+set @@sql_mode = @old_sql_mode;
DELETE FROM t1;
DROP TABLE t2,t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug21704.test b/mysql-test/suite/innodb/t/innodb_bug21704.test
index 67d76587819..82e7c81d0e4 100644
--- a/mysql-test/suite/innodb/t/innodb_bug21704.test
+++ b/mysql-test/suite/innodb/t/innodb_bug21704.test
@@ -1,4 +1,5 @@
---source include/have_innodb.inc
+-- source include/have_innodb.inc
+
--echo #
--echo # Bug#21704: Renaming column does not update FK definition.
--echo #
@@ -8,12 +9,6 @@
--echo # foreign key (either in the referencing or referenced table).
--echo
---disable_warnings
-DROP TABLE IF EXISTS t1;
-DROP TABLE IF EXISTS t2;
-DROP TABLE IF EXISTS t3;
---enable_warnings
-
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
@@ -32,64 +27,50 @@ INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
--echo # Test renaming the column in the referenced table.
--echo
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error ER_ERROR_ON_RENAME
-ALTER TABLE t1 CHANGE a c INT;
+--enable_info
+ALTER TABLE t1 CHANGE a e INT;
--echo # Ensure that online column rename works.
---enable_info
ALTER TABLE t1 CHANGE b c INT;
---disable_info
--echo
--echo # Test renaming the column in the referencing table
--echo
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error ER_ERROR_ON_RENAME
-ALTER TABLE t2 CHANGE a c INT;
+ALTER TABLE t2 CHANGE a z INT;
--echo # Ensure that online column rename works.
---enable_info
ALTER TABLE t2 CHANGE b c INT;
---disable_info
--echo
--echo # Test with self-referential constraints
--echo
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error ER_ERROR_ON_RENAME
-ALTER TABLE t3 CHANGE a d INT;
+ALTER TABLE t3 CHANGE a f INT;
-# mysqltest first does replace_regex, then replace_result
---replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
-# Embedded server doesn't chdir to data directory
---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
---error ER_ERROR_ON_RENAME
-ALTER TABLE t3 CHANGE b d INT;
+ALTER TABLE t3 CHANGE b g INT;
--echo # Ensure that online column rename works.
---enable_info
ALTER TABLE t3 CHANGE c d INT;
---disable_info
--echo
--echo # Cleanup.
--echo
+--disable_info
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t2;
+SHOW CREATE TABLE t3;
+
+SELECT f.*, c.*
+FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS c
+INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_FOREIGN f
+ON c.ID=f.ID
+WHERE FOR_NAME LIKE 'test/t%';
+
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb/t/innodb_bug52745.test
index 58bcc264677..3c5d79826f0 100644
--- a/mysql-test/suite/innodb/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb/t/innodb_bug52745.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+-- source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb/t/innodb_bug53591.test
index 9a1c2afbccb..8bc461719b8 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53591.test
@@ -1,4 +1,4 @@
---source include/have_innodb.inc
+-- source include/have_innodb.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
@@ -10,8 +10,10 @@ set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
--- error 139
+-- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
+-- error ER_TOO_BIG_ROWSIZE
ALTER TABLE bug53591 ADD PRIMARY KEY(a(220));
+-- replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
SHOW WARNINGS;
DROP TABLE bug53591;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53592.test b/mysql-test/suite/innodb/t/innodb_bug53592.test
index 9bf8578eafa..6c0f5a8422d 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53592.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53592.test
@@ -1,8 +1,8 @@
---source include/have_innodb.inc
# Testcase for Bug #53592 - "crash replacing duplicates into
# table after fast alter table added unique key". The fix is to make
# sure index number lookup should go through "index translation table".
+--source include/have_innodb.inc
# Use FIC for index creation
set old_alter_table=0;
diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test
index 013a7ff1e93..13c37d9c841 100644
--- a/mysql-test/suite/innodb/t/innodb_bug54044.test
+++ b/mysql-test/suite/innodb/t/innodb_bug54044.test
@@ -1,12 +1,19 @@
---source include/have_innodb.inc
# This is the test for bug #54044. Special handle MYSQL_TYPE_NULL type
# during create table, so it will not trigger assertion failure.
+--source include/have_innodb.inc
# This 'create table' operation no longer uses the NULL datatype.
CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB
AS SELECT IF(NULL IS NOT NULL, NULL, NULL);
SHOW CREATE TABLE table_54044;
-CREATE TEMPORARY TABLE tmp1 ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL);
-CREATE TEMPORARY TABLE tmp2 ENGINE = INNODB AS SELECT GREATEST(NULL, NULL);
+DROP TABLE table_54044;
+
+# These 'create table' operations should fail because of
+# using NULL datatype
+
+CREATE TABLE tmp ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL), GREATEST(NULL, NULL), NULL;
+SHOW CREATE TABLE tmp;
+DROP TABLE tmp;
+
diff --git a/mysql-test/suite/innodb/t/innodb_bug56947.test b/mysql-test/suite/innodb/t/innodb_bug56947.test
index b6feb239314..4cefeb391cf 100644
--- a/mysql-test/suite/innodb/t/innodb_bug56947.test
+++ b/mysql-test/suite/innodb/t/innodb_bug56947.test
@@ -1,15 +1,17 @@
---source include/have_innodb.inc
#
# Bug #56947 valgrind reports a memory leak in innodb-plugin.innodb-index
#
-SET @old_innodb_file_per_table=@@innodb_file_per_table;
-# avoid a message about filed *.ibd file creation in the error log
+-- source include/have_innodb.inc
+-- source include/have_debug.inc
+
SET GLOBAL innodb_file_per_table=0;
create table bug56947(a int not null) engine = innodb;
-CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
---error 156
+
+SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
+--error ER_GET_ERRNO
alter table bug56947 add unique index (a);
-drop table `bug56947#1`;
+SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
+check table bug56947;
+
drop table bug56947;
---disable_query_log
-SET GLOBAL innodb_file_per_table=@old_innodb_file_per_table;
+SET @@global.innodb_file_per_table=DEFAULT;
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049.test b/mysql-test/suite/innodb/t/innodb_bug60049.test
index 70fec8cb959..6760d1a1f02 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60049.test
@@ -6,10 +6,8 @@
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
-#
-# This test will not work if we don't do full shutdown of innodb
-#
-set @@global.innodb_fast_shutdown=0;
+call mtr.add_suppression('InnoDB: Error: Table "mysql"."innodb_(table|index)_stats" not found');
+call mtr.add_suppression('InnoDB: Error: Fetch of persistent statistics requested');
-- disable_query_log
let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1);
@@ -18,7 +16,7 @@ DROP TABLE mysql.innodb_index_stats;
DROP TABLE mysql.innodb_table_stats;
-- enable_query_log
-CREATE TABLE t(a INT)ENGINE=InnoDB;
+CREATE TABLE t(a INT)ENGINE=InnoDB STATS_PERSISTENT=0;
RENAME TABLE t TO u;
DROP TABLE u;
SELECT @@innodb_fast_shutdown;
diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
index b8d19ddfcee..c57e52b65cc 100644
--- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
+++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
@@ -2,6 +2,7 @@
# Test for persistent corrupt bit for corrupted index and table
#
-- source include/have_innodb.inc
+-- source include/have_innodb_16k.inc
# Issues with innodb_change_buffering_debug on Windows, so the test scenario
# cannot be created on windows
@@ -11,6 +12,7 @@
--source include/have_debug.inc
-- disable_query_log
+call mtr.add_suppression("Flagged corruption of idx.*in CHECK TABLE");
# This test setup is extracted from bug56680.test:
# The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when
diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/suite/innodb/t/innodb_file_format.test
index 941edb728dd..f45083101c0 100644
--- a/mysql-test/suite/innodb/t/innodb_file_format.test
+++ b/mysql-test/suite/innodb/t/innodb_file_format.test
@@ -1,5 +1,5 @@
---source include/have_innodb.inc
---source include/restart_and_reinit.inc
+-- source include/restart_and_reinit.inc
+-- source include/have_innodb.inc
let $innodb_file_format_orig=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
index 6873c2a404c..17f82f88fef 100644
--- a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb/t/innodb_index_large_prefix.test
@@ -1,6 +1,9 @@
---source include/have_innodb.inc
# Testcase for worklog #5743: Lift the limit of index key prefixes
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
+SET default_storage_engine=InnoDB;
+
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
@@ -9,10 +12,11 @@ set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
+-- echo ### Test 1 ###
# Create a table of DYNAMIC format, with a primary index of 1000 bytes in
# size
-create table worklog5743(a TEXT not null, primary key (a(1000)))
-ROW_FORMAT=DYNAMIC, engine = innodb;
+create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
+show warnings;
# Do some insertion and update to excercise the external cache
# code path
@@ -23,13 +27,14 @@ update worklog5743 set a = (repeat("b", 16000));
# Create a secondary index
create index idx on worklog5743(a(2000));
+show warnings;
# Start a few sessions to do selections on table being updated in default
# session, so it would rebuild the previous version from undo log.
-# 1) Default session: Initiate an update on the externally stored column
-# 2) Session con1: Select from table with repeated read
-# 3) Session con2: Select from table with read uncommitted
-# 4) Default session: rollback updates
+# 1) Default session: Initiate an update on the externally stored column
+# 2) Session con1: Select from table with repeated read
+# 3) Session con2: Select from table with read uncommitted
+# 4) Default session: rollback updates
begin;
update worklog5743 set a = (repeat("x", 17000));
@@ -55,11 +60,12 @@ rollback;
drop table worklog5743;
+-- echo ### Test 2 ###
# Create a table with only a secondary index has large prefix column
-create table worklog5743(a1 int, a2 TEXT not null)
-ROW_FORMAT=DYNAMIC, engine = innodb;
-
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
+show warnings;
create index idx on worklog5743(a1, a2(2000));
+show warnings;
insert into worklog5743 values(9, repeat("a", 10000));
@@ -85,9 +91,9 @@ rollback;
drop table worklog5743;
+-- echo ### Test 3 ###
# Create a table with a secondary index has small (50 bytes) prefix column
-create table worklog5743(a1 int, a2 TEXT not null)
-ROW_FORMAT=DYNAMIC, engine = innodb;
+create table worklog5743(a1 int, a2 TEXT not null) ROW_FORMAT=DYNAMIC;
create index idx on worklog5743(a1, a2(50));
@@ -115,72 +121,225 @@ rollback;
drop table worklog5743;
-# Create a table of ROW_FORMAT=COMPRESSED format
-create table worklog5743_2(a1 int, a2 TEXT not null)
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-
-create table worklog5743_4(a1 int, a2 TEXT not null)
-ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-
-# The maximum overall index record (not prefix) length for this table
-# is page_zip_empty_size() / 2, which is 960. "Too big row" error (
-# HA_ERR_TO_BIG_ROW) will be printed if this limit is exceeded.
-# Considering other fields and their overhead, the maximum length
-# for column a2 is 940 or 941 depending on the zlib version used and
-# compressBound() value used in page_zip_empty_size() (please refer
-# to Bug #47495 for more detail).
--- error 139
-create index idx1 on worklog5743_2(a1, a2(942));
-
-create index idx1 on worklog5743_2(a1, a2(940));
-
-# similarly, the maximum index record length for the table is
-# 1984. Considering other fields and their overhead, the
-# maximum length for column a2 is 1964 or 1965 (please refer
-# to Bug #47495 for more detail).
--- error 139
-create index idx1 on worklog5743_4(a1, a2(1966));
-
-create index idx1 on worklog5743_4(a1, a2(1964));
-
+-- echo ### Test 4 ###
+# Create compressed tables with each KEY_BLOCK_SIZE.
+create table worklog5743_1(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=1;
+create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
+create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
+create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
+create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
+
+# The maximum overall index record (not prefix) length of a
+# compressed table is dependent on innodb-page-size (IPS),
+# key_block_size (KBS) and the number of fields (NF).
+# "Too big row" error (HA_ERR_TO_BIG_ROW) will be returned if this
+# limit is exceeded.
+# See page_zip_empty_size() and Bug #47495 for more detail.
+
+# Test edge cases for indexes using key_block_size=1
+set global innodb_large_prefix=0;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx1 on worklog5743_1(a2(4000));
+show warnings;
+set global innodb_large_prefix=1;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx2 on worklog5743_1(a2(4000));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx3 on worklog5743_1(a2(436));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx4 on worklog5743_1(a2(434));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx5 on worklog5743_1(a1, a2(430));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx6 on worklog5743_1(a1, a2(428));
+show warnings;
+
+# Test edge cases for indexes using key_block_size=2
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_2(a2(4000));
+show warnings;
+set global innodb_large_prefix=1;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx2 on worklog5743_2(a2(4000));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx3 on worklog5743_2(a2(948));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx4 on worklog5743_2(a2(946));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx5 on worklog5743_2(a1, a2(942));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx6 on worklog5743_2(a1, a2(940));
+show warnings;
+
+# Test edge cases for indexes using key_block_size=4
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_4(a2(4000));
+show warnings;
+set global innodb_large_prefix=1;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx2 on worklog5743_4(a2(4000));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx3 on worklog5743_4(a2(1972));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx4 on worklog5743_4(a2(1970));
+show warnings;
+-- error ER_TOO_BIG_ROWSIZE
+create index idx5 on worklog5743_4(a1, a2(1966));
+show warnings;
+# Bug#13391353 Limit is one byte less on on 32bit-Linux only
+create index idx6 on worklog5743_4(a1, a2(1964));
+show warnings;
+
+# Test edge cases for indexes using key_block_size=8
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_8(a2(1000));
+show warnings;
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_8(a2(3073));
+show warnings;
+create index idx3 on worklog5743_8(a2(3072));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx4 on worklog5743_8(a1, a2(3069));
+show warnings;
+create index idx5 on worklog5743_8(a1, a2(3068));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx6 on worklog5743_8(a1, a2(2000), a3(1069));
+show warnings;
+create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
+show warnings;
+
+# Test edge cases for indexes using key_block_size=16
+set global innodb_large_prefix=0;
+create index idx1 on worklog5743_16(a2(1000));
+show warnings;
+set global innodb_large_prefix=1;
+create index idx2 on worklog5743_16(a2(3073));
+show warnings;
+create index idx3 on worklog5743_16(a2(3072));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx4 on worklog5743_16(a1, a2(3069));
+show warnings;
+create index idx5 on worklog5743_16(a1, a2(3068));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
+show warnings;
+create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
+show warnings;
+
+# Insert a large record into each of these tables.
+insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
+insert into worklog5743_8 values(9, repeat("a", 10000), repeat("a", 10000));
+insert into worklog5743_16 values(9, repeat("a", 10000), repeat("a", 10000));
+
+# Now if we change the global innodb_large_prefix back to 767,
+# updates to these indexes should still be allowed.
+set global innodb_large_prefix=0;
+insert into worklog5743_1 values(2, repeat("b", 10000));
+insert into worklog5743_2 values(2, repeat("b", 10000));
+insert into worklog5743_4 values(2, repeat("b", 10000));
+insert into worklog5743_8 values(2, repeat("b", 10000), repeat("b", 10000));
+insert into worklog5743_16 values(2, repeat("b", 10000), repeat("b", 10000));
+set global innodb_large_prefix=1;
+
+select a1, left(a2, 20) from worklog5743_1;
+select a1, left(a2, 20) from worklog5743_2;
+select a1, left(a2, 20) from worklog5743_4;
+select a1, left(a2, 20) from worklog5743_8;
+select a1, left(a2, 20) from worklog5743_16;
begin;
+update worklog5743_1 set a1 = 1000;
update worklog5743_2 set a1 = 1000;
update worklog5743_4 set a1 = 1000;
+update worklog5743_8 set a1 = 1000;
+update worklog5743_16 set a1 = 1000;
+select a1, left(a2, 20) from worklog5743_1;
+select a1, left(a2, 20) from worklog5743_2;
+select a1, left(a2, 20) from worklog5743_4;
+select a1, left(a2, 20) from worklog5743_8;
+select a1, left(a2, 20) from worklog5743_16;
+
# Do a select from another connection that would use the secondary index
--connection con1
select @@session.tx_isolation;
-explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
-select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
-select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+explain select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
# Do read uncommitted in another session, it would show there is no
# row with a1 = 9
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
-select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9;
-select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+select a1, left(a2, 20) from worklog5743_16 where a1 = 9;
--connection default
rollback;
+drop table worklog5743_1;
drop table worklog5743_2;
drop table worklog5743_4;
+drop table worklog5743_8;
+drop table worklog5743_16;
+
+-- echo ### Test 5 ###
+# Create a table with large varchar columns and create indexes
+# directly on these large columns to show that prefix limit is
+# automatically applied and to show that limit.
+create table worklog5743(a1 int,
+ a2 varchar(20000),
+ a3 varchar(3073),
+ a4 varchar(3072),
+ a5 varchar(3069),
+ a6 varchar(3068))
+ ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+create index idx2 on worklog5743(a3);
+create index idx3 on worklog5743(a4);
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx4 on worklog5743(a1, a2);
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx5 on worklog5743(a1, a5);
+show warnings;
+create index idx6 on worklog5743(a1, a6);
+show warnings;
+show create table worklog5743;
-# Create a table with varchar column, and create index directly on this
-# large column (without prefix)
-create table worklog5743(a1 int, a2 varchar(3000))
-ROW_FORMAT=DYNAMIC, engine = innodb;
-
-# Create an index with large column without prefix
-create index idx on worklog5743(a1, a2);
-
-insert into worklog5743 values(9, repeat("a", 3000));
+insert into worklog5743 values(9,
+ repeat("a", 20000), repeat("a", 3073),
+ repeat("a", 3072), repeat("a", 3069),
+ repeat("a", 3068));
begin;
@@ -203,19 +362,19 @@ rollback;
drop table worklog5743;
+-- echo ### Test 6 ###
# Create a table with old format, and the limit is 768 bytes.
-- error ER_INDEX_COLUMN_TOO_LONG
-create table worklog5743(a TEXT not null, primary key (a(1000)))
-engine = innodb;
+create table worklog5743(a TEXT not null, primary key (a(1000)));
-create table worklog5743(a TEXT) engine = innodb;
+create table worklog5743(a TEXT);
# Excercise the column length check in ha_innobase::add_index()
-- error ER_INDEX_COLUMN_TOO_LONG
-create index idx on worklog5743(a(1000));
+create index idx on worklog5743(a(768));
# This should be successful
-create index idx on worklog5743(a(725));
+create index idx on worklog5743(a(767));
# Perform some DMLs
insert into worklog5743 values(repeat("a", 20000));
@@ -240,29 +399,40 @@ rollback;
drop table worklog5743;
-# Some border line test on the column length.
+-- echo ### Test 7 ###
+# Some border line tests on the column length.
# We have a limit of 3072 bytes for Barracuda table
-create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb;
-
-# Length exceeds maximum supported key length, will auto-truncated to 3072
-create index idx on worklog5743(a(3073));
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+# Length exceeds maximum supported key length
+# It will be auto-truncated to 3072
+create index idx1 on worklog5743(a(3073));
create index idx2 on worklog5743(a(3072));
-
show create table worklog5743;
-
drop table worklog5743;
-# We have a limit of 767 bytes for Antelope table
-create table worklog5743(a TEXT not null) engine = innodb;
-
+# We have a limit of 767 bytes for Antelope tables
+create table worklog5743(a TEXT not null) ROW_FORMAT=REDUNDANT;
-- error ER_INDEX_COLUMN_TOO_LONG
create index idx on worklog5743(a(768));
-
create index idx2 on worklog5743(a(767));
+drop table worklog5743;
+create table worklog5743(a TEXT not null) ROW_FORMAT=COMPACT;
+-- error ER_INDEX_COLUMN_TOO_LONG
+create index idx on worklog5743(a(768));
+create index idx2 on worklog5743(a(767));
drop table worklog5743;
+
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
+--connection con1
+--disconnect con1
+--source include/wait_until_disconnected.inc
+--connection con2
+--disconnect con2
+--source include/wait_until_disconnected.inc
+--connection default
+
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 751a2bd6b5e..6858b898649 100644
--- a/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
+++ b/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test
@@ -25,7 +25,7 @@ INSERT INTO infoschema_buffer_test VALUES(9);
# 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"
+WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and PAGE_TYPE="index";
# The NUMBER_RECORDS and DATA_SIZE should check with each insertion
@@ -33,14 +33,14 @@ 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"
+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"
+WHERE TABLE_NAME like "%infoschema_buffer_test%"
and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
@@ -49,7 +49,7 @@ 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";
+WHERE TABLE_NAME like "%infoschema_buffer_test%";
# Do one more test
#--replace_regex /'*[0-9]*'/'NUM'/
@@ -64,13 +64,9 @@ ENGINE=INNODB;
SELECT count(*)
FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
-WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
+WHERE TABLE_NAME like "%infoschema_child%" and PAGE_STATE="file_page"
and PAGE_TYPE="index";
DROP TABLE infoschema_child;
DROP TABLE infoschema_parent;
-show create table information_schema.innodb_buffer_page;
-show create table information_schema.innodb_buffer_page_lru;
-show create table information_schema.innodb_buffer_pool_stats;
-
diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test
index 3ae5be3aa30..44e2e8b2342 100644
--- a/mysql-test/suite/innodb/t/innodb_mysql.test
+++ b/mysql-test/suite/innodb/t/innodb_mysql.test
@@ -5,11 +5,12 @@
# main testing code t/innodb_mysql.test -> include/mix1.inc
#
-# Slow test, don't run during staging part
--- source include/not_staging.inc
--- source include/have_innodb.inc
--- source include/have_query_cache.inc
+#Want to skip this test from daily Valgrind execution.
+--source include/no_valgrind_without_big.inc
+# Adding big test option for this test.
+--source include/big_test.inc
+-- source include/have_innodb.inc
let $engine_type= InnoDB;
let $other_engine_type= MEMORY;
# InnoDB does support FOREIGN KEYFOREIGN KEYs
@@ -21,21 +22,21 @@ set session innodb_support_xa=default;
--disable_warnings
drop table if exists t1, t2, t3;
--enable_warnings
-#
-# BUG#35850: Performance regression in 5.1.23/5.1.24
-#
+--echo #
+--echo # BUG#35850: Performance regression in 5.1.23/5.1.24
+--echo #
create table t1(a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, pk int, key(a,b), primary key(pk)) engine=innodb;
insert into t2 select @a:=A.a+10*(B.a + 10*C.a),@a, @a from t1 A, t1 B, t1 C;
---echo this must use key 'a', not PRIMARY:
+--echo # this must use key 'a', not PRIMARY:
--replace_column 9 #
explain select a from t2 where a=b;
drop table t1, t2;
-#
-# Bug #40360: Binlog related errors with binlog off
-#
+--echo #
+--echo # Bug #40360: Binlog related errors with binlog off
+--echo #
# This bug is triggered when the binlog format is STATEMENT and the
# binary log is turned off. In this case, no error should be shown for
# the statement since there are no replication issues.
@@ -47,9 +48,9 @@ CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
DROP TABLE t1;
-#
-# Bug#37284 Crash in Field_string::type()
-#
+--echo #
+--echo # Bug#37284 Crash in Field_string::type()
+--echo #
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
@@ -58,10 +59,10 @@ CREATE INDEX i1 on t1 (a(3));
SELECT * FROM t1 WHERE a = 'abcde';
DROP TABLE t1;
-#
-# Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
-# requested column
-#
+--echo #
+--echo # Bug #37742: HA_EXTRA_KEYREAD flag is set when key contains only prefix of
+--echo # requested column
+--echo #
CREATE TABLE foo (a int, b int, c char(10),
PRIMARY KEY (c(3)),
@@ -85,6 +86,12 @@ INSERT INTO foo VALUES
INSERT INTO bar SELECT * FROM foo;
INSERT INTO foo2 SELECT * FROM foo;
+-- disable_result_log
+ANALYZE TABLE bar;
+ANALYZE TABLE foo;
+ANALYZE TABLE foo2;
+-- enable_result_log
+
--query_vertical EXPLAIN SELECT c FROM bar WHERE b>2;
--query_vertical EXPLAIN SELECT c FROM foo WHERE b>2;
--query_vertical EXPLAIN SELECT c FROM foo2 WHERE b>2;
@@ -96,9 +103,9 @@ INSERT INTO foo2 SELECT * FROM foo;
DROP TABLE foo, bar, foo2;
-#
-# Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
-#
+--echo #
+--echo # Bug#41348: INSERT INTO tbl SELECT * FROM temp_tbl overwrites locking type of temp table
+--echo #
--disable_warnings
DROP TABLE IF EXISTS t1,t3,t2;
@@ -137,9 +144,9 @@ DEALLOCATE PREPARE stmt3;
DROP TABLE t1,t3,t2;
DROP FUNCTION f1;
-#
-# Bug#37016: TRUNCATE TABLE removes some rows but not all
-#
+--echo #
+--echo # Bug#37016: TRUNCATE TABLE removes some rows but not all
+--echo #
--disable_warnings
DROP TABLE IF EXISTS t1,t2;
@@ -337,9 +344,9 @@ DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
-#
-# Bug#43580: Issue with Innodb on multi-table update
-#
+--echo #
+--echo # Bug#43580: Issue with Innodb on multi-table update
+--echo #
CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
@@ -460,8 +467,14 @@ INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
+-- disable_result_log
+ANALYZE TABLE t1;
+-- enable_result_log
EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
+# With 4k pages, the 'rows' column in the output below is either 120 or 138,
+# not 128 as it is with 8k and 16k. Bug#12602606
+--replace_result 128 {checked} 120 {checked} 138 {checked}
EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
DROP TABLE t1;
@@ -505,11 +518,7 @@ INSERT INTO t2 VALUES (),();
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE b =(SELECT a FROM t1 LIMIT 1);
---disable_query_log
---disable_result_log
CONNECT (con1, localhost, root,,);
---enable_query_log
---enable_result_log
CONNECTION default;
DELIMITER |;
@@ -546,7 +555,7 @@ DROP TABLE t1,t2;
--echo # Bug #49324: more valgrind errors in test_if_skip_sort_order
--echo #
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ;
---echo #should not cause valgrind warnings
+--echo # should not cause valgrind warnings
SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a;
DROP TABLE t1;
@@ -558,6 +567,10 @@ create table t1(f1 int not null primary key, f2 int) engine=innodb;
create table t2(f1 int not null, key (f1)) engine=innodb;
insert into t1 values (1,1),(2,2),(3,3);
insert into t2 values (1),(2),(3);
+-- disable_result_log
+analyze table t1;
+analyze table t2;
+-- enable_result_log
explain select t1.* from t1 left join t2 using(f1) group by t1.f1;
drop table t1,t2;
--echo #
@@ -576,6 +589,8 @@ INSERT INTO t1 VALUES (1,1,1,1,1,1), (2,2,2,2,2,2), (3,3,3,3,3,3),
(7,7,7,7,7,7), (8,8,8,8,8,8), (9,9,9,9,9,9),
(11,11,11,11,11,11);
+ANALYZE TABLE t1;
+
--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
DROP TABLE t1;
@@ -594,36 +609,6 @@ ALTER TABLE t1 DROP INDEX k, ADD UNIQUE INDEX k (a,b);
DROP TABLE t1;
---echo #
---echo # Bug #53334: wrong result for outer join with impossible ON condition
---echo # (see the same test case for MyISAM in join.test)
---echo #
-
-create table t1 (id int primary key);
-create table t2 (id int);
-
-insert into t1 values (75);
-insert into t1 values (79);
-insert into t1 values (78);
-insert into t1 values (77);
-replace into t1 values (76);
-replace into t1 values (76);
-insert into t1 values (104);
-insert into t1 values (103);
-insert into t1 values (102);
-insert into t1 values (101);
-insert into t1 values (105);
-insert into t1 values (106);
-insert into t1 values (107);
-
-insert into t2 values (107),(75),(1000);
-
-select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
- where t2.id=75 and t1.id is null;
-explain select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0
- where t2.id=75 and t1.id is null;
-
-drop table t1,t2;
--echo #
--echo # Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
@@ -635,7 +620,7 @@ CREATE TABLE t2 (a INT, b INT,
c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
---echo set up our data elements
+--echo # set up our data elements
INSERT INTO t1 (d) VALUES (1);
INSERT INTO t2 (a,b) VALUES (1,1);
SELECT SECOND(c) INTO @bug47453 FROM t2;
@@ -648,7 +633,7 @@ SELECT SLEEP(1);
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
---echo #should be 0
+--echo # should be 0
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
DROP TABLE t1, t2;
@@ -728,6 +713,10 @@ CREATE TABLE t1 (
LOAD DATA INFILE '../../std_data/intersect-bug50389.tsv' INTO TABLE t1;
+-- disable_result_log
+ANALYZE TABLE t1;
+-- enable_result_log
+
SELECT * FROM t1 WHERE f1 IN
(3305028,3353871,3772880,3346860,4228206,3336022,
3470988,3305175,3329875,3817277,3856380,3796193,
@@ -754,7 +743,7 @@ CREATE TABLE t1 (
PRIMARY KEY (f1),
UNIQUE KEY (f2, f3),
KEY (f4)
-) ENGINE=InnoDB;
+) ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES
(1,1,991,1), (2,1,992,1), (3,1,993,1), (4,1,994,1), (5,1,995,1),
@@ -786,64 +775,11 @@ UNLOCK TABLES;
DROP TABLE t1;
--echo #
---echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
---echo # is returned
---echo #
-CREATE TABLE t1(a INT) ENGINE=innodb;
-INSERT INTO t1 VALUES (0);
-SET SQL_MODE='STRICT_ALL_TABLES';
---error ER_TRUNCATED_WRONG_VALUE
-CREATE TABLE t2
- SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
-DROP TABLE t1;
-SET SQL_MODE=DEFAULT;
-
-
-
---echo #
---echo # Bug#55580: segfault in read_view_sees_trx_id
---echo #
-CREATE TABLE t1 (a INT) ENGINE=Innodb;
-CREATE TABLE t2 (a INT) ENGINE=Innodb;
-INSERT INTO t1 VALUES (1),(2);
-INSERT INTO t2 VALUES (1),(2);
-
-connect (con1,localhost,root,,test);
-connect (con2,localhost,root,,test);
-
-connection con1;
-START TRANSACTION;
-SELECT * FROM t2 LOCK IN SHARE MODE;
-
-connection con2;
-START TRANSACTION;
-SELECT * FROM t1 LOCK IN SHARE MODE;
-
-connection con1;
-let $conn_id= `SELECT CONNECTION_ID()`;
---send SELECT * FROM t1 FOR UPDATE
-
-connection con2;
-let $wait_timeout= 2;
-let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE ID=$conn_id AND STATE='Sending data';
---source include/wait_condition.inc
---echo # should not crash
---error ER_LOCK_DEADLOCK
-SELECT * FROM t1 GROUP BY (SELECT a FROM t2 LIMIT 1 FOR UPDATE) + t1.a;
-
-connection default;
-disconnect con1;
-disconnect con2;
-
-DROP TABLE t1,t2;
-
---echo #
--echo # Bug#55656: mysqldump can be slower after bug #39653 fix
--echo #
CREATE TABLE t1 (a INT , b INT, c INT, d INT,
- KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB;
+ KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB STATS_PERSISTENT=0;
INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3);
--query_vertical EXPLAIN SELECT COUNT(*) FROM t1
@@ -862,63 +798,6 @@ CREATE INDEX b ON t1(a,b,c,d);
DROP TABLE t1;
--echo #
---echo # Bug#56862 Execution of a query that uses index merge returns a wrong result
---echo #
-
-CREATE TABLE t1 (
- pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a int,
- b int,
- INDEX idx(a))
-ENGINE=INNODB;
-
-INSERT INTO t1(a,b) VALUES
- (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
- (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
- (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
- (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
-INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1 VALUES (1000000, 0, 0);
-
-SET SESSION sort_buffer_size = 1024*36;
-
-EXPLAIN
-SELECT COUNT(*) FROM
- (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
- WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-
-SELECT COUNT(*) FROM
- (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
- WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-
-SET SESSION sort_buffer_size = DEFAULT;
-
-DROP TABLE t1;
-
---echo #
---echo # ALTER TABLE IGNORE didn't ignore duplicates for unique add index
---echo #
-
-create table t1 (a int primary key, b int) engine = innodb;
-insert into t1 values (1,1),(2,1);
-alter ignore table t1 add unique `main` (b);
-select * from t1;
-drop table t1;
-
---echo End of 5.1 tests
---echo #
-
---echo #
--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
--echo # is returned
--echo #
@@ -933,49 +812,8 @@ DROP TABLE t1;
SET SQL_MODE=DEFAULT;
--echo #
---echo # Bug#56862 Execution of a query that uses index merge returns a wrong result
+--echo # Bug#56862 Moved to innodb_16k.test
--echo #
-
-CREATE TABLE t1 (
- pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
- a int,
- b int,
- INDEX idx(a))
-ENGINE=INNODB;
-
-INSERT INTO t1(a,b) VALUES
- (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
- (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
- (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
- (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
-INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1;
-INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1(a,b) SELECT a,b FROM t1;
-INSERT INTO t1 VALUES (1000000, 0, 0);
-
-SET SESSION sort_buffer_size = 1024*36;
-
-EXPLAIN
-SELECT COUNT(*) FROM
- (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
- WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-
-SELECT COUNT(*) FROM
- (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
- WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
-
-SET SESSION sort_buffer_size = DEFAULT;
-
-DROP TABLE t1;
-
--echo #
--echo # Test for bug #39932 "create table fails if column for FK is in different
--echo # case than in corr index".
@@ -984,122 +822,15 @@ DROP TABLE t1;
drop tables if exists t1, t2;
--enable_warnings
create table t1 (pk int primary key) engine=InnoDB;
---echo # Even although the below statement uses uppercased field names in
---echo # foreign key definition it still should be able to find explicitly
---echo # created supporting index. So it should succeed and should not
---echo # create any additional supporting indexes.
+# Even although the below statement uses uppercased field names in
+# foreign key definition it still should be able to find explicitly
+# created supporting index. So it should succeed and should not
+# create any additional supporting indexes.
create table t2 (fk int, key x (fk),
constraint x foreign key (FK) references t1 (PK)) engine=InnoDB;
show create table t2;
drop table t2, t1;
---echo #
---echo # Bug #663818: wrong result when BNLH is used
---echo #
-
-CREATE TABLE t1(pk int NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t1 VALUES
- (1), (2), (11), (12), (13), (14),
- (15), (16), (17), (18), (19);
-CREATE TABLE t2(pk int NOT NULL PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t2 VALUES
- (1), (10), (11), (12), (13), (14),
- (15), (16), (17), (18), (19), (20), (21);
-
-SET SESSION join_buffer_size=10000;
-
-SET SESSION join_cache_level=3;
-EXPLAIN
-SELECT t1.pk FROM t1,t2
- WHERE t1.pk = t2.pk AND t2.pk <> 8;
-SELECT t1.pk FROM t1,t2
- WHERE t1.pk = t2.pk AND t2.pk <> 8;
-
-SET SESSION join_cache_level=1;
-EXPLAIN
-SELECT t1.pk FROM t1,t2
- WHERE t1.pk = t2.pk AND t2.pk <> 8;
-SELECT t1.pk FROM t1,t2
- WHERE t1.pk = t2.pk AND t2.pk <> 8;
-
-DROP TABLE t1,t2;
-
-SET SESSION join_cache_level=DEFAULT;
-SET SESSION join_buffer_size=DEFAULT;
-
---echo #
---echo # Bug#668644: HAVING + ORDER BY
---echo #
-
-CREATE TABLE t1 (
- pk int NOT NULL PRIMARY KEY, i int DEFAULT NULL,
- INDEX idx (i)
-) ENGINE=INNODB;
-INSERT INTO t1 VALUES
- (6,-1636630528),(2,-1097924608),(1,6),(3,6),(4,1148715008),(5,1541734400);
-
-CREATE TABLE t2 (
- i int DEFAULT NULL,
- pk int NOT NULL PRIMARY KEY,
- INDEX idx (i)
-) ENGINE= INNODB;
-INSERT INTO t2 VALUES
- (-1993998336,20),(-1036582912,1),(-733413376,5),(-538247168,16),
- (-514260992,4),(-249561088,9),(1,2),(1,6),(2,10),(2,19),(4,17),
- (5,14),(5,15),(6,8),(7,13),(8,18),(9,11),(9,12),(257425408,7),
- (576061440,3);
-
-EXPLAIN
-SELECT t1 .i AS f FROM t1, t2
- WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
- HAVING f > 7
- ORDER BY f;
-SELECT t1 .i AS f FROM t1, t2
- WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
- HAVING f > 7
- ORDER BY f;
-
-DROP TABLE t1, t2;
-
---echo #
---echo # Test for bug #56619 - Assertion failed during
---echo # ALTER TABLE RENAME, DISABLE KEYS
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
-CREATE TABLE t1 (a INT, INDEX(a)) engine=innodb;
---disable_warnings
-ALTER TABLE t1 RENAME TO t2, DISABLE KEYS;
-DROP TABLE IF EXISTS t1, t2;
---enable_warnings
-
---echo #
---echo # Bug#702322: HAVING with two ANDed predicates + ORDER BY
---echo #
-
-CREATE TABLE t1 (pk int PRIMARY KEY, a int, KEY (a)) ENGINE=InnoDB;
-CREATE TABLE t2 (a int, KEY (a)) ENGINE=InnoDB;
-
-INSERT INTO t1 VALUES
- (18,0),(9,10),(8,11),(2,15),(7,19),(1,20);
-
-SET SESSION join_cache_level = 0;
-
-# vanilla InnoDB doesn't do ICP
---replace_result "Using where" "Using index condition"
-EXPLAIN
-SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
- WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
- ORDER BY t1.a;
-SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
- WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
- ORDER BY t1.a;
-
-DROP TABLE t1,t2;
-
---echo End of 5.3 tests
--echo #
--echo # Test for bug #11762012 - "54553: INNODB ASSERTS IN HA_INNOBASE::
@@ -1120,7 +851,41 @@ UPDATE t1 SET c = 5;
UNLOCK TABLES;
DROP TEMPORARY TABLE t1;
---echo End of 5.1 tests
+--echo # End of 5.1 tests
+
+
+--echo #
+--echo # Bug#49604 "6.0 processing compound WHERE clause incorrectly
+--echo # with Innodb - extra rows"
+--echo #
+
+CREATE TABLE t1 (
+ c1 INT NOT NULL,
+ c2 INT,
+ PRIMARY KEY (c1),
+ KEY k1 (c2)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES (12,1);
+INSERT INTO t1 VALUES (15,1);
+INSERT INTO t1 VALUES (16,1);
+INSERT INTO t1 VALUES (22,1);
+INSERT INTO t1 VALUES (20,2);
+
+CREATE TABLE t2 (
+ c1 INT NOT NULL,
+ c2 INT,
+ PRIMARY KEY (c1)
+) ENGINE=InnoDB;
+
+INSERT INTO t2 VALUES (1,2);
+INSERT INTO t2 VALUES (2,9);
+
+SELECT STRAIGHT_JOIN t2.c2, t1.c2, t2.c1
+FROM t1 JOIN t2 ON t1.c2 = t2.c1
+WHERE t2.c1 IN (2, 1, 6) OR t2.c1 NOT IN (1);
+
+DROP TABLE t1, t2;
--echo #
@@ -1160,12 +925,64 @@ connection default;
COMMIT;
DROP TABLE t1;
DROP FUNCTION f1;
+--echo #
+--echo # Bug#42744: Crash when using a join buffer to join a table with a blob
+--echo # column and an additional column used for duplicate elimination.
+--echo #
+
+CREATE TABLE t1 (a tinyblob) ENGINE=InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY, b tinyblob) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('1'), (NULL);
+INSERT INTO t2 VALUES (1, '1');
+
+EXPLAIN
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+
+SELECT t2.b FROM t1,t2 WHERE t1.a IN (SELECT 1 FROM t2);
+
+DROP TABLE t1,t2;
+
+--echo #
+--echo # Bug#48093: 6.0 Server not processing equivalent IN clauses properly
+--echo # with Innodb tables
+--echo #
+
+CREATE TABLE t1 (
+ i int(11) DEFAULT NULL,
+ v1 varchar(1) DEFAULT NULL,
+ v2 varchar(20) DEFAULT NULL,
+ KEY i (i),
+ KEY v (v1,i)
+) ENGINE=innodb;
+
+INSERT INTO t1 VALUES (1,'f','no');
+INSERT INTO t1 VALUES (2,'u','yes-u');
+INSERT INTO t1 VALUES (2,'h','yes-h');
+INSERT INTO t1 VALUES (3,'d','no');
+
+--echo
+SELECT v2
+FROM t1
+WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
+
+--echo
+--echo # Should not use index_merge
+EXPLAIN
+SELECT v2
+FROM t1
+WHERE v1 IN ('f', 'd', 'h', 'u' ) AND i = 2;
+
+DROP TABLE t1;
--echo #
--echo # Bug#54606 innodb fast alter table + pack_keys=0
--echo # prevents adding new indexes
--echo #
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
CREATE TABLE t1 (a INT, b CHAR(9), c INT, key(b))
ENGINE=InnoDB
PACK_KEYS=0;
@@ -1174,4 +991,38 @@ CREATE INDEX c on t1 (c);
DROP TABLE t1;
---echo End of 5.1 tests
+
+--echo #
+--echo # Additional coverage for refactoring which is made as part
+--echo # of fix for Bug#27480 "Extend CREATE TEMPORARY TABLES privilege
+--echo # to allow temp table operations".
+--echo #
+--echo # Check that OPTIMIZE table works for temporary InnoDB tables.
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=InnoDB;
+OPTIMIZE TABLE t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Bug#11762345 54927: DROPPING AND ADDING AN INDEX IN ONE
+--echo # COMMAND CAN FAIL IN INNODB PLUGIN 1.0
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 (id int, a int, b int, PRIMARY KEY (id),
+ INDEX a (a)) ENGINE=innodb;
+
+ALTER TABLE t1 DROP INDEX a, ADD INDEX a (b, a);
+# This used to fail
+ALTER TABLE t1 DROP INDEX a, ADD INDEX (a, b);
+
+DROP TABLE t1;
+
+
+--echo End of 6.0 tests
diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
index d7540dff36d..77f55002da5 100644
--- a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
+++ b/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
@@ -1,4 +1,3 @@
---source include/have_innodb.inc
######## suite/innodb/t/innodb_prefix_index_liftedlimit.test ##########
# #
# Testcase for worklog WL#5743: Lift the limit of index key prefixes #
@@ -14,11 +13,15 @@
# #
######################################################################
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
# Save innodb variables
-let $innodb_file_format_orig=`select @@innodb_file_format`;
-let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
+--disable_query_log
+let $innodb_file_format_orig = `select @@innodb_file_format`;
+let $innodb_file_per_table_orig = `select @@innodb_file_per_table`;
+let $innodb_large_prefix_orig = `select @@innodb_large_prefix`;
+--enable_query_log
# Set Innodb file format as feature works for Barracuda file format
set global innodb_file_format="Barracuda";
@@ -49,6 +52,11 @@ WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
+--error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
+--error ER_INDEX_COLUMN_TOO_LONG
+ALTER TABLE worklog5743 ROW_FORMAT=COMPACT;
+ALTER TABLE worklog5743 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
DROP TABLE worklog5743;
@@ -482,10 +490,10 @@ DROP TABLE worklog5743_key8;
#------------------------------------------------------------------------------
# Create mutiple prefix index. We can not create prefix index length > 16K
# as index is written in undo log page which of 16K size.
-# So we can create max 5 prefix index of length 3072 on table
+# So we can create max 2 prefix index of length 3072 on table
CREATE TABLE worklog5743 (
col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) ,
-col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000),
+col_3_text TEXT (4000), col_4_blob BLOB (4000), col_5_text TEXT (4000),
col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
) ROW_FORMAT=DYNAMIC, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
@@ -493,13 +501,10 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
-# Update hangs if we create following 5 indexes. Uncomment them once its fix
+# Update reports ER_UNDO_RECORD_TOO_BIG if we create more than 2 indexes.
# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
-#CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
-#CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
-#CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
-#CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
-#CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
+CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
+CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
@@ -511,14 +516,29 @@ UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
+
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
+# Add 3 more indexes.
+# Update used to hang but now ER_UNDO_RECORD_TOO_BIG is reported;
+# Bug#12547647 - UPDATE LOGGING COULD EXCEED UNDO LOG PAGE SIZE
+INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
+REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
+REPEAT("a", 4000) , REPEAT("a", 255)
+);
+CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
+CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
+CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
+WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
+SHOW WARNINGS;
+DROP TABLE worklog5743;
#------------------------------------------------------------------------------
# Create mutiple prefix index. We can not create prefix index length > 16K as
@@ -532,7 +552,8 @@ col_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
) ROW_FORMAT=DYNAMIC, engine = innodb;
-# Update hangs if we create following 5 indexes. Uncomment them once its fix
+# Update used to hang if we create following 5 indexes. Fixed in;
+# Bug#12547647 - UPDATE LOGGING COULD EXCEED UNDO LOG PAGE SIZE
CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072));
CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072));
CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072));
@@ -562,11 +583,13 @@ REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000),
REPEAT("a", 4000) , REPEAT("a", 255)
);
ROLLBACK;
-# Uncomment Update fater Bug#12547647 is fixed - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
-#UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-#WHERE col_1_varbinary = REPEAT("a", 4000)
-#AND col_2_varchar = REPEAT("o", 4000);
+# Instead of this error, it would hang before this fix.
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
+WHERE col_1_varbinary = REPEAT("a", 4000)
+AND col_2_varchar = REPEAT("o", 4000);
+SHOW WARNINGS;
SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000),
@@ -599,14 +622,28 @@ SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
DROP TABLE worklog5743;
# Prefix index with utf8 charset + varchar.
-# For varchar we also log the column itself as oppose of TEXT so it error
-# with limit 1024 due to overhead.
+# utf8 charcter takes 3 bytes in mysql so prefix index limit is 3072/3 = 1024
+# This is a case where dict_index_too_big_for_undo() is too conservative.
+# If it did not return error 1118, to commented code would work.
+# See bug#12953735.
--replace_regex /> [0-9]*/> max_row_size/
--- error 1118
+-- error ER_TOO_BIG_ROWSIZE
CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8',
col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' ,
PRIMARY KEY (col_1_varchar(1024))
) ROW_FORMAT=DYNAMIC, engine = innodb;
+#INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
+#CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1024));
+#INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
+#SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) FROM worklog5743;
+#UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000)
+#WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000);
+#SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743
+#WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
+#INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
+#DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
+#SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
+#DROP TABLE worklog5743;
#------------------------------------------------------------------------------
# prefinx index on utf8 charset with transaction
@@ -734,7 +771,7 @@ COMMIT;
# Wait for commit
let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist
WHERE info='COMMIT';
---source include/wait_condition.inc
+--source include/wait_condition.inc
--echo "In connection 1"
--connection con1
@@ -843,8 +880,12 @@ worklog5743;
SELECT COUNT(*) FROM worklog5743;
COMMIT;
+--echo "Disconnect the connections 1 and 2"
--disconnect con1
+--source include/wait_until_disconnected.inc
+--connection con2
--disconnect con2
+--source include/wait_until_disconnected.inc
--connection default
DROP TABLE worklog5743;
@@ -989,7 +1030,7 @@ AND col_2_varchar = REPEAT("o", 4000);
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
---error 1062
+--error ER_DUP_ENTRY
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
@@ -1023,7 +1064,7 @@ ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
---error 1062
+--error ER_DUP_ENTRY
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
@@ -1243,8 +1284,8 @@ AND col_2_text = REPEAT("o", 4000);
ALTER TABLE worklog5743 DROP PRIMARY KEY;
# Again add index length > 948. Expect error 'to big row ' due to exceed
-# in key length.
--- error 139
+# in key length.
+-- error ER_TOO_BIG_ROWSIZE
ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950));
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
@@ -1306,7 +1347,7 @@ VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)),
REPEAT("o", 4000));
INSERT INTO worklog5743
VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000));
---error 1062
+--error ER_DUP_ENTRY
ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
DROP TABLE worklog5743;
@@ -1328,11 +1369,24 @@ CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(767))
) engine = innodb;
-# Prefix index > 767 is truncated with REDUNDANT and COMPACT
+INSERT INTO worklog5743 VALUES(REPEAT('a',4000),REPEAT('b',4000));
+# Prefix index > 767 is truncated with REDUNDANT and COMPACT
+--enable_info
CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000));
+ALTER TABLE worklog5743 ROW_FORMAT=REDUNDANT;
+--disable_info
+SHOW CREATE TABLE worklog5743;
DROP TABLE worklog5743;
#------------------------------------------------------------------------------
-eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
-eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
-eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
+--disable_query_log
+eval set global innodb_file_format = $innodb_file_format_orig;
+eval set global innodb_file_per_table = $innodb_file_per_table_orig;
+eval set global innodb_large_prefix = $innodb_large_prefix_orig;
+--echo "Disconnect the connection 1"
+--connection con1
+--disconnect con1
+--source include/wait_until_disconnected.inc
+--enable_query_log
+--connection default
+
diff --git a/mysql-test/suite/maria/lock.result b/mysql-test/suite/maria/lock.result
index b67d1ab7b0d..52e83eb111d 100644
--- a/mysql-test/suite/maria/lock.result
+++ b/mysql-test/suite/maria/lock.result
@@ -1,7 +1,7 @@
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 (i INT) ENGINE=Aria;
CREATE TABLE t2 (i INT) ENGINE=Aria;
LOCK TABLE t1 WRITE, t2 WRITE;
diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index ee7135c4851..f8487258546 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
@@ -713,7 +713,7 @@ count(*)
DROP TABLE t2;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a)) row_format=dynamic;
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index dba56204172..a8ea6f1d112 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
@@ -713,7 +713,7 @@ count(*)
DROP TABLE t2;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a)) transactional=1 row_format=page;
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index 1a7b08169dc..c7c65fac003 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
@@ -713,7 +713,7 @@ count(*)
DROP TABLE t2;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a)) transactional=0 row_format=page;
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
diff --git a/mysql-test/suite/maria/maria-page-checksum.result b/mysql-test/suite/maria/maria-page-checksum.result
index c4d1b71e33a..fbb7ba78b25 100644
--- a/mysql-test/suite/maria/maria-page-checksum.result
+++ b/mysql-test/suite/maria/maria-page-checksum.result
@@ -2,7 +2,7 @@ drop table if exists t1;
select @@global.aria_page_checksum;
@@global.aria_page_checksum
1
-# iteration 1
+# iteration 1a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -20,7 +20,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 2
+# iteration 2a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -38,7 +38,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 3
+# iteration 3a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -56,7 +56,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 4
+# iteration 4a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -74,7 +74,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 5
+# iteration 5a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -92,7 +92,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 6
+# iteration 6a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -110,7 +110,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 7
+# iteration 7a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -128,7 +128,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 8
+# iteration 8a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -146,7 +146,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 9
+# iteration 9a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -164,7 +164,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 10
+# iteration 10a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -182,7 +182,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 11
+# iteration 11a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -200,7 +200,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 12
+# iteration 12a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -218,7 +218,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 13
+# iteration 13a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -236,7 +236,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 14
+# iteration 14a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -254,7 +254,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 15
+# iteration 15a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -272,7 +272,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 16
+# iteration 16a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -290,7 +290,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 17
+# iteration 17a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -308,7 +308,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 18
+# iteration 18a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -326,7 +326,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 19
+# iteration 19a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -344,7 +344,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 20
+# iteration 20a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -362,7 +362,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 21
+# iteration 21a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -380,7 +380,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 22
+# iteration 22a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -398,7 +398,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 23
+# iteration 23a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -416,7 +416,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 24
+# iteration 24a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -434,7 +434,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 25
+# iteration 25a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -452,7 +452,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 26
+# iteration 26a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -470,7 +470,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 27
+# iteration 27a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -488,7 +488,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 28
+# iteration 28a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -506,7 +506,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 29
+# iteration 29a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -524,7 +524,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 30
+# iteration 30a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -542,7 +542,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 31
+# iteration 31a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -560,7 +560,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 32
+# iteration 32a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -578,7 +578,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 33
+# iteration 33a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -596,7 +596,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 34
+# iteration 34a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -614,7 +614,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 35
+# iteration 35a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -632,7 +632,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
Page checksums are not used
drop table t1;
-# iteration 36
+# iteration 36a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -650,7 +650,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Page checksums are used
drop table t1;
-# iteration 1
+# iteration 1b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -666,7 +666,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
drop table t1;
-# iteration 2
+# iteration 2b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -682,7 +682,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 3
+# iteration 3b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -698,7 +698,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 4
+# iteration 4b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -714,7 +714,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
Crashsafe: yes
drop table t1;
-# iteration 5
+# iteration 5b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -730,7 +730,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 6
+# iteration 6b
create table t1(a int) engine=aria ;
show create table t1;
Table Create Table
@@ -746,7 +746,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 7
+# iteration 7b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -762,7 +762,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 8
+# iteration 8b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -778,7 +778,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 9
+# iteration 9b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -794,7 +794,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 10
+# iteration 10b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -810,7 +810,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 11
+# iteration 11b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -826,7 +826,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 12
+# iteration 12b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
Table Create Table
@@ -842,7 +842,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 13
+# iteration 13b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
@@ -858,7 +858,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 14
+# iteration 14b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
@@ -874,7 +874,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 15
+# iteration 15b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
@@ -890,7 +890,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 16
+# iteration 16b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
@@ -906,7 +906,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=1
Crashsafe: yes
drop table t1;
-# iteration 17
+# iteration 17b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
@@ -922,7 +922,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 TRANSACTIONAL=0
Crashsafe: no
drop table t1;
-# iteration 18
+# iteration 18b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
Table Create Table
diff --git a/mysql-test/suite/maria/maria-page-checksum.test b/mysql-test/suite/maria/maria-page-checksum.test
index 8dd68fce245..d35e29634c6 100644
--- a/mysql-test/suite/maria/maria-page-checksum.test
+++ b/mysql-test/suite/maria/maria-page-checksum.test
@@ -19,7 +19,7 @@ select @@global.aria_page_checksum;
# (first value of aria_page_checksum) x (clauses in CREATE TABLE) x
# (second value of aria_page_checksum) x (clauses in ALTER TABLE).
---echo # iteration 1
+--echo # iteration 1a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -48,7 +48,7 @@ perl;
EOF
drop table t1;
---echo # iteration 2
+--echo # iteration 2a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -77,7 +77,7 @@ perl;
EOF
drop table t1;
---echo # iteration 3
+--echo # iteration 3a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -106,7 +106,7 @@ perl;
EOF
drop table t1;
---echo # iteration 4
+--echo # iteration 4a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -135,7 +135,7 @@ perl;
EOF
drop table t1;
---echo # iteration 5
+--echo # iteration 5a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -164,7 +164,7 @@ perl;
EOF
drop table t1;
---echo # iteration 6
+--echo # iteration 6a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -193,7 +193,7 @@ perl;
EOF
drop table t1;
---echo # iteration 7
+--echo # iteration 7a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -222,7 +222,7 @@ perl;
EOF
drop table t1;
---echo # iteration 8
+--echo # iteration 8a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -251,7 +251,7 @@ perl;
EOF
drop table t1;
---echo # iteration 9
+--echo # iteration 9a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -280,7 +280,7 @@ perl;
EOF
drop table t1;
---echo # iteration 10
+--echo # iteration 10a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -309,7 +309,7 @@ perl;
EOF
drop table t1;
---echo # iteration 11
+--echo # iteration 11a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -338,7 +338,7 @@ perl;
EOF
drop table t1;
---echo # iteration 12
+--echo # iteration 12a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -367,7 +367,7 @@ perl;
EOF
drop table t1;
---echo # iteration 13
+--echo # iteration 13a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -396,7 +396,7 @@ perl;
EOF
drop table t1;
---echo # iteration 14
+--echo # iteration 14a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -425,7 +425,7 @@ perl;
EOF
drop table t1;
---echo # iteration 15
+--echo # iteration 15a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -454,7 +454,7 @@ perl;
EOF
drop table t1;
---echo # iteration 16
+--echo # iteration 16a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -483,7 +483,7 @@ perl;
EOF
drop table t1;
---echo # iteration 17
+--echo # iteration 17a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -512,7 +512,7 @@ perl;
EOF
drop table t1;
---echo # iteration 18
+--echo # iteration 18a
set global aria_page_checksum = 0 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -541,7 +541,7 @@ perl;
EOF
drop table t1;
---echo # iteration 19
+--echo # iteration 19a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -570,7 +570,7 @@ perl;
EOF
drop table t1;
---echo # iteration 20
+--echo # iteration 20a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -599,7 +599,7 @@ perl;
EOF
drop table t1;
---echo # iteration 21
+--echo # iteration 21a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -628,7 +628,7 @@ perl;
EOF
drop table t1;
---echo # iteration 22
+--echo # iteration 22a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -657,7 +657,7 @@ perl;
EOF
drop table t1;
---echo # iteration 23
+--echo # iteration 23a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -686,7 +686,7 @@ perl;
EOF
drop table t1;
---echo # iteration 24
+--echo # iteration 24a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -715,7 +715,7 @@ perl;
EOF
drop table t1;
---echo # iteration 25
+--echo # iteration 25a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -744,7 +744,7 @@ perl;
EOF
drop table t1;
---echo # iteration 26
+--echo # iteration 26a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -773,7 +773,7 @@ perl;
EOF
drop table t1;
---echo # iteration 27
+--echo # iteration 27a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -802,7 +802,7 @@ perl;
EOF
drop table t1;
---echo # iteration 28
+--echo # iteration 28a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -831,7 +831,7 @@ perl;
EOF
drop table t1;
---echo # iteration 29
+--echo # iteration 29a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -860,7 +860,7 @@ perl;
EOF
drop table t1;
---echo # iteration 30
+--echo # iteration 30a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=0 ;
show create table t1 /* expecting PAGE_CHECKSUM=0 */ ;
@@ -889,7 +889,7 @@ perl;
EOF
drop table t1;
---echo # iteration 31
+--echo # iteration 31a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -918,7 +918,7 @@ perl;
EOF
drop table t1;
---echo # iteration 32
+--echo # iteration 32a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -947,7 +947,7 @@ perl;
EOF
drop table t1;
---echo # iteration 33
+--echo # iteration 33a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -976,7 +976,7 @@ perl;
EOF
drop table t1;
---echo # iteration 34
+--echo # iteration 34a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -1005,7 +1005,7 @@ perl;
EOF
drop table t1;
---echo # iteration 35
+--echo # iteration 35a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -1034,7 +1034,7 @@ perl;
EOF
drop table t1;
---echo # iteration 36
+--echo # iteration 36a
set global aria_page_checksum = 1 ;
create table t1(a int) engine=aria PAGE_CHECKSUM=1 ;
show create table t1 /* expecting PAGE_CHECKSUM=1 */ ;
@@ -1071,7 +1071,7 @@ drop table t1;
# we scan through combinations in the cartesian product of
# (clauses in CREATE TABLE) x (clauses in ALTER TABLE).
---echo # iteration 1
+--echo # iteration 1b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1098,7 +1098,7 @@ EOF
drop table t1;
---echo # iteration 2
+--echo # iteration 2b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1125,7 +1125,7 @@ EOF
drop table t1;
---echo # iteration 3
+--echo # iteration 3b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1152,7 +1152,7 @@ EOF
drop table t1;
---echo # iteration 4
+--echo # iteration 4b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1179,7 +1179,7 @@ EOF
drop table t1;
---echo # iteration 5
+--echo # iteration 5b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1206,7 +1206,7 @@ EOF
drop table t1;
---echo # iteration 6
+--echo # iteration 6b
create table t1(a int) engine=aria ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1233,7 +1233,7 @@ EOF
drop table t1;
---echo # iteration 7
+--echo # iteration 7b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1260,7 +1260,7 @@ EOF
drop table t1;
---echo # iteration 8
+--echo # iteration 8b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1287,7 +1287,7 @@ EOF
drop table t1;
---echo # iteration 9
+--echo # iteration 9b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1314,7 +1314,7 @@ EOF
drop table t1;
---echo # iteration 10
+--echo # iteration 10b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1341,7 +1341,7 @@ EOF
drop table t1;
---echo # iteration 11
+--echo # iteration 11b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1368,7 +1368,7 @@ EOF
drop table t1;
---echo # iteration 12
+--echo # iteration 12b
create table t1(a int) engine=aria transactional=0 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1395,7 +1395,7 @@ EOF
drop table t1;
---echo # iteration 13
+--echo # iteration 13b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1422,7 +1422,7 @@ EOF
drop table t1;
---echo # iteration 14
+--echo # iteration 14b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1449,7 +1449,7 @@ EOF
drop table t1;
---echo # iteration 15
+--echo # iteration 15b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1476,7 +1476,7 @@ EOF
drop table t1;
---echo # iteration 16
+--echo # iteration 16b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1503,7 +1503,7 @@ EOF
drop table t1;
---echo # iteration 17
+--echo # iteration 17b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
@@ -1530,7 +1530,7 @@ EOF
drop table t1;
---echo # iteration 18
+--echo # iteration 18b
create table t1(a int) engine=aria transactional=1 ;
show create table t1;
--exec $MARIA_CHK -dv $MYSQLD_DATADIR/test/t1 >$MYSQLTEST_VARDIR/tmp/ariachk.txt
diff --git a/mysql-test/suite/maria/maria-partitioning.result b/mysql-test/suite/maria/maria-partitioning.result
index bcb88626ff7..ad5de7952c7 100644
--- a/mysql-test/suite/maria/maria-partitioning.result
+++ b/mysql-test/suite/maria/maria-partitioning.result
@@ -2,8 +2,8 @@ set global storage_engine=aria;
set session storage_engine=aria;
DROP TABLE if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table '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-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result
index e7258f21d4f..fab640f703a 100644
--- a/mysql-test/suite/maria/maria-ucs2.result
+++ b/mysql-test/suite/maria/maria-ucs2.result
@@ -17,7 +17,6 @@ test.t1 check status OK
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
-Warning 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
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 2aad2f5cc75..021cc8fc357 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -460,7 +460,7 @@ id f1
1 test1
2 test2
drop table t1;
-SET SQL_MODE = 'TRADITIONAL';
+SET SQL_MODE = '';
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
insert into t1 values(100, "a");
insert into t1 values(300, "b");
diff --git a/mysql-test/suite/maria/maria3.test b/mysql-test/suite/maria/maria3.test
index f1d95a15ba5..b4e3e30d63f 100644
--- a/mysql-test/suite/maria/maria3.test
+++ b/mysql-test/suite/maria/maria3.test
@@ -364,7 +364,7 @@ INSERT IGNORE INTO t1 (f1) VALUES ("test1");
INSERT IGNORE INTO t1 (f1) VALUES ("test2");
SELECT * FROM t1;
drop table t1;
-SET SQL_MODE = 'TRADITIONAL';
+SET SQL_MODE = '';
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
insert into t1 values(100, "a");
diff --git a/mysql-test/suite/maria/max_length.result b/mysql-test/suite/maria/max_length.result
index 6db58622698..049b92eafe5 100644
--- a/mysql-test/suite/maria/max_length.result
+++ b/mysql-test/suite/maria/max_length.result
@@ -1,7 +1,7 @@
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't1'
-Note 1051 Unknown table 't2'
+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;
lock tables t1 write,t2 write;
diff --git a/mysql-test/suite/maria/small_blocksize.result b/mysql-test/suite/maria/small_blocksize.result
index f418a1f92ef..940a718d34e 100644
--- a/mysql-test/suite/maria/small_blocksize.result
+++ b/mysql-test/suite/maria/small_blocksize.result
@@ -1,6 +1,6 @@
DROP TABLE if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (col_longtext_ucs2 longtext, col_longtext_utf8 longtext, col_varchar_255_ucs2_key varchar(255), col_set_utf8 set ('a','b'), col_char_255_ucs2 char(255), col_char_255_ucs2_key char(255), col_enum_ucs2 enum ('a','b'), col_varchar_255_ucs2 varchar(255), col_longtext_ucs2_key longtext, col_longtext_utf8_key longtext, col_enum_utf8 enum ('a','b'), col_varchar_255_utf8_key varchar(1024), col_varchar_255_utf8 varchar(255), col_enum_ucs2_key enum ('a','b'), col_enum_utf8_key enum ('a','b'), col_set_utf8_key set ('a','b'), col_char_255_utf8 char(255), pk integer auto_increment, col_set_ucs2_key set ('a','b'), col_char_255_utf8_key char(255), col_set_ucs2 set ('a','b'), primary key (pk)) ENGINE=aria;
INSERT INTO t1 ( col_char_255_utf8, col_varchar_255_utf8_key, col_longtext_utf8_key ) VALUES ( 'lggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrk', REPEAT( 'a', 627 ), 'mlggnqojgqectqlkvskffihliqcwoakzzzjvhkqlwjybkngdbubskflpmzegdrklnipcmzbtwdqfnyinqfohgtiwmvfpbuslgobjhslxnaybcyebhsrlipnuvalhmvhlwbwujtvjsdrbyapfzprnxfgtrukwhywtkaoupsaogxsjxhqjkidvnpeytjgndtnrrbm' );
UPDATE t1 SET col_varchar_255_utf8 = REPEAT('a', 197 );
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result
index 6b3025af842..5973c8ade46 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41029.result
@@ -7,7 +7,7 @@ set autocommit=0;
use test;
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (dummy int primary key, a int unique, b int) engine=innodb;
insert into t1 values(1,1,1),(3,3,3),(5,5,5);
commit;
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result
index bad32010c8c..31e39d4421d 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result
@@ -1,7 +1,7 @@
set session debug_dbug="+d,optimizer_innodb_icp";
drop table if exists `t1`;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb;
insert into `t1` values(2,2);
delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ;
diff --git a/mysql-test/suite/oqgraph/r/basic.result b/mysql-test/suite/oqgraph/r/basic.result
index e90659c0986..19e48db39fc 100644
--- a/mysql-test/suite/oqgraph/r/basic.result
+++ b/mysql-test/suite/oqgraph/r/basic.result
@@ -1,6 +1,6 @@
drop table if exists graph;
Warnings:
-Note 1051 Unknown table 'graph'
+Note 1051 Unknown table 'test.graph'
CREATE TABLE graph (
latch SMALLINT UNSIGNED NULL,
origid BIGINT UNSIGNED NULL,
diff --git a/mysql-test/suite/parts/inc/partition.pre b/mysql-test/suite/parts/inc/partition.pre
index f9b361c787c..f82916ae631 100644
--- a/mysql-test/suite/parts/inc/partition.pre
+++ b/mysql-test/suite/parts/inc/partition.pre
@@ -23,13 +23,13 @@
################################################################################
# Set the session storage engine
-eval SET @@session.storage_engine = $engine;
+eval SET @@session.default_storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs #####
# --echo
# --echo #------------------------------------------------------------------------
# --echo # There are several testcases disabled because of the open bugs
-# if (`SELECT @@session.storage_engine IN('ndbcluster')`)
+# if (`SELECT @@session.default_storage_engine IN('ndbcluster')`)
# {
# --echo # #18730
# }
@@ -135,7 +135,7 @@ f_charbig VARCHAR(1000);
# in partition_methods[1|2].inc and partition_alter_1[1|3].inc
# when $sub_part_no is set to >= 3.
let $sub_part_no= 3;
-if (`SELECT @@session.storage_engine = 'ndbcluster'`)
+if (`SELECT @@session.default_storage_engine = 'ndbcluster'`)
{
let $sub_part_no= 2;
}
@@ -318,7 +318,7 @@ if (0)
# --source inc/have_partition.inc
# b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine
-# SET SESSION storage_engine
+# SET SESSION default_storage_engine
# $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed
# via
diff --git a/mysql-test/suite/parts/inc/partition_alter3.inc b/mysql-test/suite/parts/inc/partition_alter3.inc
index 1fad361b371..395f93f44f6 100644
--- a/mysql-test/suite/parts/inc/partition_alter3.inc
+++ b/mysql-test/suite/parts/inc/partition_alter3.inc
@@ -115,6 +115,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_check_read1.inc
#
--echo # 1.2.7 Remove partitioning from not partitioned table --> ????
+--error ER_PARTITION_MGMT_ON_NONPARTITIONED
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
@@ -193,6 +194,7 @@ ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_check_read2.inc
#
--echo # 2.2.7 Remove partitioning from not partitioned table --> ????
+--error ER_PARTITION_MGMT_ON_NONPARTITIONED
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
--source suite/parts/inc/partition_check_drop.inc
diff --git a/mysql-test/suite/parts/inc/partition_crash_exchange.inc b/mysql-test/suite/parts/inc/partition_crash_exchange.inc
new file mode 100644
index 00000000000..399cff8f376
--- /dev/null
+++ b/mysql-test/suite/parts/inc/partition_crash_exchange.inc
@@ -0,0 +1,29 @@
+# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
+SET SESSION debug_dbug="+d,exchange_partition_abort_1";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_1";
+SET SESSION debug_dbug="+d,exchange_partition_abort_2";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_2";
+SET SESSION debug_dbug="+d,exchange_partition_abort_3";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_3";
+SET SESSION debug_dbug="+d,exchange_partition_abort_4";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_4";
+SET SESSION debug_dbug="+d,exchange_partition_abort_5";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_5";
+SET SESSION debug_dbug="+d,exchange_partition_abort_6";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_6";
+SET SESSION debug_dbug="+d,exchange_partition_abort_7";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_7";
+SET SESSION debug_dbug="+d,exchange_partition_abort_8";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_8";
+SET SESSION debug_dbug="+d,exchange_partition_abort_9";
+--source suite/parts/inc/partition_crash_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_abort_9";
+
diff --git a/mysql-test/suite/parts/inc/partition_crash_t2.inc b/mysql-test/suite/parts/inc/partition_crash_t2.inc
new file mode 100644
index 00000000000..fd88cc60a8d
--- /dev/null
+++ b/mysql-test/suite/parts/inc/partition_crash_t2.inc
@@ -0,0 +1,12 @@
+# Include file to extend partition_crash with a second table.
+# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
+--eval $create_statement2
+--eval $insert_statement2
+SHOW CREATE TABLE t2;
+--sorted_result
+SELECT * FROM t2;
+--source suite/parts/inc/partition_crash.inc
+SHOW CREATE TABLE t2;
+--sorted_result
+SELECT * FROM t2;
+DROP TABLE t2;
diff --git a/mysql-test/suite/parts/inc/partition_fail_exchange.inc b/mysql-test/suite/parts/inc/partition_fail_exchange.inc
new file mode 100644
index 00000000000..cc8d76bedfe
--- /dev/null
+++ b/mysql-test/suite/parts/inc/partition_fail_exchange.inc
@@ -0,0 +1,27 @@
+SET SESSION debug_dbug="+d,exchange_partition_fail_1";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_1";
+SET SESSION debug_dbug="+d,exchange_partition_fail_2";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_2";
+SET SESSION debug_dbug="+d,exchange_partition_fail_3";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_3";
+SET SESSION debug_dbug="+d,exchange_partition_fail_4";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_4";
+SET SESSION debug_dbug="+d,exchange_partition_fail_5";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_5";
+SET SESSION debug_dbug="+d,exchange_partition_fail_6";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_6";
+SET SESSION debug_dbug="+d,exchange_partition_fail_7";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_7";
+SET SESSION debug_dbug="+d,exchange_partition_fail_8";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_8";
+SET SESSION debug_dbug="+d,exchange_partition_fail_9";
+--source suite/parts/inc/partition_fail_t2.inc
+SET SESSION debug_dbug="-d,exchange_partition_fail_9";
diff --git a/mysql-test/suite/parts/inc/partition_fail_t2.inc b/mysql-test/suite/parts/inc/partition_fail_t2.inc
new file mode 100644
index 00000000000..3904ec8662c
--- /dev/null
+++ b/mysql-test/suite/parts/inc/partition_fail_t2.inc
@@ -0,0 +1,31 @@
+# Include file to to test failure with error injection.
+# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
+--eval $create_statement2
+--eval $insert_statement2
+SHOW CREATE TABLE t2;
+--sorted_result
+SELECT * FROM t2;
+--eval $create_statement
+--eval $insert_statement
+--echo # State before failure
+--replace_result #p# #P#
+--list_files $DATADIR/test
+SHOW CREATE TABLE t1;
+--sorted_result
+SELECT * FROM t1;
+# accept all errors
+--disable_abort_on_error
+--replace_regex /#sqlx-[0-9a-f_]*/#sqlx-nnnn_nnnn/i
+--eval $fail_statement
+--enable_abort_on_error
+--echo # State after failure
+--replace_result #p# #P#
+--list_files $DATADIR/test
+SHOW CREATE TABLE t1;
+--sorted_result
+SELECT * FROM t1;
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+--sorted_result
+SELECT * FROM t2;
+DROP TABLE t2;
diff --git a/mysql-test/suite/parts/r/part_ctype_utf32.result b/mysql-test/suite/parts/r/part_ctype_utf32.result
index 5d52a8eace4..4667fe1035f 100644
--- a/mysql-test/suite/parts/r/part_ctype_utf32.result
+++ b/mysql-test/suite/parts/r/part_ctype_utf32.result
@@ -3,7 +3,7 @@
#
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (
a enum('a') CHARACTER SET utf32 COLLATE utf32_spanish2_ci
) ENGINE=MYISAM PARTITION BY KEY(a) PARTITIONS 2;
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
index 3ef62f2b050..00ef7527059 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
index 887ac403cdb..bc737289895 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
index 66d84768b5e..0a7b284a15c 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
index 9f616d04df3..26450b28620 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
index f1a1aeecb66..22d24bd50fe 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
index 087262f5f89..72545e89bae 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
index 314044044bb..f3d5314643b 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
index e824cf45ce9..eb662109cea 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_maria.result b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
index 3dc6bae975a..0e7c1818fbc 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'Aria';
+SET @@session.default_storage_engine = 'Aria';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
index f2a13497159..c3e1b18841c 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
index faba21b41f7..1f4642f63ec 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
index 2557cd5a219..0db5bf79c4d 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_maria.result b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
index b5d45539036..2bb3683ad73 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'Aria';
+SET @@session.default_storage_engine = 'Aria';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
index 70e869f48fb..8d8e77ebbd3 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter3_innodb.result b/mysql-test/suite/parts/r/partition_alter3_innodb.result
index ed41ede378d..fd67547f55b 100644
--- a/mysql-test/suite/parts/r/partition_alter3_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
+t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@@ -78,6 +79,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -96,6 +98,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -112,6 +115,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -137,6 +141,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -161,6 +168,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -186,6 +197,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#p6.ibd
+t1#P#p7.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -222,6 +241,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#p6.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -244,6 +270,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -265,6 +297,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -285,6 +322,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -304,6 +345,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -322,6 +366,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -339,6 +385,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
@@ -359,6 +406,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
+t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@@ -367,6 +415,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
@@ -398,6 +447,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
+t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@@ -420,6 +470,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -448,6 +499,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -472,6 +526,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -500,6 +558,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#p6.ibd
+t1#P#p7.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -534,6 +600,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#p6.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -559,6 +632,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#p5.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -583,6 +662,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#p4.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -606,6 +690,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -628,6 +716,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
+t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -649,6 +740,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
+t1#P#p0.ibd
+t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -669,6 +762,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB) */
+t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
@@ -692,6 +786,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
+t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
@@ -700,6 +795,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
# Attention: There are unused files.
# Either the DROP TABLE or a preceding ALTER TABLE
diff --git a/mysql-test/suite/parts/r/partition_alter3_myisam.result b/mysql-test/suite/parts/r/partition_alter3_myisam.result
index 297f2bf9210..dfb21ee17ba 100644
--- a/mysql-test/suite/parts/r/partition_alter3_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@@ -463,6 +463,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
#========================================================================
@@ -882,6 +883,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
# check read row by row success: 1
# 2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
+ERROR HY000: Partition management on a not partitioned table is not possible
DROP TABLE t1;
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index 46f3ed3c974..e4dacbc663c 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index c74a105306c..8aba07874aa 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index ea5a53fc5f4..c74380d3591 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
@@ -77,6 +77,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -498,7 +500,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -532,6 +534,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -953,7 +960,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -1002,6 +1009,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -1423,7 +1438,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -1468,6 +1483,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -1887,7 +1908,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -1930,6 +1951,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -2351,7 +2380,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -2405,6 +2434,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -2824,7 +2861,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -2882,6 +2919,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -3303,7 +3348,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -3345,6 +3390,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -3766,7 +3820,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -3802,6 +3856,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -4223,7 +4279,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -4257,6 +4313,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -4678,7 +4739,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -4727,6 +4788,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -5148,7 +5217,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -5193,6 +5262,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -5612,7 +5687,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -5655,6 +5730,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -6074,7 +6157,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -6128,6 +6211,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -6547,7 +6638,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -6601,6 +6692,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -7022,7 +7121,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -7064,6 +7163,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -7485,7 +7593,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -7527,6 +7635,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -7983,7 +8093,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -8019,6 +8129,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -8475,7 +8590,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -8526,6 +8641,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -8982,7 +9105,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -9029,6 +9152,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -9483,7 +9612,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -9528,6 +9657,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -9984,7 +10121,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -10040,6 +10177,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -10494,7 +10639,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -10554,6 +10699,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -11010,7 +11163,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -11054,6 +11207,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -11510,7 +11672,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -11547,6 +11709,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -12003,7 +12167,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -12039,6 +12203,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -12495,7 +12664,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -12546,6 +12715,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -13002,7 +13179,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -13049,6 +13226,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -13503,7 +13686,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -13548,6 +13731,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -14004,7 +14195,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -14060,6 +14251,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -14514,7 +14713,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -14574,6 +14773,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -15030,7 +15237,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -15074,6 +15281,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -15530,7 +15746,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -15567,6 +15783,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -16039,7 +16257,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -16075,6 +16293,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -16547,7 +16770,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -16598,6 +16821,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -17070,7 +17301,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -17117,6 +17348,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -17587,7 +17824,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -17632,6 +17869,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -18104,7 +18349,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -18160,6 +18405,14 @@ SUBPARTITION BY KEY (f_int1)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -18630,7 +18883,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -18690,6 +18943,14 @@ SUBPARTITION BY HASH (f_int1 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -19162,7 +19423,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -19206,6 +19467,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -19678,7 +19948,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -19720,6 +19990,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -20176,7 +20448,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -20212,6 +20484,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -20668,7 +20945,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -20719,6 +20996,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -21175,7 +21460,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -21222,6 +21507,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -21676,7 +21967,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -21721,6 +22012,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -22175,7 +22474,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -22231,6 +22530,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -22685,7 +22992,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -22741,6 +23048,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -23197,7 +23512,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -23241,6 +23556,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -23697,7 +24021,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -23734,6 +24058,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -24190,7 +24516,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -24226,6 +24552,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -24682,7 +25013,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -24733,6 +25064,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -25189,7 +25528,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -25236,6 +25575,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -25690,7 +26035,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -25735,6 +26080,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -26189,7 +26542,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -26245,6 +26598,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -26699,7 +27060,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -26755,6 +27116,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -27211,7 +27580,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -27255,6 +27624,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -27711,7 +28089,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -27748,6 +28126,8 @@ t1 CREATE TABLE `t1` (
PARTITIONS 2 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
t1.frm
t1.par
@@ -28220,7 +28600,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -28256,6 +28636,11 @@ t1 CREATE TABLE `t1` (
PARTITIONS 5 */
unified filelist
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1#P#p2.ibd
+t1#P#p3.ibd
+t1#P#p4.ibd
t1.frm
t1.par
@@ -28728,7 +29113,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -28779,6 +29164,14 @@ t1 CREATE TABLE `t1` (
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
unified filelist
+t1#P#part0.ibd
+t1#P#part1.ibd
+t1#P#part2.ibd
+t1#P#part3.ibd
+t1#P#part_1.ibd
+t1#P#part_2.ibd
+t1#P#part_3.ibd
+t1#P#part_N.ibd
t1.frm
t1.par
@@ -29251,7 +29644,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -29298,6 +29691,12 @@ t1 CREATE TABLE `t1` (
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta.ibd
+t1#P#partb.ibd
+t1#P#partc.ibd
+t1#P#partd.ibd
+t1#P#parte.ibd
+t1#P#partf.ibd
t1.frm
t1.par
@@ -29768,7 +30167,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -29813,6 +30212,14 @@ SUBPARTITIONS 2
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
unified filelist
+t1#P#parta#SP#partasp0.ibd
+t1#P#parta#SP#partasp1.ibd
+t1#P#partb#SP#partbsp0.ibd
+t1#P#partb#SP#partbsp1.ibd
+t1#P#partc#SP#partcsp0.ibd
+t1#P#partc#SP#partcsp1.ibd
+t1#P#partd#SP#partdsp0.ibd
+t1#P#partd#SP#partdsp1.ibd
t1.frm
t1.par
@@ -30283,7 +30690,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -30339,6 +30746,14 @@ SUBPARTITION BY KEY (f_int2)
SUBPARTITION subpart42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#subpart11.ibd
+t1#P#part1#SP#subpart12.ibd
+t1#P#part2#SP#subpart21.ibd
+t1#P#part2#SP#subpart22.ibd
+t1#P#part3#SP#subpart31.ibd
+t1#P#part3#SP#subpart32.ibd
+t1#P#part4#SP#subpart41.ibd
+t1#P#part4#SP#subpart42.ibd
t1.frm
t1.par
@@ -30809,7 +31224,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -30865,6 +31280,14 @@ SUBPARTITION BY HASH (f_int2 + 1)
SUBPARTITION sp42 ENGINE = InnoDB)) */
unified filelist
+t1#P#part1#SP#sp11.ibd
+t1#P#part1#SP#sp12.ibd
+t1#P#part2#SP#sp21.ibd
+t1#P#part2#SP#sp22.ibd
+t1#P#part3#SP#sp31.ibd
+t1#P#part3#SP#sp32.ibd
+t1#P#part4#SP#sp41.ibd
+t1#P#part4#SP#sp42.ibd
t1.frm
t1.par
@@ -31337,7 +31760,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
@@ -31381,6 +31804,15 @@ SUBPARTITIONS 3
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
unified filelist
+t1#P#part1#SP#part1sp0.ibd
+t1#P#part1#SP#part1sp1.ibd
+t1#P#part1#SP#part1sp2.ibd
+t1#P#part2#SP#part2sp0.ibd
+t1#P#part2#SP#part2sp1.ibd
+t1#P#part2#SP#part2sp2.ibd
+t1#P#part3#SP#part3sp0.ibd
+t1#P#part3#SP#part3sp1.ibd
+t1#P#part3#SP#part3sp2.ibd
t1.frm
t1.par
@@ -31853,7 +32285,7 @@ test.t1 optimize status OK
# check layout success: 1
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
-test.t1 repair status OK
+test.t1 repair note The storage engine for the table doesn't support repair
# check layout success: 1
TRUNCATE t1;
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index f70dae13bb6..8cddb7baca6 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
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 731cb186b34..a202af5b474 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
@@ -1,10 +1,40 @@
-# Will not run partition_basic_symlink on InnoDB, since it is the same
-# as partition_basic, since InnoDB does not support DATA/INDEX DIR
-# Will only verify that the DATA/INDEX DIR is stored and used if
-# ALTER to MyISAM.
+#
+# Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
+#
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (c1 INT)
-ENGINE = InnoDB
+SET SESSION innodb_strict_mode = ON;
+#
+# InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
+#
+SET GLOBAL innodb_file_per_table = OFF;
+CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
+PARTITION BY HASH (c1) (
+PARTITION p0
+DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
+ INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir',
+PARTITION p1
+DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
+ INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'
+);
+ERROR HY000: Can't create table 'test.t1' (errno: 140 "Wrong create options")
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table.
+Warning 1478 InnoDB: INDEX DIRECTORY is not supported
+Error 1005 Can't create table 'test.t1' (errno: 140 "Wrong create options")
+Error 6 Error on delete of 'MYSQLD_DATADIR/test/t1.par' (Errcode: 2 "No such file or directory")
+#
+# InnoDB is different from MyISAM in that it uses a text file
+# with an '.isl' extension instead of a symbolic link so that
+# the tablespace can be re-located on any OS. Also, instead of
+# putting the file directly into the DATA DIRECTORY,
+# it adds a folder under it with the name of the database.
+# Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
+# and it is no longer part of the definition.
+#
+SET SESSION innodb_strict_mode = OFF;
+SET GLOBAL innodb_file_per_table = ON;
+CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1)
(PARTITION p0
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
@@ -13,8 +43,26 @@ PARTITION p1
DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
-# Verifying .frm and .par files
-# Verifying that there are no MyISAM files
+Warnings:
+Warning 1618 <INDEX DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+SHOW WARNINGS;
+Level Code Message
+Warning 1618 <INDEX DIRECTORY> option ignored
+Warning 1618 <INDEX DIRECTORY> option ignored
+# Verifying .frm, .par, .isl & .ibd files
+---- MYSQLD_DATADIR/test
+t1#P#p0.isl
+t1#P#p1.isl
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+t1#P#p0.ibd
+t1#P#p1.ibd
+# The ibd tablespaces should not be directly under the DATA DIRECTORY
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
FLUSH TABLES;
SHOW CREATE TABLE t1;
Table Create Table
@@ -22,17 +70,61 @@ t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (c1)
-(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
- PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */
-ALTER TABLE t1 ENGINE = MyISAM;
-# Verifying .frm, .par and MyISAM files (.MYD, MYI)
-FLUSH TABLES;
+(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
+#
+# Verify that the DATA/INDEX DIRECTORY is stored and used if we
+# ALTER TABLE to MyISAM.
+#
+ALTER TABLE t1 engine=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (c1)
-(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM,
- PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */
+(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
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+t1#P#p0.MYD
+t1#P#p1.MYD
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+#
+# Now verify that the DATA DIRECTORY is used again if we
+# ALTER TABLE back to InnoDB.
+#
+SET SESSION innodb_strict_mode = ON;
+ALTER TABLE t1 engine=InnoDB;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
+# Verifying .frm, .par, .isl and InnoDB .ibd files
+---- MYSQLD_DATADIR/test
+t1#P#p0.isl
+t1#P#p1.isl
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+t1#P#p0.ibd
+t1#P#p1.ibd
DROP TABLE t1;
+#
+# Cleanup
+#
diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
index 146b3d361fb..5f44fd138d9 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_debug_innodb.result b/mysql-test/suite/parts/r/partition_debug_innodb.result
index 891091efd58..7ecd746077e 100644
--- a/mysql-test/suite/parts/r/partition_debug_innodb.result
+++ b/mysql-test/suite/parts/r/partition_debug_innodb.result
@@ -1,75 +1,4 @@
DROP TABLE IF EXISTS t1;
-#
-# Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL
-# VS INNODB, PARTITONING, ON INDEX CREATE
-#
-CREATE TABLE t1
-(a INT PRIMARY KEY,
-b VARCHAR(64))
-ENGINE = InnoDB
-PARTITION BY HASH (a) PARTITIONS 3;
-INSERT INTO t1 VALUES (0, 'first row'), (1, 'second row'), (2, 'Third row');
-INSERT INTO t1 VALUES (3, 'row id 3'), (4, '4 row'), (5, 'row5');
-INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row');
-ALTER TABLE t1 ADD INDEX new_b_index (b);
-ALTER TABLE t1 DROP INDEX new_b_index;
-SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index";
-ALTER TABLE t1 ADD INDEX (b);
-ERROR HY000: Table has no partition for value 0
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- `b` varchar(64) DEFAULT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (a)
-PARTITIONS 3 */
-SELECT * FROM t1;
-a b
-0 first row
-1 second row
-2 Third row
-3 row id 3
-4 4 row
-5 row5
-6 X 6 row
-7 Seventh row
-8 Last row
-FLUSH TABLES;
-CREATE INDEX new_index ON t1 (b);
-ERROR HY000: Table has no partition for value 0
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- `b` varchar(64) DEFAULT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (a)
-PARTITIONS 3 */
-SELECT * FROM t1;
-a b
-0 first row
-1 second row
-2 Third row
-3 row id 3
-4 4 row
-5 row5
-6 X 6 row
-7 Seventh row
-8 Last row
-SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index";
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL,
- `b` varchar(64) DEFAULT NULL,
- PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
-/*!50100 PARTITION BY HASH (a)
-PARTITIONS 3 */
-DROP TABLE t1;
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 ");
@@ -3922,7 +3851,6 @@ t1.par
# State after crash recovery
t1#P#p0.ibd
t1#P#p10.ibd
-t1#P#p20.ibd
t1.frm
t1.par
SHOW CREATE TABLE t1;
@@ -3933,8 +3861,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 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) */
+ PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB) */
SELECT * FROM t1;
a b
1 Original from partition p0
@@ -4055,6 +3982,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
t1#P#p0.ibd
t1#P#p10#TMP#.ibd
t1#P#p10.ibd
@@ -5022,7 +4951,6 @@ ERROR HY000: Unknown error
# State after failure
t1#P#p0.ibd
t1#P#p10.ibd
-t1#P#p20.ibd
t1.frm
t1.par
SHOW CREATE TABLE t1;
@@ -5033,8 +4961,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 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) */
+ PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB) */
SELECT * FROM t1;
a b
1 Original from partition p0
@@ -5085,7 +5012,6 @@ ERROR HY000: Unknown error
# State after failure
t1#P#p0.ibd
t1#P#p10.ibd
-t1#P#p20.ibd
t1.frm
t1.par
SHOW CREATE TABLE t1;
@@ -5096,8 +5022,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 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) */
+ PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = InnoDB) */
SELECT * FROM t1;
a b
1 Original from partition p0
@@ -5873,3 +5798,1836 @@ a b
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12";
+#
+# WL#4445: EXCHANGE PARTITION WITH TABLE
+# Verify ddl_log and InnoDB in case of crashing.
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was ");
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+SET SESSION debug_dbug="+d,exchange_partition_abort_1";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_1";
+SET SESSION debug_dbug="+d,exchange_partition_abort_2";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_2";
+SET SESSION debug_dbug="+d,exchange_partition_abort_3";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_3";
+SET SESSION debug_dbug="+d,exchange_partition_abort_4";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+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
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_4";
+SET SESSION debug_dbug="+d,exchange_partition_abort_5";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+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
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_5";
+SET SESSION debug_dbug="+d,exchange_partition_abort_6";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+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
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_6";
+SET SESSION debug_dbug="+d,exchange_partition_abort_7";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+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
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_7";
+SET SESSION debug_dbug="+d,exchange_partition_abort_8";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_8";
+SET SESSION debug_dbug="+d,exchange_partition_abort_9";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before crash
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Lost connection to MySQL server during query
+# State after crash (before recovery)
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+# State after crash recovery
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_abort_9";
+SET SESSION debug_dbug="+d,exchange_partition_fail_1";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_1";
+SET SESSION debug_dbug="+d,exchange_partition_fail_2";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_2";
+SET SESSION debug_dbug="+d,exchange_partition_fail_3";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+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)")
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_3";
+SET SESSION debug_dbug="+d,exchange_partition_fail_4";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_4";
+SET SESSION debug_dbug="+d,exchange_partition_fail_5";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+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/t1#P#p0' to './test/t2' (errno: 0 "Internal error/check (Not system error)")
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_5";
+SET SESSION debug_dbug="+d,exchange_partition_fail_6";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_6";
+SET SESSION debug_dbug="+d,exchange_partition_fail_7";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+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)")
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_7";
+SET SESSION debug_dbug="+d,exchange_partition_fail_8";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_8";
+SET SESSION debug_dbug="+d,exchange_partition_fail_9";
+CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+PARTITION p1 VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+# State before failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+1 Original from partition p0
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+2 Original from partition p0
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+3 Original from partition p0
+4 Original from partition p0
+ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+ERROR HY000: Error in DDL log
+# State after failure
+t1#P#p0.ibd
+t1#P#p1.ibd
+t1.frm
+t1.par
+t2.frm
+t2.ibd
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10) ENGINE = InnoDB,
+ PARTITION p1 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */
+SELECT * FROM t1;
+a b
+11 Original from partition p1
+12 Original from partition p1
+13 Original from partition p1
+14 Original from partition p1
+21 Original from partition p1
+22 Original from partition p1
+23 Original from partition p1
+24 Original from partition p1
+5 Original from table t2
+6 Original from table t2
+7 Original from table t2
+8 Original from table t2
+DROP TABLE t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL,
+ `b` varchar(64) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT * FROM t2;
+a b
+1 Original from partition p0
+2 Original from partition p0
+3 Original from partition p0
+4 Original from partition p0
+DROP TABLE t2;
+SET SESSION debug_dbug="-d,exchange_partition_fail_9";
diff --git a/mysql-test/suite/parts/r/partition_debug_myisam.result b/mysql-test/suite/parts/r/partition_debug_myisam.result
index 2411d58169e..8408f166e79 100644
--- a/mysql-test/suite/parts/r/partition_debug_myisam.result
+++ b/mysql-test/suite/parts/r/partition_debug_myisam.result
@@ -4151,8 +4151,6 @@ 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;
@@ -4163,8 +4161,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 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) */
+ 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
@@ -4296,6 +4293,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
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p10#TMP#.MYD
@@ -5348,8 +5347,6 @@ 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;
@@ -5360,8 +5357,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 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) */
+ 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
@@ -5416,8 +5412,6 @@ 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;
@@ -5428,8 +5422,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 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) */
+ 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
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index 5335983b560..8e5f7c43dd9 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index cfba8731b2f..e63f9ee2fff 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result b/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
index f4d76874b4c..f1889289368 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_archive.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Archive'
@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
index 19f16780d13..da51cb26a1b 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'InnoDB'
@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
index 69a43b64d87..8e8fcfd7672 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_memory.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Memory'
@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
index 9b4e85be9d0..321d10a6a37 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -237,7 +237,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'MyISAM'
@@ -268,7 +268,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -493,7 +493,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -724,7 +724,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result b/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
index 1113e7dcb0c..fe33a5bdcd1 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_archive.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Archive'
@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
index 952f4136cb6..f2509471e9e 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'InnoDB'
@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
index 435a0d8313e..c129f70ed4e 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_memory.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'Memory'
@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
index 3a90ce4d73c..398c0174a5d 100644
--- a/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result
@@ -32,7 +32,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -228,7 +228,7 @@ PARTITION BY HASH (a)
PARTITION partA ,
PARTITION Parta ,
PARTITION PartA );
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
# Creating Hash partitioned table
CREATE TABLE TableA (a INT)
ENGINE = 'MyISAM'
@@ -259,7 +259,7 @@ ALTER TABLE TableA ADD PARTITION
(PARTITION partA,
PARTITION Parta,
PARTITION PartA);
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE,
PARTITION Partf,
@@ -475,7 +475,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES LESS THAN (MAXVALUE));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES LESS THAN (16),
PARTITION Partf VALUES LESS THAN (19),
@@ -698,7 +698,7 @@ a
# expecting duplicate partition name
ALTER TABLE TableA ADD PARTITION
(PARTITION partA VALUES IN (0));
-ERROR HY000: Duplicate partition name parta
+ERROR HY000: Duplicate partition name partA
ALTER TABLE TableA ADD PARTITION
(PARTITION partE VALUES IN (16),
PARTITION Partf VALUES IN (19),
diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result
index a9d7ce8aeb4..1e575d985a9 100644
--- a/mysql-test/suite/parts/r/partition_repair_myisam.result
+++ b/mysql-test/suite/parts/r/partition_repair_myisam.result
@@ -209,7 +209,7 @@ PARTITIONS 7;
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
33
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
0 2
1 5
@@ -218,7 +218,7 @@ partition rows
4 4
5 4
6 8
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
0 0 lost 64
0 7 z lost 64
@@ -282,7 +282,7 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
1 4
2 5
@@ -290,7 +290,7 @@ partition rows
4 4
5 4
6 7
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
1 1 abc 64
1 8 tuw 64
@@ -366,9 +366,9 @@ Table Op Msg_type Msg_text
test.t1_will_crash repair info Delete link points outside datafile at 340
test.t1_will_crash repair info Delete link points outside datafile at 340
test.t1_will_crash repair status OK
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
partition b a length(c)
6 6 jkl 64
6 13 ooo 64
@@ -385,9 +385,9 @@ FLUSH TABLES;
# table, depending if one reads via index or direct on datafile.
# Since crash when reuse of deleted row space, CHECK MEDIUM or EXTENDED
# is required (MEDIUM is default) to verify correct behavior!
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
partition b a length(c)
6 6 jkl 64
6 13 ooo 64
@@ -396,9 +396,9 @@ partition b a length(c)
6 97 zzzzzZzzzzz 64
SET @save_optimizer_switch= @@optimizer_switch;
SET @@optimizer_switch='derived_merge=off';
-SELECT (b % 7) AS partition, b, a FROM (SELECT b,a FROM t1_will_crash) q
+SELECT (b % 7) AS `partition`, b, a FROM (SELECT b,a FROM t1_will_crash) q
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
partition b a
6 6 jkl
6 13 ooo
@@ -422,7 +422,7 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
partition rows
1 4
2 4
@@ -430,7 +430,7 @@ partition rows
4 4
5 4
6 8
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
partition b a length(c)
1 1 abc 64
1 8 tuw 64
diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result
index f704d902429..92af6bc733f 100644
--- a/mysql-test/suite/parts/r/partition_syntax_innodb.result
+++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'InnoDB';
+SET @@session.default_storage_engine = 'InnoDB';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result
index 556abf7ad39..ae401e7f88a 100644
--- a/mysql-test/suite/parts/r/partition_syntax_myisam.result
+++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result
@@ -1,5 +1,5 @@
SET @max_row = 20;
-SET @@session.storage_engine = 'MyISAM';
+SET @@session.default_storage_engine = 'MyISAM';
#------------------------------------------------------------------------
# 0. Setting of auxiliary variables + Creation of an auxiliary tables
diff --git a/mysql-test/suite/parts/t/partition_basic_innodb.test b/mysql-test/suite/parts/t/partition_basic_innodb.test
index 398f62dab28..032db63693c 100644
--- a/mysql-test/suite/parts/t/partition_basic_innodb.test
+++ b/mysql-test/suite/parts/t/partition_basic_innodb.test
@@ -1,3 +1,7 @@
+#Considering the time taken for this test on slow solaris platforms making it a big test
+--source include/big_test.inc
+# Skiping this test from Valgrind execution as per Bug-14627884
+--source include/not_valgrind.inc
################################################################################
# t/partition_basic_innodb.test #
# #
@@ -22,8 +26,6 @@
# any of the variables.
#
---source include/big_test.inc
-
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
@@ -42,12 +44,12 @@ SET @max_row = 20;
let $more_trigger_tests= 0;
let $more_pk_ui_tests= 0;
-# This test relies on connecting externally from mysqltest, doesn't
-# work with embedded.
---source include/not_embedded.inc
# The server must support partitioning.
--source include/have_partition.inc
+# Does not work with --embedded
+--source include/not_embedded.inc
+
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
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 17c6a845b25..35dc2d5e004 100644
--- a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
+++ b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
@@ -14,16 +14,20 @@
# Change Author: mattiasj #
# Change Date: 2008-03-16 #
# Change: Replaced all test with alter -> myisam, since innodb does not support#
-# DATA/INDEX DIRECTORY #
+# Change Author: Kevin lewis #
+# Change Date: 2012-03-02 #
+# Change: WL5980 activates DATA DIRECTORY for InnoDB #
################################################################################
-# NOTE: Until InnoDB supports DATA/INDEX DIR, test that a partitioned table
-# remembers the DATA/INDEX DIR and it is used if altered to MyISAM
+# NOTE: As of WL5980, InnoDB supports DATA DIRECTORY, but not INDEX DIRECTORY.
+# See innodb.innodb-tablespace for tests using partition engine, innodb
+# and DATADIRECTORY. The purpose of this test is to show that a
+# partitioned table remembers the DATA/INDEX DIR and it is used if
+# altered to MyISAM
#
---echo # Will not run partition_basic_symlink on InnoDB, since it is the same
---echo # as partition_basic, since InnoDB does not support DATA/INDEX DIR
---echo # Will only verify that the DATA/INDEX DIR is stored and used if
---echo # ALTER to MyISAM.
+--echo #
+--echo # Verify that the DATA/INDEX DIR is stored and used if ALTER to MyISAM.
+--echo #
--source include/have_innodb.inc
# The server must support partitioning.
--source include/have_partition.inc
@@ -32,17 +36,57 @@
# windows does not support symlink for DATA/INDEX DIRECTORY.
--source include/not_windows.inc
+# 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
-let $MYSQLD_DATADIR= `select @@datadir`;
-
--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir
--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
+
+SET SESSION innodb_strict_mode = ON;
+
+--echo #
+--echo # InnoDB only supports DATA DIRECTORY with innodb_file_per_table=ON
+--echo #
+SET GLOBAL innodb_file_per_table = OFF;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--error ER_CANT_CREATE_TABLE
+eval CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
+PARTITION BY HASH (c1) (
+ PARTITION p0
+ DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
+ INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir',
+ PARTITION p1
+ DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
+ INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
+);
+--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR
+SHOW WARNINGS;
+
+--echo #
+--echo # InnoDB is different from MyISAM in that it uses a text file
+--echo # with an '.isl' extension instead of a symbolic link so that
+--echo # the tablespace can be re-located on any OS. Also, instead of
+--echo # putting the file directly into the DATA DIRECTORY,
+--echo # it adds a folder under it with the name of the database.
+--echo # Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
+--echo # and it is no longer part of the definition.
+--echo #
+SET SESSION innodb_strict_mode = OFF;
+SET GLOBAL innodb_file_per_table = ON;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval CREATE TABLE t1 (c1 INT)
-ENGINE = InnoDB
+eval CREATE TABLE t1 (c1 INT) ENGINE = InnoDB
PARTITION BY HASH (c1)
(PARTITION p0
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
@@ -51,116 +95,70 @@ PARTITION BY HASH (c1)
DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir'
INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir'
);
---echo # Verifying .frm and .par files
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.par
---echo # Verifying that there are no MyISAM files
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
+SHOW WARNINGS;
+
+--echo # Verifying .frm, .par, .isl & .ibd files
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--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
+--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
+
FLUSH TABLES;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
-ALTER TABLE t1 ENGINE = MyISAM;
+
+--echo #
+--echo # Verify that the DATA/INDEX DIRECTORY is stored and used if we
+--echo # ALTER TABLE to MyISAM.
+--echo #
+ALTER TABLE t1 engine=MyISAM;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+SHOW CREATE TABLE t1;
--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.par
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
-FLUSH TABLES;
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--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 #
+--echo # Now verify that the DATA DIRECTORY is used again if we
+--echo # ALTER TABLE back to InnoDB.
+--echo #
+SET SESSION innodb_strict_mode = ON;
+ALTER TABLE t1 engine=InnoDB;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
SHOW CREATE TABLE t1;
-DROP TABLE t1;
---rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
---rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
---exit
-# here is the old test, which is tested by partition_basic_innodb
-
-#
-# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
-# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
-# THE SOURCED FILES ONLY.
-#
-# Please read the README at the end of inc/partition.pre before changing
-# any of the variables.
-#
-
-#------------------------------------------------------------------------------#
-# General not engine specific settings and requirements
-
-##### Options, for debugging support #####
-let $debug= 0;
-let $with_partitioning= 1;
-
-##### Option, for displaying files #####
-let $ls= 1;
-
-##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
-# on partioned tables
-SET @max_row = 20;
-
-##### Execute more tests #####
-let $more_trigger_tests= 0;
-let $more_pk_ui_tests= 0;
-
-# The server must support partitioning.
---source include/have_partition.inc
-# The server must support symlink for DATA/INDEX DIRECTORY.
---source include/have_symlink.inc
-# windows does not support symlink for DATA/INDEX DIRECTORY.
---source include/not_windows.inc
+--echo # Verifying .frm, .par, .isl and InnoDB .ibd files
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--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
-#------------------------------------------------------------------------------#
-# Engine specific settings and requirements
-
-##### Storage engine to be tested
---source include/have_innodb.inc
-let $engine= 'InnoDB';
-
-##### Execute the test of "table" files
-# InnoDB has no files per PK, UI, ...
-let $do_file_tests= 0;
-
-##### Execute PRIMARY KEY tests #####
-# AFAIK InnoDB clusters the table around PRIMARY KEYs.
-let $do_pk_tests= 1;
+DROP TABLE t1;
-##### Assign a big number smaller than the maximum value for partitions #####
-# and smaller than the maximum value of SIGNED INTEGER
-let $MAX_VALUE= (2147483646);
+--echo #
+--echo # Cleanup
+--echo #
-# Generate the prerequisites ($variables, @variables, tables) needed
---source suite/parts/inc/partition.pre
+--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir
+--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir
-##### Workarounds for known open engine specific bugs
-# none
+--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
-#------------------------------------------------------------------------------#
-# Execute the tests to be applied to all storage engines
---source suite/parts/inc/partition_basic_symlink.inc
-#------------------------------------------------------------------------------#
-# Execute storage engine specific tests
-#------------------------------------------------------------------------------#
-# Cleanup
---source suite/parts/inc/partition_cleanup.inc
diff --git a/mysql-test/suite/parts/t/partition_debug_innodb.test b/mysql-test/suite/parts/t/partition_debug_innodb.test
index 33cbd8e3b7b..d4cac35c0b6 100644
--- a/mysql-test/suite/parts/t/partition_debug_innodb.test
+++ b/mysql-test/suite/parts/t/partition_debug_innodb.test
@@ -1,10 +1,12 @@
-# Partitioning test that require debug features
+# Partitioning test that require debug features and InnoDB
# including crashing tests.
--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
--source include/not_valgrind.inc
+# Crash tests don't work with embedded
--source include/not_embedded.inc
--disable_warnings
@@ -13,6 +15,9 @@ DROP TABLE IF EXISTS t1;
--let $DATADIR= `SELECT @@datadir;`
+# Waiting for wl#6723
+if (0)
+{
--echo #
--echo # Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL
--echo # VS INNODB, PARTITONING, ON INDEX CREATE
@@ -47,6 +52,7 @@ SELECT * FROM t1;
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index";
SHOW CREATE TABLE t1;
DROP TABLE t1;
+}
# Checking with #innodb what this is...
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
@@ -60,3 +66,26 @@ 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.
+# Investigating if this warning is OK when crash testing.
+call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was ");
+#
+call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
+call mtr.add_suppression("table .* does not exist in the InnoDB internal");
+
+let $create_statement= CREATE TABLE t1 (a INT, b VARCHAR(64))
+ENGINE = InnoDB
+PARTITION BY RANGE (a)
+(PARTITION p0 VALUES LESS THAN (10),
+ PARTITION p1 VALUES LESS THAN MAXVALUE);
+let $insert_statement= INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"), (21, "Original from partition p1"), (22, "Original from partition p1"), (23, "Original from partition p1"), (24, "Original from partition p1");
+
+let $create_statement2= CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
+let $insert_statement2= INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
+let $crash_statement= ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2;
+--source suite/parts/inc/partition_crash_exchange.inc
+let $fail_statement= $crash_statement;
+--source suite/parts/inc/partition_fail_exchange.inc
diff --git a/mysql-test/suite/parts/t/partition_repair_myisam.test b/mysql-test/suite/parts/t/partition_repair_myisam.test
index 96d68fd7fc9..91c8ed57580 100644
--- a/mysql-test/suite/parts/t/partition_repair_myisam.test
+++ b/mysql-test/suite/parts/t/partition_repair_myisam.test
@@ -151,8 +151,8 @@ eval INSERT INTO t1_will_crash VALUES
('6 row 7 (crash before completely written to datafile)', 27, '$lt$lt');
--enable_query_log
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
# testing p0, p1, p3, p6(1)
--echo # truncating p0 to simulate an empty datafile (not recovered!)
@@ -177,8 +177,8 @@ OPTIMIZE TABLE t1_will_crash;
CHECK TABLE t1_will_crash;
REPAIR TABLE t1_will_crash;
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
# testing p2, p4, p6(2, 3)
@@ -215,9 +215,9 @@ FLUSH TABLES;
#ALTER TABLE t1_will_crash OPTIMIZE PARTITION p6;
ALTER TABLE t1_will_crash CHECK PARTITION p6;
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
FLUSH TABLES;
--echo #
@@ -229,21 +229,21 @@ FLUSH TABLES;
--echo # table, depending if one reads via index or direct on datafile.
--echo # Since crash when reuse of deleted row space, CHECK MEDIUM or EXTENDED
--echo # is required (MEDIUM is default) to verify correct behavior!
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
SET @save_optimizer_switch= @@optimizer_switch;
SET @@optimizer_switch='derived_merge=off';
-SELECT (b % 7) AS partition, b, a FROM (SELECT b,a FROM t1_will_crash) q
+SELECT (b % 7) AS `partition`, b, a FROM (SELECT b,a FROM t1_will_crash) q
WHERE (b % 7) = 6
-ORDER BY partition, b, a;
+ORDER BY `partition`, b, a;
SET @@optimizer_switch=@save_optimizer_switch;
# NOTE: REBUILD PARTITION without CHECK before, 2 + (1) records will be lost!
#ALTER TABLE t1_will_crash REBUILD PARTITION p6;
ALTER TABLE t1_will_crash CHECK PARTITION p6;
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS partition, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-SELECT (b % 7) AS partition, b, a, length(c) FROM t1_will_crash ORDER BY partition, b, a;
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
ALTER TABLE t1_will_crash CHECK PARTITION all EXTENDED;
DROP TABLE t1_will_crash;
diff --git a/mysql-test/suite/perfschema/disabled.def b/mysql-test/suite/perfschema/disabled.def
index a72014a652b..888298bbb09 100644
--- a/mysql-test/suite/perfschema/disabled.def
+++ b/mysql-test/suite/perfschema/disabled.def
@@ -9,41 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-ddl_host_cache:
-dml_host_cache:
-hostcache_ipv4_addrinfo_again_allow:
-hostcache_ipv4_addrinfo_again_deny:
-hostcache_ipv4_addrinfo_bad_allow:
-hostcache_ipv4_addrinfo_bad_deny:
-hostcache_ipv4_addrinfo_good_allow:
-hostcache_ipv4_addrinfo_good_deny:
-hostcache_ipv4_addrinfo_noname_allow:
-hostcache_ipv4_addrinfo_noname_deny:
-hostcache_ipv4_auth_plugin:
-hostcache_ipv4_blocked:
-hostcache_ipv4_format:
-hostcache_ipv4_max_con:
-hostcache_ipv4_nameinfo_again_allow:
-hostcache_ipv4_nameinfo_again_deny:
-hostcache_ipv4_nameinfo_noname_allow:
-hostcache_ipv4_nameinfo_noname_deny:
-hostcache_ipv4_passwd:
-hostcache_ipv4_ssl:
-hostcache_ipv6_addrinfo_again_allow:
-hostcache_ipv6_addrinfo_again_deny:
-hostcache_ipv6_addrinfo_bad_allow:
-hostcache_ipv6_addrinfo_bad_deny:
-hostcache_ipv6_addrinfo_good_allow:
-hostcache_ipv6_addrinfo_good_deny:
-hostcache_ipv6_addrinfo_noname_allow:
-hostcache_ipv6_addrinfo_noname_deny:
-hostcache_ipv6_auth_plugin:
-hostcache_ipv6_blocked:
-hostcache_ipv6_max_con:
-hostcache_ipv6_nameinfo_again_allow:
-hostcache_ipv6_nameinfo_again_deny:
-hostcache_ipv6_nameinfo_noname_allow:
-hostcache_ipv6_nameinfo_noname_deny:
-hostcache_ipv6_passwd:
-hostcache_ipv6_ssl:
-hostcache_peer_addr:
diff --git a/mysql-test/suite/perfschema/include/connection_load.inc b/mysql-test/suite/perfschema/include/connection_load.inc
index 16fc136f842..02c8e2adbe1 100644
--- a/mysql-test/suite/perfschema/include/connection_load.inc
+++ b/mysql-test/suite/perfschema/include/connection_load.inc
@@ -186,10 +186,45 @@ call dump_all();
--connection default
--disconnect con4a
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 5 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+--source include/wait_condition.inc
+
--disconnect con4b
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 4 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+--source include/wait_condition.inc
+
--disconnect con4c
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 3 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+--source include/wait_condition.inc
+
--disconnect con5a
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 2 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+--source include/wait_condition.inc
+
--disconnect con5b
+
+# Wait for the disconnect to complete
+let $wait_condition=
+ select count(*) = 1 from performance_schema.threads
+ where `TYPE`='FOREGROUND' and PROCESSLIST_USER like 'user%';
+--source include/wait_condition.inc
+
--disconnect con5c
# Wait for the disconnect to complete
diff --git a/mysql-test/suite/perfschema/include/digest_cleanup.inc b/mysql-test/suite/perfschema/include/digest_cleanup.inc
index 99dc41e660f..47dd7618b43 100644
--- a/mysql-test/suite/perfschema/include/digest_cleanup.inc
+++ b/mysql-test/suite/perfschema/include/digest_cleanup.inc
@@ -7,5 +7,8 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
--enable_warnings
diff --git a/mysql-test/suite/perfschema/include/digest_execution.inc b/mysql-test/suite/perfschema/include/digest_execution.inc
index 34c49590217..5483cca61d7 100644
--- a/mysql-test/suite/perfschema/include/digest_execution.inc
+++ b/mysql-test/suite/perfschema/include/digest_execution.inc
@@ -34,6 +34,19 @@ INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
# -----------------------------------------------------------------------
+# Test case to handle NULL. If alone, not normalized otherwise normalized.
+# -----------------------------------------------------------------------
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
+
+# -----------------------------------------------------------------------
# Test case for handling spaces in statement.
# -----------------------------------------------------------------------
@@ -59,7 +72,6 @@ SELECT 1 /* This is an inline comment */ + 1;
*/
1;
-
# -----------------------------------------------------------------------
# Tests to show how the digest behaves with tokens that can have multiple
# names (such as DATABASE = "DATABASE" or "SCHEMA", SUBSTRING, STD_SYM,
@@ -79,8 +91,40 @@ DROP DATABASE statements_digest_temp;
# captured.
# -----------------------------------------------------------------------
--ERROR ER_NO_SUCH_TABLE
-SELECT 1 from t11;
-create table t11 (c char(4));
+SELECT 1 FROM no_such_table;
+CREATE TABLE dup_table (c char(4));
--ERROR ER_TABLE_EXISTS_ERROR
-create table t11 (c char(4));
-insert into t11 values("MySQL");
+CREATE TABLE dup_table (c char(4));
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
+
+# -----------------------------------------------------------------------
+# Tests to show sub-statements for following statements are not
+# instrumented.
+# - Prepared Statements
+# - Stored Procedures/Functions.
+# - Table Triggers
+# -----------------------------------------------------------------------
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+DELIMITER //;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+DELIMITER ;//
+CALL p1();
+CALL p1();
+DROP PROCEDURE p1;
+
+DELIMITER //;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+DELIMITER ;//
+select func(3,4);
+select func(13,42);
+DROP FUNCTION func;
+
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
diff --git a/mysql-test/suite/perfschema/include/digest_setup.inc b/mysql-test/suite/perfschema/include/digest_setup.inc
index 7145bcfa870..ed463f58d04 100644
--- a/mysql-test/suite/perfschema/include/digest_setup.inc
+++ b/mysql-test/suite/perfschema/include/digest_setup.inc
@@ -17,5 +17,8 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
--enable_warnings
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_load.inc b/mysql-test/suite/perfschema/include/event_aggregate_load.inc
index 75069f4b603..4a1b3f02c03 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_load.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_load.inc
@@ -80,6 +80,12 @@ 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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -148,6 +154,12 @@ 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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -212,6 +224,12 @@ 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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -276,6 +294,12 @@ echo "================== con4 marker ==================";
--connection default
+# Wait for the payload to complete
+let $wait_condition=
+ select count(*) = 4 from performance_schema.events_waits_current
+ where EVENT_NAME= 'idle';
+--source include/wait_condition.inc
+
echo "================== Step 9 ==================";
call dump_thread();
execute dump_waits_account;
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
index 47488403c1f..a0103649c09 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
@@ -111,7 +111,8 @@ 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/rwlock/sql/LOCK_grant',
- 'wait/io/file/sql/query_log');
+ 'wait/io/file/sql/query_log',
+ 'idle');
update performance_schema.setup_instruments set enabled='YES', timed='YES'
where name in ('stage/sql/init',
diff --git a/mysql-test/suite/perfschema/include/hostcache_set_state.inc b/mysql-test/suite/perfschema/include/hostcache_set_state.inc
new file mode 100644
index 00000000000..25dd56a4e0d
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/hostcache_set_state.inc
@@ -0,0 +1,23 @@
+# Helper for hostcache_*.test
+
+# Set a known initial state for the test
+
+flush status;
+flush hosts;
+flush user_resources;
+flush privileges;
+
+# Print critical setup
+
+select @@global.debug;
+select @@global.max_connect_errors;
+select @@global.max_user_connections;
+select @@global.max_connections;
+
+# Make sure there are no remaining records that can change the test outcome
+
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+
diff --git a/mysql-test/suite/perfschema/include/schema.inc b/mysql-test/suite/perfschema/include/schema.inc
index 6c3c391c171..f5f23893d37 100644
--- a/mysql-test/suite/perfschema/include/schema.inc
+++ b/mysql-test/suite/perfschema/include/schema.inc
@@ -21,6 +21,7 @@ show create table events_stages_summary_global_by_event_name;
show create table events_statements_current;
show create table events_statements_history;
show create table events_statements_history_long;
+show create table events_statements_summary_by_digest;
show create table events_statements_summary_by_host_by_event_name;
show create table events_statements_summary_by_thread_by_event_name;
show create table events_statements_summary_by_user_by_event_name;
@@ -38,7 +39,6 @@ show create table events_waits_summary_global_by_event_name;
show create table file_instances;
show create table file_summary_by_event_name;
show create table file_summary_by_instance;
---error 1146
show create table host_cache;
show create table hosts;
show create table mutex_instances;
diff --git a/mysql-test/suite/perfschema/include/sizing_auto.inc b/mysql-test/suite/perfschema/include/sizing_auto.inc
new file mode 100644
index 00000000000..1a9afeaf219
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/sizing_auto.inc
@@ -0,0 +1,16 @@
+
+show variables like "table_definition_cache";
+show variables like "table_open_cache";
+show variables like "max_connections";
+# Results vary by platform:
+# show variables like "open_files_limit";
+show variables 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.
+
+show engine performance_schema status;
+
diff --git a/mysql-test/suite/perfschema/include/start_server_common.inc b/mysql-test/suite/perfschema/include/start_server_common.inc
index 6a7c7698999..d15c3d48ded 100644
--- a/mysql-test/suite/perfschema/include/start_server_common.inc
+++ b/mysql-test/suite/perfschema/include/start_server_common.inc
@@ -27,6 +27,7 @@ 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;
@@ -43,21 +44,22 @@ 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;
---error 1146
select * from performance_schema.host_cache;
-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.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_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;
diff --git a/mysql-test/suite/perfschema/include/table_aggregate_load.inc b/mysql-test/suite/perfschema/include/table_aggregate_load.inc
index b72220c58bd..242768ead9e 100644
--- a/mysql-test/suite/perfschema/include/table_aggregate_load.inc
+++ b/mysql-test/suite/perfschema/include/table_aggregate_load.inc
@@ -48,17 +48,10 @@ execute dump_objects_summary;
#
connect (con1, localhost, user1, , );
-
-echo "================== con1 connected ==================";
+select concat(current_user(), " is connected") as status;
--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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -116,17 +109,10 @@ execute dump_objects_summary;
# select PROCESSLIST_USER, PROCESSLIST_HOST, INSTRUMENTED from performance_schema.threads;
connect (con2, localhost, user2, , );
-
-echo "================== con2 connected ==================";
+select concat(current_user(), " is connected") as status;
--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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -180,17 +166,10 @@ execute dump_waits_table_lock;
execute dump_objects_summary;
connect (con3, localhost, user3, , );
-
-echo "================== con3 connected ==================";
+select concat(current_user(), " is connected") as status;
--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 ==================";
call dump_thread();
execute dump_waits_account;
@@ -244,17 +223,10 @@ execute dump_waits_table_lock;
execute dump_objects_summary;
connect (con4, localhost, user4, , );
-
-echo "================== con4 connected ==================";
+select concat(current_user(), " is connected") as status;
--connection default
-# Wait for the connect to complete
-let $wait_condition=
- select count(*) = 1 from performance_schema.threads
- where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';
---source include/wait_condition.inc
-
echo "================== Step 8 ==================";
call dump_thread();
execute dump_waits_account;
diff --git a/mysql-test/suite/perfschema/r/binlog_stmt.result b/mysql-test/suite/perfschema/r/binlog_stmt.result
index 319e688f3ef..b2993e454da 100644
--- a/mysql-test/suite/perfschema/r/binlog_stmt.result
+++ b/mysql-test/suite/perfschema/r/binlog_stmt.result
@@ -7,8 +7,6 @@ count(*) > 0
update performance_schema.setup_instruments set enabled='NO'
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
-Warnings:
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
select count(*) > 0 from performance_schema.events_waits_current;
count(*) > 0
1
@@ -20,28 +18,19 @@ insert into test.t1
select thread_id from performance_schema.events_waits_current;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
insert into test.t2
select name from performance_schema.setup_instruments
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
drop table test.t1;
drop table test.t2;
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
-Warnings:
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
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 `test`; update performance_schema.setup_instruments set enabled='NO'
- where name like "wait/synch/rwlock/sql/%"
- and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
-master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
@@ -64,8 +53,3 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
-master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='YES'
- where name like "wait/synch/rwlock/sql/%"
- and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
-master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/perfschema/r/csv_table_io.result b/mysql-test/suite/perfschema/r/csv_table_io.result
index d5b39a2d90c..f0b5a6bb935 100644
--- a/mysql-test/suite/perfschema/r/csv_table_io.result
+++ b/mysql-test/suite/perfschema/r/csv_table_io.result
@@ -126,6 +126,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/ddl_session_account_connect_attrs.result b/mysql-test/suite/perfschema/r/ddl_session_account_connect_attrs.result
new file mode 100644
index 00000000000..9d8c7212f43
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_session_account_connect_attrs.result
@@ -0,0 +1,9 @@
+ALTER TABLE performance_schema.session_account_connect_attrs
+ADD COLUMN foo INTEGER;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.session_account_connect_attrs;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.session_account_connect_attrs ADD INDEX test_index(ATTR_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.session_account_connect_attrs(ATTR_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_session_connect_attrs.result b/mysql-test/suite/perfschema/r/ddl_session_connect_attrs.result
new file mode 100644
index 00000000000..3177d493963
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_session_connect_attrs.result
@@ -0,0 +1,9 @@
+ALTER TABLE performance_schema.session_connect_attrs
+ADD COLUMN foo INTEGER;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+TRUNCATE TABLE performance_schema.session_connect_attrs;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.session_connect_attrs ADD INDEX test_index(ATTR_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.session_connect_attrs(ATTR_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 695c600842c..e95f9f5f73b 100644
--- a/mysql-test/suite/perfschema/r/digest_table_full.result
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result
@@ -8,6 +8,9 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
####################################
# EXECUTION
@@ -35,6 +38,15 @@ INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT 1 + 1;
1 + 1
2
@@ -61,22 +73,47 @@ CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
-SELECT 1 from t11;
-ERROR 42S02: Table 'statements_digest.t11' doesn't exist
-create table t11 (c char(4));
-create table t11 (c char(4));
-ERROR 42S01: Table 't11' already exists
-insert into t11 values("MySQL");
+SELECT 1 FROM no_such_table;
+ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
+CREATE TABLE dup_table (c char(4));
+CREATE TABLE dup_table (c char(4));
+ERROR 42S01: Table 'dup_table' already exists
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+c
+EXECUTE stmt;
+c
+DEALLOCATE PREPARE stmt;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+CALL p1();
+c
+CALL p1();
+c
+DROP PROCEDURE p1;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+select func(3,4);
+func(3,4)
+7
+select func(13,42);
+func(13,42)
+55
+DROP FUNCTION func;
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
-DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
-NULL NULL 29 21 1 2
-025af09b416617ee444962d35913c0ab TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+NULL NULL NULL 55 32 1 2
+statements_digest 172976feb9113e0dc6aa2bbac59a41d7 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
SHOW VARIABLES LIKE "performance_schema_digests_size";
Variable_name Value
performance_schema_digests_size 2
@@ -91,4 +128,7 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_digest.result b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
index 032c19112e1..f831b4c2e86 100644
--- a/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
@@ -1,9 +1,9 @@
select * from performance_schema.events_statements_summary_by_digest
where digest like 'XXYYZZ%' limit 1;
-DIGEST DIGEST_TEXT 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 FIRST_SEEN LAST_SEEN
+SCHEMA_NAME DIGEST DIGEST_TEXT 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 FIRST_SEEN LAST_SEEN
select * from performance_schema.events_statements_summary_by_digest
where digest='XXYYZZ';
-DIGEST DIGEST_TEXT 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 FIRST_SEEN LAST_SEEN
+SCHEMA_NAME DIGEST DIGEST_TEXT 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 FIRST_SEEN LAST_SEEN
insert into performance_schema.events_statements_summary_by_digest
set digest='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
avg_timer_wait=4, max_timer_wait=5;
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
index 41ffa18799f..2a1cc7035af 100644
--- a/mysql-test/suite/perfschema/r/dml_handler.result
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -9,60 +9,69 @@ SELECT COUNT(*) FROM table_list INTO @table_count;
# 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=49;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=52;
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=48;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=51;
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=47;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=50;
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=46;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=49;
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=45;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=48;
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=44;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=47;
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=43;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=46;
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=42;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=45;
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=41;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=44;
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=40;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=43;
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=39;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=42;
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=38;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=41;
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=37;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=40;
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=36;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=39;
+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;
+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;
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=35;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=36;
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=34;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=35;
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=33;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=34;
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=32;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=33;
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=32;
+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=31;
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
diff --git a/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result b/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result
new file mode 100644
index 00000000000..61b1cddd513
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_session_account_connect_attrs.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.session_account_connect_attrs
+LIMIT 1;
+SELECT * FROM performance_schema.session_account_connect_attrs
+where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
+INSERT INTO performance_schema.session_account_connect_attrs
+SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
+ORDINAL_POSITION=100, PROCESS_ID=102;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+UPDATE performance_schema.session_account_connect_attrs
+SET ATTR_NAME='FOO';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+UPDATE performance_schema.session_account_connect_attrs
+SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+DELETE FROM performance_schema.session_account_connect_attrs
+WHERE ATTR_VALUE='BAR';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+DELETE FROM performance_schema.session_account_connect_attrs;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+LOCK TABLES performance_schema.session_account_connect_attrs READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.session_account_connect_attrs WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_account_connect_attrs'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result b/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result
new file mode 100644
index 00000000000..d1dea1472d4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_session_connect_attrs.result
@@ -0,0 +1,25 @@
+SELECT * FROM performance_schema.session_connect_attrs
+LIMIT 1;
+SELECT * FROM performance_schema.session_connect_attrs
+where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
+INSERT INTO performance_schema.session_connect_attrs
+SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
+ORDINAL_POSITION=100, PROCESS_ID=102;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+UPDATE performance_schema.session_connect_attrs
+SET ATTR_NAME='FOO';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+UPDATE performance_schema.session_connect_attrs
+SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+DELETE FROM performance_schema.session_connect_attrs
+WHERE ATTR_VALUE='BAR';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+DELETE FROM performance_schema.session_connect_attrs;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+LOCK TABLES performance_schema.session_connect_attrs READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.session_connect_attrs WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'session_connect_attrs'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 0632e6c94bc..ffe7699bef8 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -72,3 +72,9 @@ 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();
diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result
index d925463a8c2..a71c8e601aa 100644
--- a/mysql-test/suite/perfschema/r/func_file_io.result
+++ b/mysql-test/suite/perfschema/r/func_file_io.result
@@ -144,6 +144,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/func_mutex.result b/mysql-test/suite/perfschema/r/func_mutex.result
index 657f45d70e9..9f86ba49d39 100644
--- a/mysql-test/suite/perfschema/r/func_mutex.result
+++ b/mysql-test/suite/perfschema/r/func_mutex.result
@@ -119,6 +119,7 @@ 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
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 d2e99912200..ffe3dc2e0eb 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'192.0.2.4';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
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 39057797b76..08f280f30a9 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 7bddddb44a2..7c658e17c55 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'192.0.2.4';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
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 4bb67d51eb7..924b66cf726 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 dd69ff95ccd..5657887e439 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 1443c9708a6..1846dbe0719 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 a67937e32b2..115af4792c3 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
grant select on test.* to 'root'@'192.0.2.4';
select "Con1 is alive";
@@ -12,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -85,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
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 0ec0b833d0e..618bcea553d 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv4.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 4e1cbacf228..553cd609b4d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -1,8 +1,27 @@
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
CREATE USER 'plug'@'santa.claus.ipv4.example.com'
IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
@@ -14,7 +33,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
"Dumping performance_schema.host_cache"
@@ -177,4 +196,4 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
FROM 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index 8e378e52bf5..88c7c2fbd3d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -1,12 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
select @@global.max_connect_errors;
@@global.max_connect_errors
-10
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select @@global.max_connect_errors into @saved_max_connect_errors;
set global max_connect_errors = 2;
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
@@ -16,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv4.example.com' (using password: NO)
"Dumping performance_schema.host_cache"
IP 192.0.2.4
@@ -195,4 +210,4 @@ LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
set global max_connect_errors = @saved_max_connect_errors;
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
index 5389dd43d11..baf9eae9f5c 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -1,17 +1,36 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 069fac2ddb8..31e4bc9f843 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -1,16 +1,29 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
select @@global.max_user_connections;
@@global.max_user_connections
-0
+1024
select @@global.max_connections;
@@global.max_connections
151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select @@global.max_connections into @saved_max_connections;
+select @@global.max_user_connections into @saved_max_user_connections;
create user 'quota'@'santa.claus.ipv4.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
@@ -21,7 +34,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
select "Con2a is alive";
Con2a is alive
Con2a is alive
@@ -641,5 +654,6 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global max_connections = @saved_max_connections;
+set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 c2163a2d5b1..6531f7e69f0 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'192.0.2.4';
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
select "Con1 is alive";
@@ -12,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -81,7 +100,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
select "Con4 is alive";
Con4 is alive
Con4 is alive
@@ -154,4 +173,4 @@ revoke select on test.* from 'root'@'192.0.2.4';
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 048081756bb..2976f8c9e16 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,8 +88,8 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -99,7 +118,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -128,4 +147,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 85a825f3907..315f90ce3e5 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'192.0.2.4';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
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 6bb381888f9..f27bda9ada1 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+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
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
index a7d34ede333..69f68de8d90 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -1,9 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
create user 'user_without'@'santa.claus.ipv4.example.com';
create user 'user_with'@'santa.claus.ipv4.example.com'
identified by 'good_password';
@@ -15,7 +33,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+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)
"Dumping performance_schema.host_cache"
IP 192.0.2.4
@@ -192,4 +210,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
drop user 'user_with'@'santa.claus.ipv4.example.com';
drop user 'user_without'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
index e6e5b99392f..a3d2b1d273f 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -1,9 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
create user 'user_ssl'@'santa.claus.ipv4.example.com';
create user 'user_ssl_x509'@'santa.claus.ipv4.example.com'
identified by 'good_password';
@@ -19,7 +37,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+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)
"Dumping performance_schema.host_cache"
IP 192.0.2.4
@@ -138,4 +156,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
drop user 'user_ssl'@'santa.claus.ipv4.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 599fcfe9130..59a12495352 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'2001:db8::6:6';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
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 d6b579fcb57..d241bede905 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 2a41f269159..904139875c6 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'2001:db8::6:6';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
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 786936acc20..b14fb2f955e 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 b0269234e11..f5b2f43ab91 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("192.0.2.4");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 9bef9efb93c..b88bb94343f 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
@@ -1,16 +1,35 @@
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -39,7 +58,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -68,4 +87,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 432a0b4eaaf..9cc8a675fcc 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
grant select on test.* to 'root'@'2001:db8::6:6';
select "Con1 is alive";
@@ -12,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -85,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
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 ea5c6e357ef..73741cf42ed 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("santa.claus.ipv6.example.com");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 61fd1573067..b0764faf525 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -1,8 +1,27 @@
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
CREATE USER 'plug'@'santa.claus.ipv6.example.com'
IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
CREATE USER 'plug_dest'@'santa.claus.ipv6.example.com'
@@ -14,7 +33,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
"Dumping performance_schema.host_cache"
@@ -177,4 +196,4 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
FROM 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index 07121b6031f..0097c680c70 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -1,12 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
select @@global.max_connect_errors;
@@global.max_connect_errors
-10
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select @@global.max_connect_errors into @saved_max_connect_errors;
set global max_connect_errors = 2;
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
@@ -16,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv6.example.com' (using password: NO)
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
@@ -195,4 +210,4 @@ LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
set global max_connect_errors = @saved_max_connect_errors;
-set global debug= default;
+set global debug_dbug= default;
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 3bf09f19843..4416b78d009 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -1,16 +1,29 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
select @@global.max_user_connections;
@@global.max_user_connections
-0
+1024
select @@global.max_connections;
@@global.max_connections
151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select @@global.max_connections into @saved_max_connections;
+select @@global.max_user_connections into @saved_max_user_connections;
create user 'quota'@'santa.claus.ipv6.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
@@ -21,7 +34,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
select "Con2a is alive";
Con2a is alive
Con2a is alive
@@ -641,5 +654,6 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global max_connections = @saved_max_connections;
+set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 755f5b2037d..a2107324c65 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("2001:db8::6:6");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
select "Con1 is alive";
@@ -12,7 +31,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -81,7 +100,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
select "Con4 is alive";
Con4 is alive
Con4 is alive
@@ -154,4 +173,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6';
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
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 da240b24ca6..373ed10677a 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("2001:db8::6:6");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -69,8 +88,8 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= "+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 MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -99,7 +118,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -128,4 +147,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
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 8a4dee22aa2..809644cbe08 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
@@ -1,9 +1,28 @@
call mtr.add_suppression("2001:db8::6:6");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
grant select on test.* to 'root'@'2001:db8::6:6';
select "Con1 is alive";
Con1 is alive
@@ -11,7 +30,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
select "Con2 is alive";
Con2 is alive
Con2 is alive
@@ -82,4 +101,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
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 63b8a33b8bf..32a06e8105f 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
@@ -1,17 +1,36 @@
call mtr.add_suppression("2001:db8::6:6");
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+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
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -40,7 +59,7 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -69,4 +88,4 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
index 5d67dc8d943..5c3b363c5cd 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -1,9 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
create user 'user_without'@'santa.claus.ipv6.example.com';
create user 'user_with'@'santa.claus.ipv6.example.com'
identified by 'good_password';
@@ -15,7 +33,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+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)
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
@@ -192,4 +210,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
drop user 'user_with'@'santa.claus.ipv6.example.com';
drop user 'user_without'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
index 29c151d24c1..422db77b5ae 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -1,9 +1,27 @@
flush status;
flush hosts;
flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
create user 'user_ssl'@'santa.claus.ipv6.example.com';
create user 'user_ssl_x509'@'santa.claus.ipv6.example.com'
identified by 'good_password';
@@ -19,7 +37,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+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)
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
@@ -138,4 +156,4 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
drop user 'user_ssl'@'santa.claus.ipv6.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
index 0eff14b50f0..70618be6145 100644
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -1,8 +1,27 @@
flush status;
flush hosts;
+flush user_resources;
+flush privileges;
select @@global.debug;
@@global.debug
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+100
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select `User`, `Host` from mysql.`user` where `host` like '%\\%%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '192.%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like '2001:%';
+User Host
+select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
+User Host
show global status like "connection_errors_%";
Variable_name Value
Connection_errors_accept 0
@@ -17,7 +36,7 @@ Con1 is alive
select current_user();
current_user()
root@localhost
-set global debug= "+d,vio_peer_addr_error";
+set global debug_dbug= "+d,vio_peer_addr_error";
ERROR HY000: Can't get hostname for your address
show global status like "connection_errors_%";
Variable_name Value
@@ -38,7 +57,7 @@ Connection_errors_peer_address 2
Connection_errors_select 0
Connection_errors_tcpwrap 0
"Dumping performance_schema.host_cache"
-set global debug= default;
+set global debug_dbug= default;
flush status;
show global status like "connection_errors_%";
Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/indexed_table_io.result b/mysql-test/suite/perfschema/r/indexed_table_io.result
index 6b420323b74..57518673491 100644
--- a/mysql-test/suite/perfschema/r/indexed_table_io.result
+++ b/mysql-test/suite/perfschema/r/indexed_table_io.result
@@ -139,6 +139,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/information_schema.result b/mysql-test/suite/perfschema/r/information_schema.result
index 8497f7ea40d..5e5ce57fb2e 100644
--- a/mysql-test/suite/perfschema/r/information_schema.result
+++ b/mysql-test/suite/perfschema/r/information_schema.result
@@ -33,11 +33,14 @@ 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 host_cache def
performance_schema hosts def
performance_schema mutex_instances def
performance_schema objects_summary_global_by_type def
performance_schema performance_timers def
performance_schema rwlock_instances def
+performance_schema session_account_connect_attrs def
+performance_schema session_connect_attrs def
performance_schema setup_actors def
performance_schema setup_consumers def
performance_schema setup_instruments def
@@ -86,11 +89,14 @@ 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
+host_cache BASE TABLE PERFORMANCE_SCHEMA
hosts 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
rwlock_instances BASE TABLE PERFORMANCE_SCHEMA
+session_account_connect_attrs BASE TABLE PERFORMANCE_SCHEMA
+session_connect_attrs BASE TABLE PERFORMANCE_SCHEMA
setup_actors BASE TABLE PERFORMANCE_SCHEMA
setup_consumers BASE TABLE PERFORMANCE_SCHEMA
setup_instruments BASE TABLE PERFORMANCE_SCHEMA
@@ -139,11 +145,14 @@ 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
+host_cache 10 Dynamic
hosts 10 Fixed
mutex_instances 10 Dynamic
objects_summary_global_by_type 10 Dynamic
performance_timers 10 Fixed
rwlock_instances 10 Dynamic
+session_account_connect_attrs 10 Dynamic
+session_connect_attrs 10 Dynamic
setup_actors 10 Fixed
setup_consumers 10 Dynamic
setup_instruments 10 Dynamic
@@ -192,11 +201,14 @@ 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
+host_cache 1000 0
hosts 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
@@ -245,11 +257,14 @@ 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
+host_cache 0 0
hosts 0 0
mutex_instances 0 0
objects_summary_global_by_type 0 0
performance_timers 0 0
rwlock_instances 0 0
+session_account_connect_attrs 0 0
+session_connect_attrs 0 0
setup_actors 0 0
setup_consumers 0 0
setup_instruments 0 0
@@ -298,11 +313,14 @@ 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
+host_cache 0 0 NULL
hosts 0 0 NULL
mutex_instances 0 0 NULL
objects_summary_global_by_type 0 0 NULL
performance_timers 0 0 NULL
rwlock_instances 0 0 NULL
+session_account_connect_attrs 0 0 NULL
+session_connect_attrs 0 0 NULL
setup_actors 0 0 NULL
setup_consumers 0 0 NULL
setup_instruments 0 0 NULL
@@ -351,11 +369,14 @@ 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
+host_cache NULL NULL NULL
hosts NULL NULL NULL
mutex_instances NULL NULL NULL
objects_summary_global_by_type NULL NULL NULL
performance_timers NULL NULL NULL
rwlock_instances NULL NULL NULL
+session_account_connect_attrs NULL NULL NULL
+session_connect_attrs NULL NULL NULL
setup_actors NULL NULL NULL
setup_consumers NULL NULL NULL
setup_instruments NULL NULL NULL
@@ -404,11 +425,14 @@ 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
+host_cache utf8_general_ci NULL
hosts 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
rwlock_instances utf8_general_ci NULL
+session_account_connect_attrs utf8_bin NULL
+session_connect_attrs utf8_bin NULL
setup_actors utf8_general_ci NULL
setup_consumers utf8_general_ci NULL
setup_instruments utf8_general_ci NULL
@@ -457,11 +481,14 @@ events_waits_summary_global_by_event_name
file_instances
file_summary_by_event_name
file_summary_by_instance
+host_cache
hosts
mutex_instances
objects_summary_global_by_type
performance_timers
rwlock_instances
+session_account_connect_attrs
+session_connect_attrs
setup_actors
setup_consumers
setup_instruments
diff --git a/mysql-test/suite/perfschema/r/innodb_table_io.result b/mysql-test/suite/perfschema/r/innodb_table_io.result
index d6dd7e3b122..9b5bd783f88 100644
--- a/mysql-test/suite/perfschema/r/innodb_table_io.result
+++ b/mysql-test/suite/perfschema/r/innodb_table_io.result
@@ -130,6 +130,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/memory_table_io.result b/mysql-test/suite/perfschema/r/memory_table_io.result
index 8d314d52ec3..230de713846 100644
--- a/mysql-test/suite/perfschema/r/memory_table_io.result
+++ b/mysql-test/suite/perfschema/r/memory_table_io.result
@@ -128,6 +128,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/merge_table_io.result b/mysql-test/suite/perfschema/r/merge_table_io.result
index 8d93d3798a4..7f0b602778c 100644
--- a/mysql-test/suite/perfschema/r/merge_table_io.result
+++ b/mysql-test/suite/perfschema/r/merge_table_io.result
@@ -158,6 +158,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/multi_table_io.result b/mysql-test/suite/perfschema/r/multi_table_io.result
index b72cc6b164f..74c8b94c1d5 100644
--- a/mysql-test/suite/perfschema/r/multi_table_io.result
+++ b/mysql-test/suite/perfschema/r/multi_table_io.result
@@ -87,6 +87,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/myisam_file_io.result b/mysql-test/suite/perfschema/r/myisam_file_io.result
index b433d1391b7..826c4563932 100644
--- a/mysql-test/suite/perfschema/r/myisam_file_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_file_io.result
@@ -57,6 +57,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/myisam_table_io.result b/mysql-test/suite/perfschema/r/myisam_table_io.result
index 517252a9dd6..432e5964802 100644
--- a/mysql-test/suite/perfschema/r/myisam_table_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result
@@ -126,6 +126,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index cac92025a97..9f449fc3739 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -55,6 +55,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 0498fbca25f..8c8cb918025 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -120,6 +120,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -138,6 +139,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/part_table_io.result b/mysql-test/suite/perfschema/r/part_table_io.result
index 1fa91e82ae0..2aa12851679 100644
--- a/mysql-test/suite/perfschema/r/part_table_io.result
+++ b/mysql-test/suite/perfschema/r/part_table_io.result
@@ -77,70 +77,40 @@ 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 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 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 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 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 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 update 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 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 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 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 update 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 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 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 no_index_tab delete 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 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 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 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 like 'performance_schema_%';
@@ -158,6 +128,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade.result b/mysql-test/suite/perfschema/r/pfs_upgrade.result
deleted file mode 100644
index 9a2b6524c83..00000000000
--- a/mysql-test/suite/perfschema/r/pfs_upgrade.result
+++ /dev/null
@@ -1,303 +0,0 @@
-drop table if exists test.user_table;
-drop procedure if exists test.user_proc;
-drop function if exists test.user_func;
-drop event if exists test.user_event;
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
-create table test.user_table(a int);
-use performance_schema;
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'threads' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
-ERROR 1050 (42S01) at line ###: Table 'users' already exists
-ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
-FATAL ERROR: Upgrade failed
-show tables like "user_table";
-Tables_in_performance_schema (user_table)
-user_table
-use test;
-drop table test.user_table;
-"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";
-Tables_in_performance_schema (user_view)
-user_view
-ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'threads' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
-ERROR 1050 (42S01) at line ###: Table 'users' already exists
-ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
-FATAL ERROR: Upgrade failed
-show tables like "user_view";
-Tables_in_performance_schema (user_view)
-user_view
-use test;
-drop view test.user_view;
-"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';
-ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'threads' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
-ERROR 1050 (42S01) at line ###: Table 'users' already exists
-ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_proc
-update mysql.proc set db='test' where name='user_proc';
-drop procedure test.user_proc;
-"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';
-ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'threads' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
-ERROR 1050 (42S01) at line ###: Table 'users' already exists
-ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
-FATAL ERROR: Upgrade failed
-select name from mysql.proc where db='performance_schema';
-name
-user_func
-update mysql.proc set db='test' where name='user_func';
-drop function test.user_func;
-"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";
-update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
-ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line ###: Table 'threads' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
-ERROR 1050 (42S01) at line ###: Table 'users' already exists
-ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
-ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
-FATAL ERROR: Upgrade failed
-select name from mysql.event where db='performance_schema';
-name
-user_event
-update mysql.event set db='test' where name='user_event';
-drop event test.user_event;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
new file mode 100644
index 00000000000..cbd684a6232
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
@@ -0,0 +1,63 @@
+drop event if exists test.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";
+update mysql.event set db='performance_schema' where name='user_event';
+ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'threads' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
+ERROR 1050 (42S01) at line ###: Table 'users' already exists
+ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
+FATAL ERROR: Upgrade failed
+select name from mysql.event where db='performance_schema';
+name
+user_event
+update mysql.event set db='test' where name='user_event';
+drop event test.user_event;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
new file mode 100644
index 00000000000..6978e1ed0a8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
@@ -0,0 +1,63 @@
+drop function if exists test.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';
+ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'threads' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
+ERROR 1050 (42S01) at line ###: Table 'users' already exists
+ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
+FATAL ERROR: Upgrade failed
+select name from mysql.proc where db='performance_schema';
+name
+user_func
+update mysql.proc set db='test' where name='user_func';
+drop function test.user_func;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
new file mode 100644
index 00000000000..f5a13fb445d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
@@ -0,0 +1,63 @@
+drop procedure if exists test.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';
+ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'threads' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
+ERROR 1050 (42S01) at line ###: Table 'users' already exists
+ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
+FATAL ERROR: Upgrade failed
+select name from mysql.proc where db='performance_schema';
+name
+user_proc
+update mysql.proc set db='test' where name='user_proc';
+drop procedure test.user_proc;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
new file mode 100644
index 00000000000..bb5ba7060ae
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
@@ -0,0 +1,65 @@
+drop table if exists test.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";
+Tables_in_performance_schema (user_table)
+user_table
+ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'threads' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
+ERROR 1050 (42S01) at line ###: Table 'users' already exists
+ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
+FATAL ERROR: Upgrade failed
+show tables like "user_table";
+Tables_in_performance_schema (user_table)
+user_table
+use test;
+drop table test.user_table;
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
new file mode 100644
index 00000000000..f9541680b6d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
@@ -0,0 +1,65 @@
+drop view if exists test.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";
+Tables_in_performance_schema (user_view)
+user_view
+ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line ###: Table 'threads' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
+ERROR 1050 (42S01) at line ###: Table 'users' already exists
+ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
+ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
+ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
+FATAL ERROR: Upgrade failed
+show tables like "user_view";
+Tables_in_performance_schema (user_view)
+user_view
+use test;
+drop view test.user_view;
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 3881a2ca6b7..2bc96f21cfc 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -8,7 +8,13 @@ truncate table performance_schema.events_waits_history_long;
flush status;
flush tables;
# We are forced to suppress here the server response.
+optimize table mysql.host;
+optimize table mysql.user;
optimize table mysql.db;
+optimize table mysql.proxies_priv;
+optimize table mysql.tables_priv;
+optimize table mysql.procs_priv;
+optimize table mysql.servers;
update performance_schema.setup_consumers set enabled='YES';
update performance_schema.setup_objects set enabled='YES'
where object_type='TABLE' and object_schema= 'mysql';
@@ -45,6 +51,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -63,6 +70,7 @@ 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
@@ -117,6 +125,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/rollback_table_io.result b/mysql-test/suite/perfschema/r/rollback_table_io.result
index ec1c1b86fb4..f08d11e21d8 100644
--- a/mysql-test/suite/perfschema/r/rollback_table_io.result
+++ b/mysql-test/suite/perfschema/r/rollback_table_io.result
@@ -69,6 +69,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result
index d3b5572c383..050c4461105 100644
--- a/mysql-test/suite/perfschema/r/schema.result
+++ b/mysql-test/suite/perfschema/r/schema.result
@@ -38,11 +38,14 @@ events_waits_summary_global_by_event_name
file_instances
file_summary_by_event_name
file_summary_by_instance
+host_cache
hosts
mutex_instances
objects_summary_global_by_type
performance_timers
rwlock_instances
+session_account_connect_attrs
+session_connect_attrs
setup_actors
setup_consumers
setup_instruments
@@ -73,7 +76,7 @@ cond_instances CREATE TABLE `cond_instances` (
show create table events_stages_current;
Table Create Table
events_stages_current CREATE TABLE `events_stages_current` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -87,7 +90,7 @@ events_stages_current CREATE TABLE `events_stages_current` (
show create table events_stages_history;
Table Create Table
events_stages_history CREATE TABLE `events_stages_history` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -101,7 +104,7 @@ events_stages_history CREATE TABLE `events_stages_history` (
show create table events_stages_history_long;
Table Create Table
events_stages_history_long CREATE TABLE `events_stages_history_long` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -126,7 +129,7 @@ events_stages_summary_by_host_by_event_name CREATE TABLE `events_stages_summary_
show create table events_stages_summary_by_thread_by_event_name;
Table Create Table
events_stages_summary_by_thread_by_event_name CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -170,7 +173,7 @@ events_stages_summary_global_by_event_name CREATE TABLE `events_stages_summary_g
show create table events_statements_current;
Table Create Table
events_statements_current CREATE TABLE `events_statements_current` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -214,7 +217,7 @@ events_statements_current CREATE TABLE `events_statements_current` (
show create table events_statements_history;
Table Create Table
events_statements_history CREATE TABLE `events_statements_history` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -258,7 +261,7 @@ events_statements_history CREATE TABLE `events_statements_history` (
show create table events_statements_history_long;
Table Create Table
events_statements_history_long CREATE TABLE `events_statements_history_long` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -299,6 +302,39 @@ events_statements_history_long CREATE TABLE `events_statements_history_long` (
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
`NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_digest;
+Table Create Table
+events_statements_summary_by_digest CREATE TABLE `events_statements_summary_by_digest` (
+ `SCHEMA_NAME` varchar(64) DEFAULT NULL,
+ `DIGEST` varchar(32) DEFAULT NULL,
+ `DIGEST_TEXT` longtext,
+ `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,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `FIRST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `LAST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_statements_summary_by_host_by_event_name;
Table Create Table
events_statements_summary_by_host_by_event_name CREATE TABLE `events_statements_summary_by_host_by_event_name` (
@@ -332,7 +368,7 @@ events_statements_summary_by_host_by_event_name CREATE TABLE `events_statements_
show create table events_statements_summary_by_thread_by_event_name;
Table Create Table
events_statements_summary_by_thread_by_event_name CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -452,7 +488,7 @@ events_statements_summary_global_by_event_name CREATE TABLE `events_statements_s
show create table events_waits_current;
Table Create Table
events_waits_current CREATE TABLE `events_waits_current` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -475,7 +511,7 @@ events_waits_current CREATE TABLE `events_waits_current` (
show create table events_waits_history;
Table Create Table
events_waits_history CREATE TABLE `events_waits_history` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -498,7 +534,7 @@ events_waits_history CREATE TABLE `events_waits_history` (
show create table events_waits_history_long;
Table Create Table
events_waits_history_long CREATE TABLE `events_waits_history_long` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -543,7 +579,7 @@ events_waits_summary_by_instance CREATE TABLE `events_waits_summary_by_instance`
show create table events_waits_summary_by_thread_by_event_name;
Table Create Table
events_waits_summary_by_thread_by_event_name CREATE TABLE `events_waits_summary_by_thread_by_event_name` (
- `THREAD_ID` int(11) NOT NULL,
+ `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,
@@ -648,7 +684,38 @@ file_summary_by_instance CREATE TABLE `file_summary_by_instance` (
`MAX_TIMER_MISC` bigint(20) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table host_cache;
-ERROR 42S02: Table 'performance_schema.host_cache' doesn't exist
+Table Create Table
+host_cache CREATE TABLE `host_cache` (
+ `IP` varchar(64) NOT NULL,
+ `HOST` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST_VALIDATED` enum('YES','NO') NOT NULL,
+ `SUM_CONNECT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HOST_BLOCKED_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NAMEINFO_TRANSIENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NAMEINFO_PERMANENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_FORMAT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_ADDRINFO_TRANSIENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_ADDRINFO_PERMANENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_FCRDNS_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HOST_ACL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NO_AUTH_PLUGIN_ERRORS` bigint(20) NOT NULL,
+ `COUNT_AUTH_PLUGIN_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HANDSHAKE_ERRORS` bigint(20) NOT NULL,
+ `COUNT_PROXY_USER_ERRORS` bigint(20) NOT NULL,
+ `COUNT_PROXY_USER_ACL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_AUTHENTICATION_ERRORS` bigint(20) NOT NULL,
+ `COUNT_SSL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_MAX_USER_CONNECTIONS_ERRORS` bigint(20) NOT NULL,
+ `COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS` bigint(20) NOT NULL,
+ `COUNT_DEFAULT_DATABASE_ERRORS` bigint(20) NOT NULL,
+ `COUNT_INIT_CONNECT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_LOCAL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_UNKNOWN_ERRORS` bigint(20) NOT NULL,
+ `FIRST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `LAST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `FIRST_ERROR_SEEN` timestamp NULL DEFAULT '0000-00-00 00:00:00',
+ `LAST_ERROR_SEEN` timestamp NULL DEFAULT '0000-00-00 00:00:00'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table hosts;
Table Create Table
hosts CREATE TABLE `hosts` (
@@ -661,7 +728,7 @@ Table Create Table
mutex_instances CREATE TABLE `mutex_instances` (
`NAME` varchar(128) NOT NULL,
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
- `LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
+ `LOCKED_BY_THREAD_ID` bigint(20) unsigned DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table objects_summary_global_by_type;
Table Create Table
@@ -688,7 +755,7 @@ Table Create Table
rwlock_instances CREATE TABLE `rwlock_instances` (
`NAME` varchar(128) NOT NULL,
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
- `WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
+ `WRITE_LOCKED_BY_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
`READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table setup_actors;
@@ -731,7 +798,7 @@ Table Create Table
socket_instances CREATE TABLE `socket_instances` (
`EVENT_NAME` varchar(128) NOT NULL,
`OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
- `THREAD_ID` int(11) DEFAULT NULL,
+ `THREAD_ID` bigint(20) unsigned DEFAULT NULL,
`SOCKET_ID` int(11) NOT NULL,
`IP` varchar(64) NOT NULL,
`PORT` int(11) NOT NULL,
@@ -957,10 +1024,10 @@ table_lock_waits_summary_by_table CREATE TABLE `table_lock_waits_summary_by_tabl
show create table threads;
Table Create Table
threads CREATE TABLE `threads` (
- `THREAD_ID` int(11) NOT NULL,
+ `THREAD_ID` bigint(20) unsigned NOT NULL,
`NAME` varchar(128) NOT NULL,
`TYPE` varchar(10) NOT NULL,
- `PROCESSLIST_ID` int(11) DEFAULT NULL,
+ `PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL,
`PROCESSLIST_USER` varchar(16) DEFAULT NULL,
`PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
`PROCESSLIST_DB` varchar(64) DEFAULT NULL,
@@ -968,7 +1035,7 @@ threads CREATE TABLE `threads` (
`PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
`PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
`PROCESSLIST_INFO` longtext,
- `PARENT_THREAD_ID` int(11) DEFAULT NULL,
+ `PARENT_THREAD_ID` bigint(20) unsigned DEFAULT NULL,
`ROLE` varchar(64) DEFAULT NULL,
`INSTRUMENTED` enum('YES','NO') NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/perfschema/r/short_option_1.result b/mysql-test/suite/perfschema/r/short_option_1.result
index 6004dc96327..d97ece1f67a 100644
--- a/mysql-test/suite/perfschema/r/short_option_1.result
+++ b/mysql-test/suite/perfschema/r/short_option_1.result
@@ -19,6 +19,8 @@ log ON
show variables like 'general_log';
Variable_name Value
general_log ON
+show variables like 'new';
+Variable_name Value
show variables like 'log_warnings';
Variable_name Value
log_warnings 3
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 2bdc2524bbc..2c5a9e9284f 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
@@ -59,7 +59,7 @@ ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
# The statement has the same length like in 3.2 but the error
# message is now different and much longer.
SELECT col2 FROM does_not_exist WHERE col1 A 0;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A 0' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A 0' at line 1
# 3.4 SELECT ending with server sending an error message.
# Statement and error message are a bit longer than in 3.1
# because the table name is longer.
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
index b64d94f406c..20bb91159da 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_table.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -34,4 +34,7 @@ user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/init STATEMENT
user2 stage/sql/Opening tables STATEMENT
+user2 stage/sql/setup STATEMENT
+user2 stage/sql/creating table STATEMENT
+user2 stage/sql/After create STATEMENT
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 bde23fff83e..a04e50083b1 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 94d9efd8beb..61bab26b6b6 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 9b7bebed018..fb4e3adb3bf 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 1a5394e41d5..2ce9fe0f265 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index 0f2019a6e78..319485d1a55 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -115,6 +119,7 @@ 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
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 bd07bab8e2f..bf4bb7568af 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 a210a97a6a6..2b3aefc819b 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 b2c3eedcdea..6e4b90147b4 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 38d6d2750f6..4f6fa9bc5da 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_digests.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_digests.result
@@ -8,6 +8,9 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
####################################
# EXECUTION
@@ -35,6 +38,15 @@ INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT 1 + 1;
1 + 1
2
@@ -61,20 +73,45 @@ CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
-SELECT 1 from t11;
-ERROR 42S02: Table 'statements_digest.t11' doesn't exist
-create table t11 (c char(4));
-create table t11 (c char(4));
-ERROR 42S01: Table 't11' already exists
-insert into t11 values("MySQL");
+SELECT 1 FROM no_such_table;
+ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
+CREATE TABLE dup_table (c char(4));
+CREATE TABLE dup_table (c char(4));
+ERROR 42S01: Table 'dup_table' already exists
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+c
+EXECUTE stmt;
+c
+DEALLOCATE PREPARE stmt;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+CALL p1();
+c
+CALL p1();
+c
+DROP PROCEDURE p1;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+select func(3,4);
+func(3,4)
+7
+select func(13,42);
+func(13,42)
+55
+DROP FUNCTION func;
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
-DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
SHOW VARIABLES LIKE "performance_schema_digests_size";
Variable_name Value
performance_schema_digests_size 0
@@ -89,4 +126,7 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_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 8720de80017..4e093920917 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 f57609092d0..040b3edcb43 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 51dab043968..5b5195ff795 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 870e5524b8c..235174f5b87 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 2a26112e693..3ea5aafaed3 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 397365a9755..355b174bb5b 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 f3557a1cf9e..8e13b3ae51d 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 a65f90977af..3808b799fdb 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 b08fc537dcd..b83dfd1ba4b 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 2d9b36583a5..37e0c755ca9 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 1679fba7ac3..585cc1d5281 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 a8d763afa0c..2f80e999077 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 40f7e9fa1c6..0c1d772434c 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 48093277aac..3b7653cd4f7 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 f918d5a47f1..11113ef5d7d 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 b6be8047d31..6b6546e3155 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 740d4ad74ef..3955e70d6ed 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 6f83d396458..4b037a188bb 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 0
performance_schema_max_table_instances 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
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 667b28dae88..5bb2e9c7ecf 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 e6db3e23483..588e7ef63fa 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 cc3cd9b1ed3..31003b3070a 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 d3b69586def..a6eb3bac16e 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 155ab82c0d4..8906341bc8f 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
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 1a64bb98d65..d669bf50b2f 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
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
diff --git a/mysql-test/suite/perfschema/r/start_server_nothing.result b/mysql-test/suite/perfschema/r/start_server_nothing.result
index 6d81d08d30e..4e6994d670e 100644
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 0
performance_schema_max_table_instances 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
@@ -129,6 +133,7 @@ performance_schema_max_table_handles 0
performance_schema_max_table_instances 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
@@ -158,12 +163,12 @@ events_waits_history_long YES
global_instrumentation YES
thread_instrumentation YES
statements_digest YES
-select * from performance_schema.setup_timers;
-NAME TIMER_NAME
-idle MICROSECOND
-wait CYCLE
-stage NANOSECOND
-statement NANOSECOND
+select NAME from performance_schema.setup_timers;
+NAME
+idle
+wait
+stage
+statement
select * from performance_schema.accounts;
USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
select * from performance_schema.cond_instances;
@@ -227,6 +232,10 @@ 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;
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 5db8896faca..57fa6444318 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -7,16 +7,16 @@ performance_schema
test
select count(*) from performance_schema.performance_timers;
count(*)
-5
+0
select count(*) from performance_schema.setup_consumers;
count(*)
-12
+0
select count(*) > 3 from performance_schema.setup_instruments;
count(*) > 3
0
select count(*) from performance_schema.setup_timers;
count(*)
-4
+0
select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
select * from performance_schema.events_stages_current;
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -115,6 +119,7 @@ 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
@@ -126,18 +131,6 @@ Performance_schema_thread_instances_lost 0
Performance_schema_users_lost 0
select * from performance_schema.setup_consumers;
NAME ENABLED
-events_stages_current NO
-events_stages_history NO
-events_stages_history_long NO
-events_statements_current NO
-events_statements_history NO
-events_statements_history_long NO
-events_waits_current NO
-events_waits_history NO
-events_waits_history_long NO
-global_instrumentation NO
-thread_instrumentation NO
-statements_digest YES
select * from performance_schema.setup_instruments;
NAME ENABLED TIMED
select * from performance_schema.setup_actors;
@@ -146,7 +139,20 @@ select * from performance_schema.setup_objects;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
select * from performance_schema.setup_timers;
NAME TIMER_NAME
-idle MICROSECOND
-wait CYCLE
-stage NANOSECOND
-statement NANOSECOND
+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');
+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
+update performance_schema.setup_actors set HOST = 'myhost';
+delete from performance_schema.setup_actors;
+truncate performance_schema.events_stages_history_long;
+truncate performance_schema.events_statements_history_long;
+truncate performance_schema.events_waits_history_long;
+truncate performance_schema.setup_objects;
+truncate performance_schema.setup_actors;
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index 0f2019a6e78..319485d1a55 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -31,6 +31,7 @@ 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;
@@ -48,19 +49,21 @@ 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.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.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_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;
@@ -95,6 +98,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -115,6 +119,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
index 628775781e6..876ff059ef5 100644
--- a/mysql-test/suite/perfschema/r/statement_digest.result
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -8,6 +8,9 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
####################################
# EXECUTION
@@ -35,6 +38,15 @@ INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT 1 + 1;
1 + 1
2
@@ -61,42 +73,82 @@ CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
-SELECT 1 from t11;
-ERROR 42S02: Table 'statements_digest.t11' doesn't exist
-create table t11 (c char(4));
-create table t11 (c char(4));
-ERROR 42S01: Table 't11' already exists
-insert into t11 values("MySQL");
+SELECT 1 FROM no_such_table;
+ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
+CREATE TABLE dup_table (c char(4));
+CREATE TABLE dup_table (c char(4));
+ERROR 42S01: Table 'dup_table' already exists
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+c
+EXECUTE stmt;
+c
+DEALLOCATE PREPARE stmt;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+CALL p1();
+c
+CALL p1();
+c
+DROP PROCEDURE p1;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+select func(3,4);
+func(3,4)
+7
+select func(13,42);
+func(13,42)
+55
+DROP FUNCTION func;
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
-DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
-025af09b416617ee444962d35913c0ab TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
-2448fef9bf02af329f4379caa8311a29 SELECT ? FROM t1 1 0 0 0
-8ffffc32710da95472a3eae27f5a4138 SELECT ? FROM `t1` 1 0 0 0
-0fb24bb23dd5e0781c8be24d072a4e0d SELECT ?, ... FROM t1 2 0 0 0
-bfb5a2acdbc5fce89461e691841090d8 SELECT ? FROM t2 1 0 0 0
-320290df27bd6c85764c3d9293087f6d SELECT ?, ... FROM t2 2 0 0 0
-e71851702cece9c252fe03e12e065471 INSERT INTO t1 VALUES (?) 1 1 0 0
-2bfe58b981242b825ff30e0a23610c01 INSERT INTO t2 VALUES (?) 1 1 0 0
-7dffbc5052092965f9d2739569afbb89 INSERT INTO t3 VALUES (...) 1 1 0 0
-22d4d66694b4eaffa0b2037d9312aae0 INSERT INTO t4 VALUES (...) 1 1 0 0
-d8b582fde31cf51cd5d0ee4e565c5eee INSERT INTO t5 VALUES (...) 1 1 0 0
-c45c72afb3fbdbec45f98072a4ecf6f5 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
-9a49ff059861b8b0fac613a205c80fcd INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
-bb9851b80e774365eadd37ae7e6efb7f INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
-f130568315c6ad1d3e9804f1877b5f1e SELECT ? + ? 3 0 0 0
-6de2f55944526286ad0a812d0c546851 SELECT ? 1 0 0 0
-00c7b29a063ecaa8b0986db7fb2226a8 CREATE SCHEMA statements_digest_temp 2 2 0 0
-ab15c731548dc40ff43f9bff0ad94c80 DROP SCHEMA statements_digest_temp 2 0 0 0
-42f722a57efba27876a0124a5be1ab5b SELECT ? FROM t11 1 0 0 1
-d98c529e915c29f2244a14921a990335 CREATE TABLE t11 ( c CHARACTER (?) ) 2 0 0 1
-dc1241f077d462bb4d6d096b0e7b2b1a INSERT INTO t11 VALUES (?) 1 1 1 0
-043fc5cdadb7f0300fc8e9c83d768f13 SHOW WARNINGS 1 0 0 0
+SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+statements_digest 172976feb9113e0dc6aa2bbac59a41d7 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+statements_digest 246bfb7a2c115a3857247496f0a06e08 SELECT ? FROM t1 1 0 0 0
+statements_digest 907d22a5ac65e1b0bfc82abcdf84a8d8 SELECT ? FROM `t1` 1 0 0 0
+statements_digest 3f0d7f4f2bd4a19524543fc56a624c83 SELECT ?, ... FROM t1 2 0 0 0
+statements_digest aac3102cf9419f1651994d4aaafa8c20 SELECT ? FROM t2 1 0 0 0
+statements_digest 279d5b0e21a9c9c646c4b465da5dcd44 SELECT ?, ... FROM t2 2 0 0 0
+statements_digest a036d5e6499bf4645f6a64340c2d8438 INSERT INTO t1 VALUES (?) 1 1 0 0
+statements_digest 159174fa24dc866247d5dced9c722e02 INSERT INTO t2 VALUES (?) 1 1 0 0
+statements_digest a3be3a6183a1e4cb444b4d5a66cdd2b2 INSERT INTO t3 VALUES (...) 4 4 0 0
+statements_digest 0941de9adae9af8685915d60ebed1683 INSERT INTO t4 VALUES (...) 1 1 0 0
+statements_digest aee3244eac2c1faff982545129512427 INSERT INTO t5 VALUES (...) 1 1 0 0
+statements_digest 4cde588fe902029f8988148ceed0cbfd INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
+statements_digest 7cf6e181ccf6a9b09ee2d2f51f736d80 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
+statements_digest 987ef81982bd577fdc2af56fe921929f INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
+statements_digest 5d5e2ef70ec7fe7d032f355108196a54 INSERT INTO t1 VALUES ( NULL ) 1 1 0 0
+statements_digest 2b4cd139a8a9ad1cb63b947283c8dd67 INSERT INTO t6 VALUES (...) 5 5 0 0
+statements_digest 7c4b227b74c9a1ca5e2beca9b32259ba SELECT ? + ? 3 0 0 0
+statements_digest dd253e864da5a0da21a8123f1ae62884 SELECT ? 1 0 0 0
+statements_digest 4eadbe94b51e0d5fda438dcef8df01a2 CREATE SCHEMA statements_digest_temp 2 2 0 0
+statements_digest bfedee4db6e9a7a04da672d6fa34715a DROP SCHEMA statements_digest_temp 2 0 0 0
+statements_digest c4eeebe7dc1822f01e7b451ba4621cc7 SELECT ? FROM no_such_table 1 0 0 1
+statements_digest a08b576290907ef16f2aa465b73fac27 CREATE TABLE dup_table ( c CHARACTER (?) ) 2 0 0 1
+statements_digest a8c52b07321246d4da76fb363035febb DROP TABLE dup_table 1 0 0 0
+statements_digest 7d1828b42909655dddee855f03bc838a INSERT INTO t11 VALUES (?) 1 1 1 0
+statements_digest 9ba09d3e124eee1b713313da9fff39b6 SHOW WARNINGS 1 0 0 0
+statements_digest 4c0f5e01e17fb5890796cbb748d3a794 PREPARE stmt FROM ? 1 0 0 0
+statements_digest c26d5948e897228bdd2d079bcf94bf6d EXECUTE stmt 2 0 0 0
+statements_digest 59dbac4c2a79eda07b2580ec00de6e61 DEALLOCATE PREPARE stmt 1 0 0 0
+statements_digest 615b2b6dbac1151d115c0ecb7e4f21ae CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1 0 0 0
+statements_digest 409b182c50d83079ecdfdb38aa5eec91 CALL p1 ( ) 2 0 0 0
+statements_digest 41700a1312963051979149240eabd249 DROP PROCEDURE p1 1 0 0 0
+statements_digest 62ff7dd6ae64d2f692ddae8bbdf8f9bc CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1 0 0 0
+statements_digest d8ad5d7a1d04081b952dd069c06cdb52 SELECT func (...) 2 0 0 0
+statements_digest 1e7ef179d2dbf6ab4dfbcc38c82f818a DROP FUNCTION func 1 0 0 0
+statements_digest bd575ad35bc8b3e3defaf15492f8c6a4 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1 0 0 0
+statements_digest 8b8adfe407b0cb1f777ad2f6988d91ee INSERT INTO t12 VALUES (?) 2 2 0 0
+statements_digest 3a4c46884c810a7536a4b6515102d9f9 DROP TRIGGER trg 1 0 0 0
####################################
# CLEANUP
####################################
@@ -105,4 +157,7 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
index 3b96736ba17..ff987ecd5f3 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -8,6 +8,9 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
SELECT * FROM performance_schema.setup_consumers;
NAME ENABLED
events_stages_current YES
@@ -49,6 +52,15 @@ INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT 1 + 1;
1 + 1
2
@@ -75,41 +87,81 @@ CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
-SELECT 1 from t11;
-ERROR 42S02: Table 'statements_digest.t11' doesn't exist
-create table t11 (c char(4));
-create table t11 (c char(4));
-ERROR 42S01: Table 't11' already exists
-insert into t11 values("MySQL");
+SELECT 1 FROM no_such_table;
+ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
+CREATE TABLE dup_table (c char(4));
+CREATE TABLE dup_table (c char(4));
+ERROR 42S01: Table 'dup_table' already exists
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+c
+EXECUTE stmt;
+c
+DEALLOCATE PREPARE stmt;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+CALL p1();
+c
+CALL p1();
+c
+DROP PROCEDURE p1;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+select func(3,4);
+func(3,4)
+7
+select func(13,42);
+func(13,42)
+55
+DROP FUNCTION func;
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
-digest digest_text count_star
-025af09b416617ee444962d35913c0ab TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
-2448fef9bf02af329f4379caa8311a29 SELECT ? FROM t1 1
-8ffffc32710da95472a3eae27f5a4138 SELECT ? FROM `t1` 1
-0fb24bb23dd5e0781c8be24d072a4e0d SELECT ?, ... FROM t1 2
-bfb5a2acdbc5fce89461e691841090d8 SELECT ? FROM t2 1
-320290df27bd6c85764c3d9293087f6d SELECT ?, ... FROM t2 2
-e71851702cece9c252fe03e12e065471 INSERT INTO t1 VALUES (?) 1
-2bfe58b981242b825ff30e0a23610c01 INSERT INTO t2 VALUES (?) 1
-7dffbc5052092965f9d2739569afbb89 INSERT INTO t3 VALUES (...) 1
-22d4d66694b4eaffa0b2037d9312aae0 INSERT INTO t4 VALUES (...) 1
-d8b582fde31cf51cd5d0ee4e565c5eee INSERT INTO t5 VALUES (...) 1
-c45c72afb3fbdbec45f98072a4ecf6f5 INSERT INTO t1 VALUES (?) /* , ... */ 2
-9a49ff059861b8b0fac613a205c80fcd INSERT INTO t3 VALUES (...) /* , ... */ 1
-bb9851b80e774365eadd37ae7e6efb7f INSERT INTO t5 VALUES (...) /* , ... */ 1
-f130568315c6ad1d3e9804f1877b5f1e SELECT ? + ? 3
-6de2f55944526286ad0a812d0c546851 SELECT ? 1
-00c7b29a063ecaa8b0986db7fb2226a8 CREATE SCHEMA statements_digest_temp 2
-ab15c731548dc40ff43f9bff0ad94c80 DROP SCHEMA statements_digest_temp 2
-42f722a57efba27876a0124a5be1ab5b SELECT ? FROM t11 1
-d98c529e915c29f2244a14921a990335 CREATE TABLE t11 ( c CHARACTER (?) ) 2
-dc1241f077d462bb4d6d096b0e7b2b1a INSERT INTO t11 VALUES (?) 1
-043fc5cdadb7f0300fc8e9c83d768f13 SHOW WARNINGS 1
+SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+schema_name digest digest_text count_star
+statements_digest 172976feb9113e0dc6aa2bbac59a41d7 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
+statements_digest 246bfb7a2c115a3857247496f0a06e08 SELECT ? FROM t1 1
+statements_digest 907d22a5ac65e1b0bfc82abcdf84a8d8 SELECT ? FROM `t1` 1
+statements_digest 3f0d7f4f2bd4a19524543fc56a624c83 SELECT ?, ... FROM t1 2
+statements_digest aac3102cf9419f1651994d4aaafa8c20 SELECT ? FROM t2 1
+statements_digest 279d5b0e21a9c9c646c4b465da5dcd44 SELECT ?, ... FROM t2 2
+statements_digest a036d5e6499bf4645f6a64340c2d8438 INSERT INTO t1 VALUES (?) 1
+statements_digest 159174fa24dc866247d5dced9c722e02 INSERT INTO t2 VALUES (?) 1
+statements_digest a3be3a6183a1e4cb444b4d5a66cdd2b2 INSERT INTO t3 VALUES (...) 4
+statements_digest 0941de9adae9af8685915d60ebed1683 INSERT INTO t4 VALUES (...) 1
+statements_digest aee3244eac2c1faff982545129512427 INSERT INTO t5 VALUES (...) 1
+statements_digest 4cde588fe902029f8988148ceed0cbfd INSERT INTO t1 VALUES (?) /* , ... */ 2
+statements_digest 7cf6e181ccf6a9b09ee2d2f51f736d80 INSERT INTO t3 VALUES (...) /* , ... */ 1
+statements_digest 987ef81982bd577fdc2af56fe921929f INSERT INTO t5 VALUES (...) /* , ... */ 1
+statements_digest 5d5e2ef70ec7fe7d032f355108196a54 INSERT INTO t1 VALUES ( NULL ) 1
+statements_digest 2b4cd139a8a9ad1cb63b947283c8dd67 INSERT INTO t6 VALUES (...) 5
+statements_digest 7c4b227b74c9a1ca5e2beca9b32259ba SELECT ? + ? 3
+statements_digest dd253e864da5a0da21a8123f1ae62884 SELECT ? 1
+statements_digest 4eadbe94b51e0d5fda438dcef8df01a2 CREATE SCHEMA statements_digest_temp 2
+statements_digest bfedee4db6e9a7a04da672d6fa34715a DROP SCHEMA statements_digest_temp 2
+statements_digest c4eeebe7dc1822f01e7b451ba4621cc7 SELECT ? FROM no_such_table 1
+statements_digest a08b576290907ef16f2aa465b73fac27 CREATE TABLE dup_table ( c CHARACTER (?) ) 2
+statements_digest a8c52b07321246d4da76fb363035febb DROP TABLE dup_table 1
+statements_digest 7d1828b42909655dddee855f03bc838a INSERT INTO t11 VALUES (?) 1
+statements_digest 9ba09d3e124eee1b713313da9fff39b6 SHOW WARNINGS 1
+statements_digest 4c0f5e01e17fb5890796cbb748d3a794 PREPARE stmt FROM ? 1
+statements_digest c26d5948e897228bdd2d079bcf94bf6d EXECUTE stmt 2
+statements_digest 59dbac4c2a79eda07b2580ec00de6e61 DEALLOCATE PREPARE stmt 1
+statements_digest 615b2b6dbac1151d115c0ecb7e4f21ae CREATE PROCEDURE p1 ( ) BEGIN SELECT * FROM t12 ; END 1
+statements_digest 409b182c50d83079ecdfdb38aa5eec91 CALL p1 ( ) 2
+statements_digest 41700a1312963051979149240eabd249 DROP PROCEDURE p1 1
+statements_digest 62ff7dd6ae64d2f692ddae8bbdf8f9bc CREATE FUNCTION `func` ( a INTEGER , b INTEGER ) RETURNS INTEGER (?) RETURN a + b 1
+statements_digest d8ad5d7a1d04081b952dd069c06cdb52 SELECT func (...) 2
+statements_digest 1e7ef179d2dbf6ab4dfbcc38c82f818a DROP FUNCTION func 1
+statements_digest bd575ad35bc8b3e3defaf15492f8c6a4 CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @ ? := ? 1
+statements_digest 8b8adfe407b0cb1f777ad2f6988d91ee INSERT INTO t12 VALUES (?) 2
+statements_digest 3a4c46884c810a7536a4b6515102d9f9 DROP TRIGGER trg 1
SELECT digest, digest_text FROM performance_schema.events_statements_current;
digest digest_text
####################################
@@ -120,4 +172,7 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
index 57c92aca988..434914c65e7 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
@@ -8,6 +8,9 @@ CREATE TABLE t2(a int);
CREATE TABLE t3(a int, b int);
CREATE TABLE t4(a int, b int);
CREATE TABLE t5(a int, b int, c int);
+CREATE TABLE t6(a int, b int, c int, d int);
+CREATE TABLE t11 (c CHAR(4));
+CREATE TABLE t12 (c CHAR(4));
SELECT * FROM performance_schema.setup_consumers;
NAME ENABLED
events_stages_current YES
@@ -49,6 +52,15 @@ INSERT INTO t1 VALUES (1), (2), (3);
INSERT INTO t1 VALUES (1), (2), (3), (4);
INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+INSERT INTO t1 VALUES (NULL);
+INSERT INTO t3 VALUES (NULL,NULL);
+INSERT INTO t3 VALUES (1,NULL);
+INSERT INTO t3 VALUES (NULL,1);
+INSERT INTO t6 VALUES (NULL, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (1, NULL, NULL, NULL);
+INSERT INTO t6 VALUES (NULL, 2, NULL, NULL);
+INSERT INTO t6 VALUES (1, 2, 3, NULL);
+INSERT INTO t6 VALUES (1, 2, NULL, 4);
SELECT 1 + 1;
1 + 1
2
@@ -75,19 +87,44 @@ CREATE SCHEMA statements_digest_temp;
DROP SCHEMA statements_digest_temp;
CREATE DATABASE statements_digest_temp;
DROP DATABASE statements_digest_temp;
-SELECT 1 from t11;
-ERROR 42S02: Table 'statements_digest.t11' doesn't exist
-create table t11 (c char(4));
-create table t11 (c char(4));
-ERROR 42S01: Table 't11' already exists
-insert into t11 values("MySQL");
+SELECT 1 FROM no_such_table;
+ERROR 42S02: Table 'statements_digest.no_such_table' doesn't exist
+CREATE TABLE dup_table (c char(4));
+CREATE TABLE dup_table (c char(4));
+ERROR 42S01: Table 'dup_table' already exists
+DROP TABLE dup_table;
+INSERT INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
+PREPARE stmt FROM "SELECT * FROM t12";
+EXECUTE stmt;
+c
+EXECUTE stmt;
+c
+DEALLOCATE PREPARE stmt;
+CREATE PROCEDURE p1() BEGIN SELECT * FROM t12; END//
+CALL p1();
+c
+CALL p1();
+c
+DROP PROCEDURE p1;
+CREATE FUNCTION `func`(a INT, b INT) RETURNS int(11) RETURN a+b //
+select func(3,4);
+func(3,4)
+7
+select func(13,42);
+func(13,42)
+55
+DROP FUNCTION func;
+CREATE TRIGGER trg BEFORE INSERT ON t12 FOR EACH ROW SET @a:=1;
+INSERT INTO t12 VALUES ("abc");
+INSERT INTO t12 VALUES ("def");
+DROP TRIGGER trg;
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
-digest digest_text count_star
+SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+schema_name digest digest_text count_star
SELECT digest, digest_text FROM performance_schema.events_statements_current;
digest digest_text
NULL NULL
@@ -99,4 +136,7 @@ DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP TABLE IF EXISTS t4;
DROP TABLE IF EXISTS t5;
+DROP TABLE IF EXISTS t6;
+DROP TABLE IF EXISTS t11;
+DROP TABLE IF EXISTS t12;
DROP DATABASE IF EXISTS statements_digest;
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 a7c28822185..0d832402e89 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
@@ -6,7 +6,7 @@ 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
####################################
# QUERYING PS STATEMENT DIGEST
####################################
-SELECT digest, digest_text, count_star FROM events_statements_summary_by_digest;
-digest digest_text count_star
-5c6b2b48a2a39d5dce7ab6ff18ba12d7 TRUNCATE TABLE events_statements_summary_by_digest 1
-3eec87a1ca63856db1629def2300543e SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
+SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest;
+schema_name digest digest_text count_star
+performance_schema b94b1531dc75a46d0674ff4a7c95abf7 TRUNCATE TABLE events_statements_summary_by_digest 1
+performance_schema 1c412ba09370b4dbafb9aabf2fe7aa51 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
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 5db83182106..b1cd921ee35 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -297,7 +301,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -463,7 +469,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -646,7 +654,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1731,6 +1741,7 @@ 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
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 5e31faf740b..156d2644afb 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -296,7 +300,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -462,7 +468,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -645,7 +653,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1730,6 +1740,7 @@ 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
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 eacd331f5a8..35a3a2ebb29 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -297,7 +301,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -463,7 +469,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -646,7 +654,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1731,6 +1741,7 @@ 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
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 2035cdbe84f..ab67bade127 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -296,7 +300,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -462,7 +468,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -645,7 +653,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1730,6 +1740,7 @@ 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
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 5496d6bc755..1980aba6db9 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
@@ -66,6 +66,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -84,6 +85,7 @@ 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
@@ -146,7 +148,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -473,7 +479,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -664,7 +672,9 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1805,6 +1815,7 @@ 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
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 83ebe3ccad0..3e2f2dba337 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
@@ -65,6 +65,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -83,6 +84,7 @@ 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
@@ -145,7 +147,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -300,7 +304,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -478,7 +484,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -673,7 +681,9 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1842,6 +1852,7 @@ 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
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 985a3cee16f..fd74760c784 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
@@ -66,6 +66,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -84,6 +85,7 @@ 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
@@ -146,7 +148,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -473,7 +479,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -664,7 +672,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1805,6 +1815,7 @@ 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
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 d3c6e468c5a..329080013e5 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
@@ -65,6 +65,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -83,6 +84,7 @@ 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
@@ -145,7 +147,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -300,7 +304,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -478,7 +484,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -673,7 +681,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1842,6 +1852,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index 0b36f7f559d..ec4963b516d 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -296,7 +300,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -462,7 +468,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -645,7 +653,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1730,6 +1740,7 @@ 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
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 1898ee90d72..bc65143f461 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -297,7 +301,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -463,7 +469,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -646,7 +654,9 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1731,6 +1741,7 @@ 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
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 72665ace56e..1d89fa9fa67 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -296,7 +300,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -462,7 +468,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -645,7 +653,9 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1730,6 +1740,7 @@ 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
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 0f552bf578d..342acd7bc11 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -297,7 +301,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -463,7 +469,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -646,7 +654,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1731,6 +1741,7 @@ 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
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 ac9c539430b..114aaa7010f 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -296,7 +300,9 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -462,7 +468,9 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -645,7 +653,9 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1730,6 +1740,7 @@ 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
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 278d0051a04..5438b8c5158 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 d6725a70b68..9c05c78eb9a 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 fdaef3f147b..82bef33c9a1 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 4adb2eaf89d..28a37f8a4a0 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 0af737eee96..fc75720abe6 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -469,7 +475,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -656,7 +664,9 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1769,6 +1779,7 @@ 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
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 6fab82b38df..739380507c5 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -471,7 +477,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -660,7 +668,9 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1787,6 +1797,7 @@ 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
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 0338bde63a2..789761490e9 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -469,7 +475,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -656,7 +664,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1769,6 +1779,7 @@ 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
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 29ee1bda675..2ec1c21e634 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -471,7 +477,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -660,7 +668,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1787,6 +1797,7 @@ 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
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 232e8af1017..51ea3f14986 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 a97e6f693ac..6b565e8f00d 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 fdcdda4d6f0..72822fd30cd 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 09f4e3aff5e..948ca570723 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 3e13281e0d9..b584afc2f2e 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 e1264576c56..43de94add0d 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 ccdcc67156c..453fd2c1478 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 d36a8a1a279..2a43dc1f2dc 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 396df8f69d2..2afe89ecdd7 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -469,7 +475,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -656,7 +664,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1769,6 +1779,7 @@ 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
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 09b59ef8c31..d01ec751a88 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -471,7 +477,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -660,7 +668,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1787,6 +1797,7 @@ 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
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 d2e7c407cc3..295db1332c7 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
@@ -68,6 +68,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -86,6 +87,7 @@ 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
@@ -148,7 +150,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -469,7 +475,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -656,7 +664,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1769,6 +1779,7 @@ 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
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 fd9bd38a81a..e0601a1c9bb 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
@@ -67,6 +67,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -85,6 +86,7 @@ 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
@@ -147,7 +149,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -471,7 +477,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -660,7 +668,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1787,6 +1797,7 @@ 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
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 5f13b37b262..d7a63c6dd64 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 456c570a34f..986d2b251ff 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
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 7a2df579687..cb3c5ed0c4b 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
@@ -70,6 +70,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -88,6 +89,7 @@ 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
@@ -150,7 +152,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -299,7 +303,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -465,7 +471,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -648,7 +656,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1733,6 +1743,7 @@ 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
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 1f5dc009e67..e05d4a06449 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
@@ -69,6 +69,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 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
@@ -87,6 +88,7 @@ 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
@@ -149,7 +151,9 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user1@localhost is connected
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -298,7 +302,9 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
-"================== con2 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user2@localhost is connected
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -464,7 +470,9 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
-"================== con3 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user3@localhost is connected
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -647,7 +655,9 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
-"================== con4 connected =================="
+select concat(current_user(), " is connected") as status;
+status
+user4@localhost is connected
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1732,6 +1742,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
index 2580b9eeff8..faf0a384503 100644
--- a/mysql-test/suite/perfschema/r/table_schema.result
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -7,7 +7,7 @@ def performance_schema accounts CURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 1
def performance_schema accounts TOTAL_CONNECTIONS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
def performance_schema cond_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
def performance_schema cond_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_stages_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_current THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_stages_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_stages_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_stages_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -17,7 +17,7 @@ def performance_schema events_stages_current TIMER_END 7 NULL YES bigint NULL NU
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
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
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
-def performance_schema events_stages_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_stages_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -27,7 +27,7 @@ def performance_schema events_stages_history TIMER_END 7 NULL YES bigint NULL NU
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
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
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
-def performance_schema events_stages_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_stages_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -52,7 +52,7 @@ def performance_schema events_stages_summary_by_host_by_event_name SUM_TIMER_WAI
def performance_schema events_stages_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
def performance_schema events_stages_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
def performance_schema events_stages_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
-def performance_schema events_stages_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_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
def performance_schema events_stages_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
def performance_schema events_stages_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
def performance_schema events_stages_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
@@ -72,7 +72,7 @@ def performance_schema events_stages_summary_global_by_event_name SUM_TIMER_WAIT
def performance_schema events_stages_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
def performance_schema events_stages_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
def performance_schema events_stages_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
-def performance_schema events_statements_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_current THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_statements_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_statements_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_statements_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -112,7 +112,7 @@ def performance_schema events_statements_current NO_INDEX_USED 37 NULL NO bigint
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
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
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
-def performance_schema events_statements_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_statements_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -152,7 +152,7 @@ def performance_schema events_statements_history NO_INDEX_USED 37 NULL NO bigint
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
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
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
-def performance_schema events_statements_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_statements_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -219,34 +219,35 @@ def performance_schema events_statements_summary_by_account_by_event_name SUM_SO
def performance_schema events_statements_summary_by_account_by_event_name SUM_SORT_SCAN 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_statements_summary_by_account_by_event_name SUM_NO_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_statements_summary_by_account_by_event_name SUM_NO_GOOD_INDEX_USED 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest DIGEST 1 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
-def performance_schema events_statements_summary_by_digest DIGEST_TEXT 2 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
-def performance_schema events_statements_summary_by_digest COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_LOCK_TIME 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_ERRORS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_WARNINGS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_ROWS_AFFECTED 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_ROWS_SENT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_ROWS_EXAMINED 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_DISK_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_RANGE_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE_CHECK 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SELECT_SCAN 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SORT_MERGE_PASSES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SORT_RANGE 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SORT_ROWS 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_statements_summary_by_digest FIRST_SEEN 27 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
-def performance_schema events_statements_summary_by_digest LAST_SEEN 28 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema events_statements_summary_by_digest SCHEMA_NAME 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_summary_by_digest DIGEST 2 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_statements_summary_by_digest DIGEST_TEXT 3 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_summary_by_digest COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_LOCK_TIME 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ERRORS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_WARNINGS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_AFFECTED 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_SENT 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_EXAMINED 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_DISK_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_TABLES 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_RANGE_JOIN 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE_CHECK 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_SCAN 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_MERGE_PASSES 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_RANGE 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_ROWS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_SCAN 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_NO_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_NO_GOOD_INDEX_USED 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest FIRST_SEEN 28 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema events_statements_summary_by_digest LAST_SEEN 29 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
def performance_schema events_statements_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
def performance_schema events_statements_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
def performance_schema events_statements_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
@@ -273,7 +274,7 @@ 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
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
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
-def performance_schema events_statements_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_statements_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
@@ -350,7 +351,7 @@ 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
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
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
-def performance_schema events_waits_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
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
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
def performance_schema events_waits_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -369,7 +370,7 @@ def performance_schema events_waits_current NESTING_EVENT_TYPE 16 NULL YES enum
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
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
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
-def performance_schema events_waits_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_history THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -388,7 +389,7 @@ def performance_schema events_waits_history NESTING_EVENT_TYPE 16 NULL YES enum
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
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
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
-def performance_schema events_waits_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_history_long THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
@@ -429,7 +430,7 @@ def performance_schema events_waits_summary_by_instance SUM_TIMER_WAIT 4 NULL NO
def performance_schema events_waits_summary_by_instance MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_summary_by_instance AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema events_waits_summary_by_instance MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema events_waits_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_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
def performance_schema events_waits_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
def performance_schema events_waits_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
def performance_schema events_waits_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
@@ -503,9 +504,38 @@ def performance_schema file_summary_by_instance MAX_TIMER_MISC 25 NULL NO bigint
def performance_schema hosts HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
def performance_schema hosts CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
def performance_schema hosts TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache IP 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema host_cache HOST 2 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
+def performance_schema host_cache HOST_VALIDATED 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema host_cache SUM_CONNECT_ERRORS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HOST_BLOCKED_ERRORS 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NAMEINFO_TRANSIENT_ERRORS 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NAMEINFO_PERMANENT_ERRORS 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_FORMAT_ERRORS 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_ADDRINFO_TRANSIENT_ERRORS 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_ADDRINFO_PERMANENT_ERRORS 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_FCRDNS_ERRORS 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HOST_ACL_ERRORS 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NO_AUTH_PLUGIN_ERRORS 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_AUTH_PLUGIN_ERRORS 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HANDSHAKE_ERRORS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_PROXY_USER_ERRORS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_PROXY_USER_ACL_ERRORS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_AUTHENTICATION_ERRORS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_SSL_ERRORS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_MAX_USER_CONNECTIONS_ERRORS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_DEFAULT_DATABASE_ERRORS 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_INIT_CONNECT_ERRORS 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_LOCAL_ERRORS 24 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_UNKNOWN_ERRORS 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache FIRST_SEEN 26 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+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
+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
+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
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
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
-def performance_schema mutex_instances LOCKED_BY_THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
def performance_schema objects_summary_global_by_type OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
def performance_schema objects_summary_global_by_type OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
def performance_schema objects_summary_global_by_type OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
@@ -520,8 +550,16 @@ def performance_schema performance_timers TIMER_RESOLUTION 3 NULL YES bigint NUL
def performance_schema performance_timers TIMER_OVERHEAD 4 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
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
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
-def performance_schema rwlock_instances WRITE_LOCKED_BY_THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
def performance_schema rwlock_instances READ_LOCKED_BY_COUNT 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema session_account_connect_attrs PROCESSLIST_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema session_account_connect_attrs ATTR_NAME 2 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_bin varchar(32) select,insert,update,references
+def performance_schema session_account_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references
+def performance_schema session_account_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema session_connect_attrs PROCESSLIST_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
+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
+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
def performance_schema setup_actors HOST 1 % NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
def performance_schema setup_actors USER 2 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
def performance_schema setup_actors ROLE 3 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
@@ -539,7 +577,7 @@ def performance_schema setup_timers NAME 1 NULL NO varchar 64 192 NULL NULL NULL
def performance_schema setup_timers TIMER_NAME 2 NULL NO enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') select,insert,update,references
def performance_schema socket_instances EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
def performance_schema socket_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema socket_instances THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema socket_instances THREAD_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema socket_instances SOCKET_ID 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
def performance_schema socket_instances IP 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
def performance_schema socket_instances PORT 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
@@ -741,10 +779,10 @@ def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_EXTERNA
def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_EXTERNAL 71 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_EXTERNAL 72 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_EXTERNAL 73 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
-def performance_schema threads THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema threads THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema threads NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
def performance_schema threads TYPE 3 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references
-def performance_schema threads PROCESSLIST_ID 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema threads PROCESSLIST_ID 4 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references
def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select,insert,update,references
def performance_schema threads PROCESSLIST_DB 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
@@ -752,7 +790,7 @@ def performance_schema threads PROCESSLIST_COMMAND 8 NULL YES varchar 16 48 NULL
def performance_schema threads PROCESSLIST_TIME 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
def performance_schema threads PROCESSLIST_STATE 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
def performance_schema threads PROCESSLIST_INFO 11 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
-def performance_schema threads PARENT_THREAD_ID 12 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+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
def performance_schema threads ROLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
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
def performance_schema users USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
diff --git a/mysql-test/suite/perfschema/r/temp_table_io.result b/mysql-test/suite/perfschema/r/temp_table_io.result
index 732d1acac6a..c5de365dbf4 100644
--- a/mysql-test/suite/perfschema/r/temp_table_io.result
+++ b/mysql-test/suite/perfschema/r/temp_table_io.result
@@ -99,6 +99,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/trigger_table_io.result b/mysql-test/suite/perfschema/r/trigger_table_io.result
index a8207a8b32a..e77e7d864f1 100644
--- a/mysql-test/suite/perfschema/r/trigger_table_io.result
+++ b/mysql-test/suite/perfschema/r/trigger_table_io.result
@@ -184,6 +184,7 @@ 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
diff --git a/mysql-test/suite/perfschema/r/view_table_io.result b/mysql-test/suite/perfschema/r/view_table_io.result
index 1d05ad38f56..5f17b5ae9e1 100644
--- a/mysql-test/suite/perfschema/r/view_table_io.result
+++ b/mysql-test/suite/perfschema/r/view_table_io.result
@@ -135,6 +135,7 @@ 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
diff --git a/mysql-test/suite/perfschema/t/ddl_session_account_connect_attrs.test b/mysql-test/suite/perfschema/t/ddl_session_account_connect_attrs.test
new file mode 100644
index 00000000000..5d472d383ae
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_session_account_connect_attrs.test
@@ -0,0 +1,15 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_account_connect_attrs
+ ADD COLUMN foo INTEGER;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.session_account_connect_attrs;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_account_connect_attrs ADD INDEX test_index(ATTR_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.session_account_connect_attrs(ATTR_NAME);
diff --git a/mysql-test/suite/perfschema/t/ddl_session_connect_attrs.test b/mysql-test/suite/perfschema/t/ddl_session_connect_attrs.test
new file mode 100644
index 00000000000..8f3e10ca2a8
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_session_connect_attrs.test
@@ -0,0 +1,15 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_connect_attrs
+ ADD COLUMN foo INTEGER;
+
+-- error ER_WRONG_PERFSCHEMA_USAGE
+TRUNCATE TABLE performance_schema.session_connect_attrs;
+
+-- error ER_DBACCESS_DENIED_ERROR
+ALTER TABLE performance_schema.session_connect_attrs ADD INDEX test_index(ATTR_NAME);
+
+-- error ER_DBACCESS_DENIED_ERROR
+CREATE UNIQUE INDEX test_index ON performance_schema.session_connect_attrs(ATTR_NAME);
diff --git a/mysql-test/suite/perfschema/t/digest_table_full.test b/mysql-test/suite/perfschema/t/digest_table_full.test
index b0ff0ab6f21..cb9d7ea4ea8 100644
--- a/mysql-test/suite/perfschema/t/digest_table_full.test
+++ b/mysql-test/suite/perfschema/t/digest_table_full.test
@@ -19,7 +19,7 @@ TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
diff --git a/mysql-test/suite/perfschema/t/disabled.def b/mysql-test/suite/perfschema/t/disabled.def
index 888298bbb09..79b31af3066 100644
--- a/mysql-test/suite/perfschema/t/disabled.def
+++ b/mysql-test/suite/perfschema/t/disabled.def
@@ -9,3 +9,5 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
+hostcache_ipv4_max_con : BUG#14627287 27th Sept, 2012 Mayank
+hostcache_ipv6_max_con : BUG#14627287 27th Sept, 2012 Mayank
diff --git a/mysql-test/suite/perfschema/t/dml_session_account_connect_attrs.test b/mysql-test/suite/perfschema/t/dml_session_account_connect_attrs.test
new file mode 100644
index 00000000000..82768cb0d6b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_session_account_connect_attrs.test
@@ -0,0 +1,38 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.session_account_connect_attrs
+ LIMIT 1;
+
+SELECT * FROM performance_schema.session_account_connect_attrs
+ where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.session_account_connect_attrs
+ SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
+ ORDINAL_POSITION=100, PROCESS_ID=102;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.session_account_connect_attrs
+ SET ATTR_NAME='FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.session_account_connect_attrs
+ SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.session_account_connect_attrs
+ WHERE ATTR_VALUE='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.session_account_connect_attrs;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_account_connect_attrs READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_account_connect_attrs WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_session_connect_attrs.test b/mysql-test/suite/perfschema/t/dml_session_connect_attrs.test
new file mode 100644
index 00000000000..db2bcb7afd6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_session_connect_attrs.test
@@ -0,0 +1,38 @@
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+SELECT * FROM performance_schema.session_connect_attrs
+ LIMIT 1;
+
+SELECT * FROM performance_schema.session_connect_attrs
+ where ATTR_NAME='FOO' OR ATTR_VALUE='BAR';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+INSERT INTO performance_schema.session_connect_attrs
+ SET ATTR_NAME='FOO', ATTR_VALUE='BAR',
+ ORDINAL_POSITION=100, PROCESS_ID=102;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.session_connect_attrs
+ SET ATTR_NAME='FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+UPDATE performance_schema.session_connect_attrs
+ SET ATTR_NAME='FOO' WHERE ATTR_VALUE='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.session_connect_attrs
+ WHERE ATTR_VALUE='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+DELETE FROM performance_schema.session_connect_attrs;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_connect_attrs READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.session_connect_attrs WRITE;
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
index 5582d559664..8a4f11ba51f 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
@@ -82,3 +82,9 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
+--echo
+--echo # Bug#13813193 ASSERTION `TABLE->READ_SET ==
+--echo # &TABLE->DEF_READ_SET' FAILED / MYSQL_UPDATE
+--echo
+UPDATE performance_schema.setup_instruments SET timed='NO'
+ORDER BY RAND();
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
index 4113618b0cf..a96ccf86315 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test
@@ -14,9 +14,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'192.0.2.4';
@@ -26,7 +26,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -47,5 +47,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
index 0c3bc365ae1..f99cbc80577 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
@@ -14,9 +14,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -24,7 +24,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -42,5 +42,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
index 6de091eae67..4bf041b1ada 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
@@ -16,9 +16,9 @@
# [Note] - 192.0.2.127
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'192.0.2.4';
@@ -28,7 +28,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -49,5 +49,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
index c5a9f33177d..2f5f12fe0ab 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
@@ -16,9 +16,9 @@
# [Note] - 192.0.2.127
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -26,7 +26,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -44,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
index e479944183b..9931fa5ffba 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
@@ -14,9 +14,9 @@
# no reverse address mapping.
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
@@ -26,7 +26,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -47,5 +47,5 @@ disconnect con3;
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
index cf31acf1da2..b46661c6852 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
@@ -14,9 +14,9 @@
# no reverse address mapping.
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -24,7 +24,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -42,5 +42,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
index 4932dd0a924..283d3a5841d 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
@@ -14,9 +14,9 @@
# Name or service not known
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
grant select on test.* to 'root'@'192.0.2.4';
@@ -27,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -50,5 +50,5 @@ revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
index 0c10c53d933..eb69c2a5365 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
@@ -14,9 +14,9 @@
# Name or service not known
call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -24,7 +24,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -42,5 +42,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
index 2ce251bb77b..e4903f0aa33 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
@@ -13,9 +13,9 @@
--source include/have_perfschema.inc
--source include/have_plugin_auth.inc
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
CREATE USER 'plug'@'santa.claus.ipv4.example.com'
IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@@ -29,7 +29,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
uninstall plugin test_plugin_server;
--disable_query_log
@@ -48,8 +48,8 @@ connect (con3,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin)
--connection default
--source ../include/hostcache_dump.inc
---replace_result $PLUGIN_AUTH PLUGIN_AUTH
-eval install plugin test_plugin_server soname '$PLUGIN_AUTH';
+--replace_result $AUTH_TEST_PLUGIN_SO PLUGIN_AUTH
+eval install plugin test_plugin_server soname '$AUTH_TEST_PLUGIN_SO';
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -85,5 +85,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
DROP USER 'plug'@'santa.claus.ipv4.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
index fcfb1b9631b..0917fbf2aa8 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
@@ -12,11 +12,10 @@
--source include/have_debug.inc
--source include/have_perfschema.inc
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
-select @@global.max_connect_errors;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
+
select @@global.max_connect_errors into @saved_max_connect_errors;
set global max_connect_errors = 2;
@@ -29,7 +28,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -86,5 +85,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
set global max_connect_errors = @saved_max_connect_errors;
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
index a5a06171be7..4766dbef778 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
@@ -13,9 +13,9 @@
# Name or service not known
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -23,7 +23,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -41,5 +41,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con-master.opt
new file mode 100644
index 00000000000..87ad0bc3f2d
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con-master.opt
@@ -0,0 +1 @@
+--max-user-connections=1024
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
index 98d9ccbe83b..3bf5ef3b68d 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
@@ -14,14 +14,10 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
-select @@global.max_user_connections;
-select @@global.max_connections;
select @@global.max_connections into @saved_max_connections;
+select @@global.max_user_connections into @saved_max_user_connections;
create user 'quota'@'santa.claus.ipv4.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
@@ -34,7 +30,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
select "Con2a is alive";
@@ -242,9 +238,10 @@ disconnect con5b;
--source ../include/wait_for_pfs_thread_count.inc
set global max_connections = @saved_max_connections;
+set global max_user_connections = @saved_max_user_connections;
# revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com';
drop user 'quota'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
index de30b4a98d3..bce65b61cfc 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
@@ -14,9 +14,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'192.0.2.4';
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
@@ -27,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -45,7 +45,7 @@ disconnect con3;
--connection default
--source ../include/hostcache_dump.inc
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
connect (con4,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con4 is alive";
@@ -68,5 +68,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'192.0.2.4';
drop user 'root'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
index 4498d5921ac..6152399503b 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
@@ -14,9 +14,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -24,7 +24,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -42,7 +42,7 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -60,5 +60,5 @@ connect (con5,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
index c5a5e4d76a0..52b696831af 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
@@ -14,9 +14,9 @@
# no reverse address mapping.
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'192.0.2.4';
@@ -26,7 +26,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -47,5 +47,5 @@ disconnect con3;
revoke select on test.* from 'root'@'192.0.2.4';
drop user 'root'@'192.0.2.4';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
index 9684f676818..72bb7fac6af 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
@@ -14,9 +14,9 @@
# no reverse address mapping.
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -24,7 +24,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -42,5 +42,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
index c77fc625954..b39f3478146 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test
@@ -12,10 +12,9 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
create user 'user_without'@'santa.claus.ipv4.example.com';
create user 'user_with'@'santa.claus.ipv4.example.com'
@@ -29,7 +28,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -82,5 +81,5 @@ connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,);
drop user 'user_with'@'santa.claus.ipv4.example.com';
drop user 'user_without'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
index 3e9161302d1..de58219d490 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test
@@ -11,11 +11,7 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
-
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
+--source ../include/hostcache_set_state.inc
create user 'user_ssl'@'santa.claus.ipv4.example.com';
create user 'user_ssl_x509'@'santa.claus.ipv4.example.com'
@@ -33,7 +29,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -70,5 +66,5 @@ connect (con2d,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL)
drop user 'user_ssl'@'santa.claus.ipv4.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
index 14c92597f95..ae58f4089ed 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test
@@ -15,9 +15,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("santa.claus.ipv6.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'2001:db8::6:6';
@@ -27,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -48,5 +48,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
index 1b2f3f865dc..8c408b160a6 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
@@ -15,9 +15,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("santa.claus.ipv6.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -25,7 +25,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -43,5 +43,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
index ad478a763e5..ccd0ae383ee 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test
@@ -17,9 +17,9 @@
# [Note] - 2001:db8::6:7f
call mtr.add_suppression("santa.claus.ipv6.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'2001:db8::6:6';
@@ -29,7 +29,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -50,5 +50,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
index 758fc973a34..72d5d693a1b 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
@@ -17,10 +17,9 @@
# [Note] - 2001:db8::6:7f
call mtr.add_suppression("santa.claus.ipv6.example.com");
-
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -28,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -46,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
index 19a3c2d11f3..c253e4b77d5 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
@@ -15,9 +15,9 @@
# no reverse address mapping.
call mtr.add_suppression("192.0.2.4");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
@@ -27,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -48,5 +48,5 @@ disconnect con3;
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
index 543f056534a..096b4b11eb4 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
@@ -11,9 +11,9 @@
--source include/have_ipv6.inc
--source include/have_perfschema.inc
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -21,7 +21,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -39,5 +39,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
index be304140ba2..575dab9a337 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test
@@ -15,9 +15,9 @@
# Name or service not known
call mtr.add_suppression("santa.claus.ipv6.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
grant select on test.* to 'root'@'2001:db8::6:6';
@@ -28,7 +28,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -51,5 +51,5 @@ revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
index 101abc86a20..f6e5fa118df 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
@@ -15,9 +15,9 @@
# Name or service not known
call mtr.add_suppression("santa.claus.ipv6.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -25,7 +25,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -43,5 +43,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
index 89bbc016224..1d5c7c546e9 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test
@@ -14,9 +14,9 @@
--source include/have_perfschema.inc
--source include/have_plugin_auth.inc
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
CREATE USER 'plug'@'santa.claus.ipv6.example.com'
IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
@@ -30,7 +30,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
uninstall plugin test_plugin_server;
--disable_query_log
@@ -49,9 +49,8 @@ connect (con3,"::1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
--connection default
--source ../include/hostcache_dump.inc
-#--replace_result $PLUGIN_AUTH PLUGIN_AUTH
-#eval install plugin test_plugin_server soname '$PLUGIN_AUTH';
-install plugin test_plugin_server soname 'auth_test_plugin';
+--replace_result $AUTH_TEST_PLUGIN_SO PLUGIN_AUTH
+eval install plugin test_plugin_server soname '$AUTH_TEST_PLUGIN_SO';
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -87,5 +86,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
DROP USER 'plug'@'santa.claus.ipv6.example.com';
DROP USER 'plug_dest'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
index ef276db982e..9ed365bf3c8 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
@@ -13,11 +13,10 @@
--source include/have_ipv6.inc
--source include/have_perfschema.inc
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
-select @@global.max_connect_errors;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
+
select @@global.max_connect_errors into @saved_max_connect_errors;
set global max_connect_errors = 2;
@@ -30,7 +29,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -87,5 +86,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
set global max_connect_errors = @saved_max_connect_errors;
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
index a0a6079ec16..143ad44c2f2 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt
@@ -1 +1,2 @@
--bind-addr=::
+--max-user-connections=1024
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
index c8d6d524cb0..d4adc3e0d00 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
@@ -15,14 +15,10 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
-select @@global.max_user_connections;
-select @@global.max_connections;
select @@global.max_connections into @saved_max_connections;
+select @@global.max_user_connections into @saved_max_user_connections;
create user 'quota'@'santa.claus.ipv6.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
@@ -35,7 +31,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect (con2a,"::1",quota,,test,$MASTER_MYPORT,);
select "Con2a is alive";
@@ -224,9 +220,10 @@ disconnect con5b;
--source ../include/wait_for_pfs_thread_count.inc
set global max_connections = @saved_max_connections;
+set global max_user_connections = @saved_max_user_connections;
# revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com';
drop user 'quota'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
index ecf18ab55f4..e396dbbad3c 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test
@@ -15,9 +15,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("2001:db8::6:6");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
@@ -28,7 +28,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -46,7 +46,7 @@ disconnect con3;
--connection default
--source ../include/hostcache_dump.inc
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
connect (con4,"::1",root,,test,$MASTER_MYPORT,);
select "Con4 is alive";
@@ -69,5 +69,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'2001:db8::6:6';
drop user 'root'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
index 510318fae53..cc7eb0b566f 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
@@ -15,9 +15,9 @@
# Temporary failure in name resolution
call mtr.add_suppression("2001:db8::6:6");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -25,7 +25,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -43,7 +43,7 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -61,5 +61,5 @@ connect (con5,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
index 00b279aabe8..80f07989212 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test
@@ -15,9 +15,9 @@
# Name or service not known
call mtr.add_suppression("2001:db8::6:6");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
grant select on test.* to 'root'@'2001:db8::6:6';
@@ -27,7 +27,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
connect (con2,"::1",root,,test,$MASTER_MYPORT,);
select "Con2 is alive";
@@ -48,5 +48,5 @@ disconnect con3;
revoke select on test.* from 'root'@'2001:db8::6:6';
drop user 'root'@'2001:db8::6:6';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
index 03a207fccfb..0d11e433b58 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
@@ -15,9 +15,9 @@
# Name or service not known
call mtr.add_suppression("2001:db8::6:6");
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
@@ -25,7 +25,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
--disable_query_log
--error ER_HOST_NOT_PRIVILEGED
@@ -43,5 +43,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,);
--connection default
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
index 9de453544bb..6dd33b9bb5b 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test
@@ -12,11 +12,7 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
-
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
+--source ../include/hostcache_set_state.inc
create user 'user_without'@'santa.claus.ipv6.example.com';
create user 'user_with'@'santa.claus.ipv6.example.com'
@@ -30,7 +26,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -83,5 +79,5 @@ connect (con2f,"::1",user_with,wrong_password,test,$MASTER_MYPORT,);
drop user 'user_with'@'santa.claus.ipv6.example.com';
drop user 'user_without'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
index ce6f825f4fb..2b30a4eaf41 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test
@@ -12,11 +12,7 @@
# Enforce a clean state
--source ../include/wait_for_pfs_thread_count.inc
-
-flush status;
-flush hosts;
-flush user_resources;
-select @@global.debug;
+--source ../include/hostcache_set_state.inc
create user 'user_ssl'@'santa.claus.ipv6.example.com';
create user 'user_ssl_x509'@'santa.claus.ipv6.example.com'
@@ -34,7 +30,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
--disable_query_log
--error ER_ACCESS_DENIED_ERROR
@@ -71,5 +67,5 @@ connect (con2d,"::1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL);
drop user 'user_ssl'@'santa.claus.ipv6.example.com';
drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com';
-set global debug= default;
+set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
index 022e20a9a64..9e5c88b8bd5 100644
--- a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
+++ b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test
@@ -9,9 +9,10 @@
--source include/have_debug.inc
--source include/have_perfschema.inc
-flush status;
-flush hosts;
-select @@global.debug;
+# Enforce a clean state
+--source ../include/wait_for_pfs_thread_count.inc
+--source ../include/hostcache_set_state.inc
+
show global status like "connection_errors_%";
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
@@ -20,7 +21,7 @@ select current_user();
disconnect con1;
--connection default
-set global debug= "+d,vio_peer_addr_error";
+set global debug_dbug= "+d,vio_peer_addr_error";
--disable_query_log
--error ER_BAD_HOST_ERROR
@@ -40,7 +41,7 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
show global status like "connection_errors_%";
--source ../include/hostcache_dump.inc
-set global debug= default;
+set global debug_dbug= default;
flush status;
show global status like "connection_errors_%";
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade.test b/mysql-test/suite/perfschema/t/pfs_upgrade.test
deleted file mode 100644
index b4a19a66c3b..00000000000
--- a/mysql-test/suite/perfschema/t/pfs_upgrade.test
+++ /dev/null
@@ -1,10 +0,0 @@
-# Tests for PERFORMANCE_SCHEMA
-# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
-# database.
-#
-
---source include/not_embedded.inc
---source include/have_perfschema.inc
---source include/have_innodb.inc
---source ../include/pfs_upgrade.inc
-
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_event.test b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
new file mode 100644
index 00000000000..db7613052d4
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+# Some initial settings + Preemptive cleanup
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_event.err;
+let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_event.out;
+--error 0,1
+--remove_file $out_file
+--error 0,1
+--remove_file $err_file
+
+--disable_warnings
+drop event if exists test.user_event;
+--enable_warnings
+
+--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";
+
+update mysql.event set db='performance_schema' where name='user_event';
+
+--source suite/perfschema/include/upgrade_check.inc
+
+select name from mysql.event where db='performance_schema';
+
+update mysql.event set db='test' where name='user_event';
+drop event test.user_event;
+
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_func.test b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
new file mode 100644
index 00000000000..4f53aa1bdd1
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+# Some initial settings + Preemptive cleanup
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_func.err;
+let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_func.out;
+--error 0,1
+--remove_file $out_file
+--error 0,1
+--remove_file $err_file
+
+--disable_warnings
+drop function if exists test.user_func;
+--enable_warnings
+
+--echo "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';
+
+--source suite/perfschema/include/upgrade_check.inc
+
+select name from mysql.proc where db='performance_schema';
+
+update mysql.proc set db='test' where name='user_func';
+drop function test.user_func;
+
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
new file mode 100644
index 00000000000..432cee6fb1a
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+# Some initial settings + Preemptive cleanup
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_proc.err;
+let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_proc.out;
+--error 0,1
+--remove_file $out_file
+--error 0,1
+--remove_file $err_file
+
+--disable_warnings
+drop procedure if exists test.user_proc;
+--enable_warnings
+
+--echo "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';
+
+--source suite/perfschema/include/upgrade_check.inc
+
+select name from mysql.proc where db='performance_schema';
+
+update mysql.proc set db='test' where name='user_proc';
+drop procedure test.user_proc;
+
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_table.test b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
new file mode 100644
index 00000000000..c68e156a2db
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
@@ -0,0 +1,44 @@
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+# Some initial settings + Preemptive cleanup
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_table.err;
+let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_table.out;
+--error 0,1
+--remove_file $out_file
+--error 0,1
+--remove_file $err_file
+
+--disable_warnings
+drop table if exists test.user_table;
+--enable_warnings
+
+--echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
+
+create table test.user_table(a int);
+
+--error 0,1
+--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
+--copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm
+
+# Make sure the table is visible
+use performance_schema;
+show tables like "user_table";
+
+--source suite/perfschema/include/upgrade_check.inc
+
+# Make sure the table is still visible
+show tables like "user_table";
+
+use test;
+
+--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
+drop table test.user_table;
+
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_view.test b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
new file mode 100644
index 00000000000..38ce377f235
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
@@ -0,0 +1,44 @@
+# Tests for PERFORMANCE_SCHEMA
+# Make sure mysql_upgrade does not destroy data in a 'performance_schema'
+# database.
+#
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_innodb.inc
+
+# Some initial settings + Preemptive cleanup
+let $MYSQLD_DATADIR= `SELECT @@datadir`;
+let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_view.err;
+let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade_view.out;
+--error 0,1
+--remove_file $out_file
+--error 0,1
+--remove_file $err_file
+
+--disable_warnings
+drop view if exists test.user_view;
+--enable_warnings
+
+--echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
+
+create view test.user_view as select "Not supposed to be here";
+
+--error 0,1
+--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
+--copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm
+
+# Make sure the view is visible
+use performance_schema;
+show tables like "user_view";
+
+--source suite/perfschema/include/upgrade_check.inc
+
+# Make sure the view is still visible
+show tables like "user_view";
+
+use test;
+
+--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
+drop view test.user_view;
+
diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test
index aee8221dfc5..dc17fbcf67e 100644
--- a/mysql-test/suite/perfschema/t/privilege_table_io.test
+++ b/mysql-test/suite/perfschema/t/privilege_table_io.test
@@ -14,7 +14,13 @@
# Therefore we suppress the query_log here.
--echo # We are forced to suppress here the server response.
--disable_result_log
+optimize table mysql.host;
+optimize table mysql.user;
optimize table mysql.db;
+optimize table mysql.proxies_priv;
+optimize table mysql.tables_priv;
+optimize table mysql.procs_priv;
+optimize table mysql.servers;
--enable_result_log
# Start recording events
diff --git a/mysql-test/suite/perfschema/t/short_option_1.test b/mysql-test/suite/perfschema/t/short_option_1.test
index 3877e7b7277..b94d1685867 100644
--- a/mysql-test/suite/perfschema/t/short_option_1.test
+++ b/mysql-test/suite/perfschema/t/short_option_1.test
@@ -14,4 +14,6 @@ show variables like 'character_set_system';
show variables like 'log';
show variables like 'general_log';
+show variables like 'new';
+
show variables like 'log_warnings';
diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test
index 94625d2ed06..909840144ef 100644
--- a/mysql-test/suite/perfschema/t/socket_connect.test
+++ b/mysql-test/suite/perfschema/t/socket_connect.test
@@ -9,7 +9,7 @@
--source ../include/wait_for_pfs_thread_count.inc
# Set this to enable debugging output
-let $my_socket_debug=0;
+let $my_socket_debug_dbug=0;
--echo #==============================================================================
--echo # Establish the level of IPV6 support
diff --git a/mysql-test/suite/perfschema/t/socket_instances_func.test b/mysql-test/suite/perfschema/t/socket_instances_func.test
index 5ed687a483b..12411103579 100644
--- a/mysql-test/suite/perfschema/t/socket_instances_func.test
+++ b/mysql-test/suite/perfschema/t/socket_instances_func.test
@@ -7,7 +7,7 @@
--source include/have_perfschema.inc
# Set this to enable debugging output
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
#
# Set IP address defaults with respect to IPV6 support
diff --git a/mysql-test/suite/perfschema/t/socket_instances_func_win.test b/mysql-test/suite/perfschema/t/socket_instances_func_win.test
index 4b5fc07a85a..5faf0d24ec4 100644
--- a/mysql-test/suite/perfschema/t/socket_instances_func_win.test
+++ b/mysql-test/suite/perfschema/t/socket_instances_func_win.test
@@ -7,7 +7,7 @@
--source include/have_perfschema.inc
# Set this to enable debugging output
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
#
# Set IP address defaults with respect to IPV6 support
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 1c317cedcf5..5ba3af1e408 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
@@ -29,7 +29,7 @@
--source ../include/no_protocol.inc
# Set this to enable debugging output
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
--echo #==============================================================================
--echo # Establish the level of IPV6 support
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 b039023dc6f..ef5096d85ff 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
@@ -43,7 +43,7 @@
# Set IP address defaults with respect to IPV6 support
#
# Set this to enable debugging output
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
#
# Determine if IPV6 supported
#
@@ -66,7 +66,7 @@ if($check_ipv4_mapped_supported)
let $my_localhost=::ffff:127.0.0.1;
}
#
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
if($my_socket_debug)
{
--echo IPV6=$check_ipv6_supported, IPV4_MAPPED = $check_ipv4_mapped_supported, LOCALHOST = $my_localhost
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 80b7f3c2be7..5d4b4209b6e 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
@@ -45,7 +45,7 @@
# Set IP address defaults with respect to IPV6 support
#
# Set this to enable debugging output
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
#
# Determine if IPV6 supported
#
@@ -68,7 +68,7 @@ if($check_ipv4_mapped_supported)
let $my_localhost=::ffff:127.0.0.1;
}
#
-let $my_socket_debug= 0;
+let $my_socket_debug_dbug= 0;
if($my_socket_debug)
{
--echo IPV6=$check_ipv6_supported, IPV4_MAPPED = $check_ipv4_mapped_supported, LOCALHOST = $my_localhost
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 b0ff0ab6f21..cb9d7ea4ea8 100644
--- a/mysql-test/suite/perfschema/t/start_server_no_digests.test
+++ b/mysql-test/suite/perfschema/t/start_server_no_digests.test
@@ -19,7 +19,7 @@ TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
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 0203918849b..d0cd757cac1 100644
--- a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt
+++ b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt
@@ -35,3 +35,5 @@
--loose-performance_schema_events_statements_history_long_size=0
--loose-performance_schema_events_statements_history_size=0
+--loose-performance_schema_session_connect_attrs=0
+
diff --git a/mysql-test/suite/perfschema/t/start_server_nothing.test b/mysql-test/suite/perfschema/t/start_server_nothing.test
index 61f70dcfdb5..c337ef604f6 100644
--- a/mysql-test/suite/perfschema/t/start_server_nothing.test
+++ b/mysql-test/suite/perfschema/t/start_server_nothing.test
@@ -11,7 +11,7 @@ show variables like "performance_schema%";
select * from performance_schema.setup_instruments;
select TIMER_NAME from performance_schema.performance_timers;
select * from performance_schema.setup_consumers;
-select * from performance_schema.setup_timers;
+select NAME from performance_schema.setup_timers;
# All empty
select * from performance_schema.accounts;
@@ -44,6 +44,8 @@ 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;
diff --git a/mysql-test/suite/perfschema/t/start_server_off.test b/mysql-test/suite/perfschema/t/start_server_off.test
index a46c2898865..8b58f8c0814 100644
--- a/mysql-test/suite/perfschema/t/start_server_off.test
+++ b/mysql-test/suite/perfschema/t/start_server_off.test
@@ -19,3 +19,30 @@ select * from performance_schema.setup_instruments;
select * from performance_schema.setup_actors;
select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+
+# Expect INSERT to fail with an error
+
+--error ER_WRONG_PERFSCHEMA_USAGE
+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');
+
+# Expect SELECT, UPDATE, DELETE and TRUNCATE to affect 0 rows, but with
+# no error because the target row(s) will not be found
+
+select * from performance_schema.setup_objects;
+update performance_schema.setup_objects set OBJECT_NAME = 'myobject';
+delete from performance_schema.setup_objects;
+
+select * from performance_schema.setup_actors;
+update performance_schema.setup_actors set HOST = 'myhost';
+delete from performance_schema.setup_actors;
+
+truncate performance_schema.events_stages_history_long;
+truncate performance_schema.events_statements_history_long;
+truncate performance_schema.events_waits_history_long;
+truncate performance_schema.setup_objects;
+truncate performance_schema.setup_actors;
+
+
diff --git a/mysql-test/suite/perfschema/t/statement_digest.test b/mysql-test/suite/perfschema/t/statement_digest.test
index 24c43cdbac4..ed1f99e4318 100644
--- a/mysql-test/suite/perfschema/t/statement_digest.test
+++ b/mysql-test/suite/perfschema/t/statement_digest.test
@@ -16,7 +16,7 @@ TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
# Cleanup for Digest
diff --git a/mysql-test/suite/perfschema/t/statement_digest_consumers.test b/mysql-test/suite/perfschema/t/statement_digest_consumers.test
index e7721d770ea..e7510e32049 100644
--- a/mysql-test/suite/perfschema/t/statement_digest_consumers.test
+++ b/mysql-test/suite/perfschema/t/statement_digest_consumers.test
@@ -28,7 +28,7 @@ TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
SELECT digest, digest_text FROM performance_schema.events_statements_current;
# Cleanup for Digest
diff --git a/mysql-test/suite/perfschema/t/statement_digest_consumers2.test b/mysql-test/suite/perfschema/t/statement_digest_consumers2.test
index 72bf5241ee8..98442349927 100644
--- a/mysql-test/suite/perfschema/t/statement_digest_consumers2.test
+++ b/mysql-test/suite/perfschema/t/statement_digest_consumers2.test
@@ -30,7 +30,7 @@ TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+SELECT schema_name, digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
SELECT digest, digest_text FROM performance_schema.events_statements_current;
# Cleanup for Digest
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 fdc9496c4f1..3969383a6fb 100644
--- a/mysql-test/suite/perfschema/t/statement_digest_long_query.test
+++ b/mysql-test/suite/perfschema/t/statement_digest_long_query.test
@@ -20,4 +20,4 @@ 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
--echo ####################################
--echo # QUERYING PS STATEMENT DIGEST
--echo ####################################
-SELECT digest, digest_text, count_star FROM events_statements_summary_by_digest;
+SELECT schema_name, digest, digest_text, count_star FROM events_statements_summary_by_digest;
diff --git a/mysql-test/suite/rpl/r/rpl_000013.result b/mysql-test/suite/rpl/r/rpl_000013.result
index e94a469e970..a45f11c4b5e 100644
--- a/mysql-test/suite/rpl/r/rpl_000013.result
+++ b/mysql-test/suite/rpl/r/rpl_000013.result
@@ -21,5 +21,5 @@ Variable_name Value
Slave_open_temp_tables 0
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_drop.result b/mysql-test/suite/rpl/r/rpl_drop.result
index bdba42e1d34..b91400b2296 100644
--- a/mysql-test/suite/rpl/r/rpl_drop.result
+++ b/mysql-test/suite/rpl/r/rpl_drop.result
@@ -2,5 +2,5 @@ include/master-slave.inc
[connection master]
create table t1 (a int);
drop table t1, t2;
-ERROR 42S02: Unknown table 't2'
+ERROR 42S02: Unknown table 'test.t2'
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_drop_temp.result b/mysql-test/suite/rpl/r/rpl_drop_temp.result
index 9ec3a62ccc1..44b5f44b4a2 100644
--- a/mysql-test/suite/rpl/r/rpl_drop_temp.result
+++ b/mysql-test/suite/rpl/r/rpl_drop_temp.result
@@ -10,12 +10,12 @@ Slave_open_temp_tables 0
drop database mysqltest;
DROP TEMPORARY TABLE IF EXISTS tmp1;
Warnings:
-Note 1051 Unknown table 'tmp1'
+Note 1051 Unknown table 'test.tmp1'
CREATE TEMPORARY TABLE t1 ( a int );
DROP TEMPORARY TABLE t1, t2;
-ERROR 42S02: Unknown table 't2'
+ERROR 42S02: Unknown table 'test.t2'
DROP TEMPORARY TABLE tmp2;
-ERROR 42S02: Unknown table 'tmp2'
+ERROR 42S02: Unknown table 'test.tmp2'
stop slave;
**** On Master ****
CREATE TEMPORARY TABLE tmp3 (a int);
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
index 755a799a740..4d16b1eb781 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
@@ -20,35 +20,35 @@ CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
-Note 1051 Unknown table 'nt_tmp_2'
+Note 1051 Unknown table 'test.nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
-Note 1051 Unknown table 'nt_tmp_1'
+Note 1051 Unknown table 'test.nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
-Note 1051 Unknown table 'tt_tmp_2'
+Note 1051 Unknown table 'test.tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
-Note 1051 Unknown table 'tt_tmp_1'
+Note 1051 Unknown table 'test.tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
-Note 1051 Unknown table 'nt_2'
+Note 1051 Unknown table 'test.nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
-Note 1051 Unknown table 'nt_1'
+Note 1051 Unknown table 'test.nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
-Note 1051 Unknown table 'tt_2'
+Note 1051 Unknown table 'test.tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
@@ -78,7 +78,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* gen
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
@@ -86,7 +86,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -96,7 +96,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -107,7 +107,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* gen
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -117,7 +117,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -128,7 +128,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* gen
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -249,7 +249,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -263,10 +263,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -284,7 +284,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -300,11 +300,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -323,7 +323,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -338,10 +338,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -361,7 +361,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -377,11 +377,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -400,7 +400,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -417,10 +417,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -444,7 +444,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -463,11 +463,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -757,7 +757,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -771,10 +771,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -794,7 +794,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -810,11 +810,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -835,7 +835,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -850,10 +850,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -875,7 +875,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -891,11 +891,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -916,7 +916,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -933,10 +933,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -962,7 +962,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -981,11 +981,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -1230,7 +1230,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by serv
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1238,7 +1238,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1248,7 +1248,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `xx_1` /* generat
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1259,7 +1259,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `tt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1269,7 +1269,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_2`,`xx_1` /*
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1280,7 +1280,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1375,7 +1375,7 @@ SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1389,7 +1389,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1404,7 +1404,7 @@ SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1420,7 +1420,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1435,7 +1435,7 @@ SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1451,7 +1451,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
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_mixed_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result
index 2afd910f367..12dfa9ecc7c 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
@@ -551,7 +551,7 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx
INSERT INTO tt_1(ddl_case) VALUES (3);
DROP TABLE IF EXISTS tt_xx, new_tt_xx;
Warnings:
-Note 1051 Unknown table 'tt_xx'
+Note 1051 Unknown table 'test.tt_xx'
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
diff --git a/mysql-test/suite/rpl/r/rpl_multi_update3.result b/mysql-test/suite/rpl/r/rpl_multi_update3.result
index bf9946f219f..273352fe5ed 100644
--- a/mysql-test/suite/rpl/r/rpl_multi_update3.result
+++ b/mysql-test/suite/rpl/r/rpl_multi_update3.result
@@ -121,10 +121,10 @@ i j x y z
DROP TABLE t1, t2, t3;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
DROP TABLE IF EXISTS t2;
Warnings:
-Note 1051 Unknown table 't2'
+Note 1051 Unknown table 'test.t2'
CREATE TABLE t1 (
idp int(11) NOT NULL default '0',
idpro int(11) default NULL,
diff --git a/mysql-test/suite/rpl/r/rpl_password_boundaries.result b/mysql-test/suite/rpl/r/rpl_password_boundaries.result
index a0ccc0ce33c..462ab154a55 100644
--- a/mysql-test/suite/rpl/r/rpl_password_boundaries.result
+++ b/mysql-test/suite/rpl/r/rpl_password_boundaries.result
@@ -12,7 +12,7 @@ include/start_slave.inc
[ on master ]
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1 (i int);
insert into t1 values (1);
[ on slave: synchronized ]
diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result
index 8db9aa6059f..d147f416c69 100644
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result
@@ -6,7 +6,7 @@ DROP TABLE IF EXISTS t1;
Checking MYSQL_TYPE_NEWDECIMAL fields
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t1 (a DECIMAL(5,2));
diff --git a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
index 914caa99c17..020200f2ef7 100644
--- a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
@@ -20,35 +20,35 @@ CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
-Note 1051 Unknown table 'nt_tmp_2'
+Note 1051 Unknown table 'test.nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
-Note 1051 Unknown table 'nt_tmp_1'
+Note 1051 Unknown table 'test.nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
-Note 1051 Unknown table 'tt_tmp_2'
+Note 1051 Unknown table 'test.tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
-Note 1051 Unknown table 'tt_tmp_1'
+Note 1051 Unknown table 'test.tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
-Note 1051 Unknown table 'nt_2'
+Note 1051 Unknown table 'test.nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
-Note 1051 Unknown table 'nt_1'
+Note 1051 Unknown table 'test.nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
-Note 1051 Unknown table 'tt_2'
+Note 1051 Unknown table 'test.tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
@@ -78,7 +78,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
@@ -86,7 +86,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -96,7 +96,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -107,7 +107,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -117,7 +117,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -128,7 +128,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `nt_tmp
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -255,7 +255,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -270,10 +270,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -293,7 +293,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -310,11 +310,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -335,7 +335,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -351,10 +351,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -376,7 +376,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -393,11 +393,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -418,7 +418,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -436,10 +436,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -465,7 +465,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -485,11 +485,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -806,7 +806,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -821,10 +821,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -846,7 +846,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -863,11 +863,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -890,7 +890,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -906,10 +906,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -933,7 +933,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -950,11 +950,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -977,7 +977,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -995,10 +995,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -1026,7 +1026,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -1046,11 +1046,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -1316,7 +1316,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by serv
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1324,7 +1324,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1334,7 +1334,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `xx_1` /* generat
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1345,7 +1345,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `tt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1355,7 +1355,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_2`,`xx_1` /*
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1366,7 +1366,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1463,7 +1463,7 @@ SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1478,7 +1478,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1494,7 +1494,7 @@ SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1511,7 +1511,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1527,7 +1527,7 @@ SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1544,7 +1544,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
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_row_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result
index 3daae3bf260..28697dc0bdc 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
@@ -586,7 +586,7 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx
INSERT INTO tt_1(ddl_case) VALUES (3);
DROP TABLE IF EXISTS tt_xx, new_tt_xx;
Warnings:
-Note 1051 Unknown table 'tt_xx'
+Note 1051 Unknown table 'test.tt_xx'
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_sp005.result b/mysql-test/suite/rpl/r/rpl_row_sp005.result
index 0496fd6fe46..df877233e94 100644
--- a/mysql-test/suite/rpl/r/rpl_row_sp005.result
+++ b/mysql-test/suite/rpl/r/rpl_row_sp005.result
@@ -73,8 +73,6 @@ id2
< ---- Master selects-- >
-------------------------
CALL test.p1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
SELECT * FROM test.t3 ORDER BY id3;
id3 c
1 MySQL
diff --git a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
index 2b3348270f1..da196bb3615 100644
--- a/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
+++ b/mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
@@ -34,8 +34,6 @@ INSERT INTO t1 VALUES ('MySQL','1993-02-04'),('ROCKS', '1990-08-27'),('Texas', '
END|
CALL p2();
CALL p1();
-Warnings:
-Error 1329 No data - zero rows fetched, selected, or processed
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
diff --git a/mysql-test/suite/rpl/r/rpl_session_var.result b/mysql-test/suite/rpl/r/rpl_session_var.result
index 030ae161b22..f58744c5d8f 100644
--- a/mysql-test/suite/rpl/r/rpl_session_var.result
+++ b/mysql-test/suite/rpl/r/rpl_session_var.result
@@ -2,7 +2,7 @@ include/master-slave.inc
[connection master]
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
create table t1(a varchar(100),b int);
set @@session.sql_mode=pipes_as_concat;
insert into t1 values('My'||'SQL', 1);
diff --git a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
index 4ed2f6d52b2..1c0cad621c5 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
@@ -20,35 +20,35 @@ CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam;
CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
Warnings:
-Note 1051 Unknown table 'nt_tmp_2'
+Note 1051 Unknown table 'test.nt_tmp_2'
CREATE TEMPORARY TABLE nt_tmp_2 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
Warnings:
-Note 1051 Unknown table 'nt_tmp_1'
+Note 1051 Unknown table 'test.nt_tmp_1'
CREATE TEMPORARY TABLE nt_tmp_1 ( id INT ) ENGINE = MyIsam;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
Warnings:
-Note 1051 Unknown table 'tt_tmp_2'
+Note 1051 Unknown table 'test.tt_tmp_2'
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) ENGINE = Innodb;
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
Warnings:
-Note 1051 Unknown table 'tt_tmp_1'
+Note 1051 Unknown table 'test.tt_tmp_1'
CREATE TEMPORARY TABLE tt_tmp_1 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS nt_2;
Warnings:
-Note 1051 Unknown table 'nt_2'
+Note 1051 Unknown table 'test.nt_2'
CREATE TABLE nt_2 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS nt_1;
Warnings:
-Note 1051 Unknown table 'nt_1'
+Note 1051 Unknown table 'test.nt_1'
CREATE TABLE nt_1 ( id INT ) ENGINE = MyIsam;
DROP TABLE IF EXISTS tt_2;
Warnings:
-Note 1051 Unknown table 'tt_2'
+Note 1051 Unknown table 'test.tt_2'
CREATE TABLE tt_2 ( id INT ) ENGINE = Innodb;
DROP TABLE IF EXISTS tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
CREATE TABLE tt_1 ( id INT ) ENGINE = Innodb;
SET @commands= '';
#########################################################################
@@ -78,7 +78,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* gen
SET @commands= 'Drop-Temp-Xe-Temp';
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
@@ -86,7 +86,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-Temp-If-Xe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -96,7 +96,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_xx_
SET @commands= 'Drop-Temp-TXe-Temp';
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -107,7 +107,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* gen
SET @commands= 'Drop-Temp-If-TXe-Temp';
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -117,7 +117,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt_tmp
SET @commands= 'Drop-Temp-NXe-Temp';
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -128,7 +128,7 @@ master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* gen
SET @commands= 'Drop-Temp-If-NXe-Temp';
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -249,7 +249,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -263,10 +263,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -284,7 +284,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -300,11 +300,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -323,7 +323,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -338,10 +338,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -361,7 +361,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -377,11 +377,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -400,7 +400,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -417,10 +417,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -444,7 +444,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -463,11 +463,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
COMMIT;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -757,7 +757,7 @@ SET @commands= 'B T Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -771,10 +771,10 @@ SET @commands= 'B T Drop-Temp-Xe-Temp N Drop-Temp-Xe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_xx_1;
-ERROR 42S02: Unknown table 'tt_xx_1'
+ERROR 42S02: Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -794,7 +794,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-Xe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -810,11 +810,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_xx_1;
Warnings:
-Note 1051 Unknown table 'tt_xx_1'
+Note 1051 Unknown table 'test.tt_xx_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -835,7 +835,7 @@ SET @commands= 'B T Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -850,10 +850,10 @@ SET @commands= 'B T Drop-Temp-TXe-Temp N Drop-Temp-TXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE tt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -875,7 +875,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-TXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -891,11 +891,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -916,7 +916,7 @@ SET @commands= 'B T Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -933,10 +933,10 @@ SET @commands= 'B T Drop-Temp-NXe-Temp N Drop-Temp-NXe-Temp R';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_2, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE nt_tmp_1, tt_1;
-ERROR 42S02: Unknown table 'tt_1'
+ERROR 42S02: Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -962,7 +962,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-If-NXe-Temp R << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
@@ -981,11 +981,11 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
INSERT INTO nt_xx_1() VALUES (1);
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1, tt_1;
Warnings:
-Note 1051 Unknown table 'tt_1'
+Note 1051 Unknown table 'test.tt_1'
ROLLBACK;
Warnings:
Warning # Some non-transactional changed tables couldn't be rolled back
@@ -1230,7 +1230,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2` /* generated by serv
SET @commands= 'Drop-Xe';
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Xe << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1238,7 +1238,7 @@ include/show_binlog_events.inc
SET @commands= 'Drop-If-Xe';
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1248,7 +1248,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `xx_1` /* generat
SET @commands= 'Drop-TXe';
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1259,7 +1259,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `tt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-TXe';
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1269,7 +1269,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `tt_2`,`xx_1` /*
SET @commands= 'Drop-NXe';
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1280,7 +1280,7 @@ master-bin.000001 # Query # # use `test`; DROP TABLE `nt_2`,`xx_1` /* generated
SET @commands= 'Drop-If-NXe';
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1375,7 +1375,7 @@ SET @commands= 'B T Drop-Xe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1389,7 +1389,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-Xe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1404,7 +1404,7 @@ SET @commands= 'B T Drop-TXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE tt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1420,7 +1420,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS tt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-TXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1435,7 +1435,7 @@ SET @commands= 'B T Drop-NXe';
BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE nt_2, xx_1;
-ERROR 42S02: Unknown table 'xx_1'
+ERROR 42S02: Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-NXe << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
@@ -1451,7 +1451,7 @@ BEGIN;
INSERT INTO tt_xx_1() VALUES (1);
DROP TABLE IF EXISTS nt_2, xx_1;
Warnings:
-Note 1051 Unknown table 'xx_1'
+Note 1051 Unknown table 'test.xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-If-NXe << -b-b-b-b-b-b-b-b-b-b-b-
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_stm_implicit_commit_binlog.result b/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result
index 65b65d4a21f..3d5bbea8e93 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
@@ -552,7 +552,7 @@ master-bin.000001 # Query # # use `test`; TRUNCATE TABLE new_tt_xx
INSERT INTO tt_1(ddl_case) VALUES (3);
DROP TABLE IF EXISTS tt_xx, new_tt_xx;
Warnings:
-Note 1051 Unknown table 'tt_xx'
+Note 1051 Unknown table 'test.tt_xx'
-e-e-e-e-e-e-e-e-e-e-e- >> << -e-e-e-e-e-e-e-e-e-e-e-
-b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_no_op.result b/mysql-test/suite/rpl/r/rpl_stm_no_op.result
index cf5b03cdfa6..52e893d616b 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_no_op.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_no_op.result
@@ -9,7 +9,7 @@ ERROR 42000: Unknown database 'mysqltest'
create table t1 (a int);
drop table if exists t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
select * from t1;
ERROR 42S02: Table 'test.t1' doesn't exist
create table t1 (a int, b int);
diff --git a/mysql-test/suite/rpl/r/rpl_temp_table.result b/mysql-test/suite/rpl/r/rpl_temp_table.result
index e7df070874a..504b0471748 100644
--- a/mysql-test/suite/rpl/r/rpl_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_temp_table.result
@@ -41,5 +41,5 @@ Variable_name Value
Slave_open_temp_tables 0
drop table if exists t1,t2;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/host_cache_size_basic.result b/mysql-test/suite/sys_vars/r/host_cache_size_basic.result
new file mode 100644
index 00000000000..0a25202e7e4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/host_cache_size_basic.result
@@ -0,0 +1,37 @@
+select @@global.host_cache_size;
+@@global.host_cache_size
+123
+select @@session.host_cache_size;
+ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable
+show global variables like 'host_cache_size';
+Variable_name Value
+host_cache_size 123
+show session variables like 'host_cache_size';
+Variable_name Value
+host_cache_size 123
+select * from information_schema.global_variables
+where variable_name='host_cache_size';
+VARIABLE_NAME VARIABLE_VALUE
+HOST_CACHE_SIZE 123
+select * from information_schema.session_variables
+where variable_name='host_cache_size';
+VARIABLE_NAME VARIABLE_VALUE
+HOST_CACHE_SIZE 123
+set global host_cache_size=1;
+select @@global.host_cache_size;
+@@global.host_cache_size
+1
+set global host_cache_size=12;
+select @@global.host_cache_size;
+@@global.host_cache_size
+12
+set global host_cache_size=0;
+select @@global.host_cache_size;
+@@global.host_cache_size
+0
+set session host_cache_size=1;
+ERROR HY000: Variable 'host_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global host_cache_size=123;
+select @@global.host_cache_size;
+@@global.host_cache_size
+123
diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_lwm_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_lwm_basic.result
new file mode 100644
index 00000000000..1797845def2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_flushing_lwm_basic.result
@@ -0,0 +1,96 @@
+SET @global_start_value = @@global.innodb_adaptive_flushing_lwm;
+SELECT @global_start_value;
+@global_start_value
+10
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_adaptive_flushing_lwm = 1;
+SET @@global.innodb_adaptive_flushing_lwm = DEFAULT;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+10
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_adaptive_flushing_lwm = 1;
+ERROR HY000: Variable 'innodb_adaptive_flushing_lwm' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_adaptive_flushing_lwm;
+@@innodb_adaptive_flushing_lwm
+10
+SELECT local.innodb_adaptive_flushing_lwm;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_adaptive_flushing_lwm = 1;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+1
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_adaptive_flushing_lwm = 1;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+1
+SET @@global.innodb_adaptive_flushing_lwm = 60;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+60
+SET @@global.innodb_adaptive_flushing_lwm = 70;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+70
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_adaptive_flushing_lwm = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_adaptive_flushing_lwm value: '-1'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+0
+SET @@global.innodb_adaptive_flushing_lwm = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+0
+SET @@global.innodb_adaptive_flushing_lwm = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+0
+SET @@global.innodb_adaptive_flushing_lwm = 71;
+Warnings:
+Warning 1292 Truncated incorrect innodb_adaptive_flushing_lwm value: '71'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+70
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_adaptive_flushing_lwm =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
+@@global.innodb_adaptive_flushing_lwm =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+70
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
+VARIABLE_VALUE
+70
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_adaptive_flushing_lwm = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+70
+SET @@global.innodb_adaptive_flushing_lwm = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_adaptive_flushing_lwm'
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+70
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_adaptive_flushing_lwm = TRUE;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+1
+SET @@global.innodb_adaptive_flushing_lwm = FALSE;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+0
+SET @@global.innodb_adaptive_flushing_lwm = @global_start_value;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+@@global.innodb_adaptive_flushing_lwm
+10
diff --git a/mysql-test/suite/sys_vars/r/innodb_analyze_is_persistent_basic.result b/mysql-test/suite/sys_vars/r/innodb_analyze_is_persistent_basic.result
deleted file mode 100644
index db3deb560ec..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_analyze_is_persistent_basic.result
+++ /dev/null
@@ -1,103 +0,0 @@
-SET @start_global_value = @@global.innodb_analyze_is_persistent;
-SELECT @start_global_value;
-@start_global_value
-0
-Valid values are 'ON' and 'OFF'
-SELECT @@global.innodb_analyze_is_persistent in (0, 1);
-@@global.innodb_analyze_is_persistent in (0, 1)
-1
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-0
-SELECT @@session.innodb_analyze_is_persistent;
-@@session.innodb_analyze_is_persistent
-0
-SHOW global variables LIKE 'innodb_analyze_is_persistent';
-Variable_name Value
-innodb_analyze_is_persistent OFF
-SHOW session variables LIKE 'innodb_analyze_is_persistent';
-Variable_name Value
-innodb_analyze_is_persistent OFF
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SET global innodb_analyze_is_persistent='OFF';
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-0
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SET @@global.innodb_analyze_is_persistent=1;
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-1
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT ON
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SET global innodb_analyze_is_persistent=0;
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-0
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SET @@global.innodb_analyze_is_persistent='ON';
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-1
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT ON
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT OFF
-SET session innodb_analyze_is_persistent='OFF';
-SET @@session.innodb_analyze_is_persistent='ON';
-SET global innodb_analyze_is_persistent=1.1;
-ERROR 42000: Incorrect argument type to variable 'innodb_analyze_is_persistent'
-SET global innodb_analyze_is_persistent=1e1;
-ERROR 42000: Incorrect argument type to variable 'innodb_analyze_is_persistent'
-SET global innodb_analyze_is_persistent=2;
-ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of '2'
-SET global innodb_analyze_is_persistent=-3;
-ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of '-3'
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-1
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT ON
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_ANALYZE_IS_PERSISTENT ON
-SET global innodb_analyze_is_persistent='AUTO';
-ERROR 42000: Variable 'innodb_analyze_is_persistent' can't be set to the value of 'AUTO'
-SET @@global.innodb_analyze_is_persistent = @start_global_value;
-SELECT @@global.innodb_analyze_is_persistent;
-@@global.innodb_analyze_is_persistent
-0
diff --git a/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result
new file mode 100644
index 00000000000..d2773b7da69
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result
@@ -0,0 +1,64 @@
+SET @start_global_value = @@global.innodb_api_bk_commit_interval;
+SELECT @start_global_value;
+@start_global_value
+5
+Valid values are positive number
+SELECT @@global.innodb_api_bk_commit_interval > 0;
+@@global.innodb_api_bk_commit_interval > 0
+1
+SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024;
+@@global.innodb_api_bk_commit_interval <= 1024*1024*1024
+1
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+5
+SELECT @@session.innodb_api_bk_commit_interval;
+ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable
+SHOW global variables LIKE 'innodb_api_bk_commit_interval';
+Variable_name Value
+innodb_api_bk_commit_interval 5
+SHOW session variables LIKE 'innodb_api_bk_commit_interval';
+Variable_name Value
+innodb_api_bk_commit_interval 5
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_BK_COMMIT_INTERVAL 5
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_BK_COMMIT_INTERVAL 5
+SET global innodb_api_bk_commit_interval=100;
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+100
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_BK_COMMIT_INTERVAL 100
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_BK_COMMIT_INTERVAL 100
+SET session innodb_api_bk_commit_interval=1;
+ERROR HY000: Variable 'innodb_api_bk_commit_interval' is a GLOBAL variable and should be set with SET GLOBAL
+SET global innodb_api_bk_commit_interval=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
+SET global innodb_api_bk_commit_interval=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
+SET global innodb_api_bk_commit_interval="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_api_bk_commit_interval'
+SET global innodb_api_bk_commit_interval=-7;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '-7'
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_BK_COMMIT_INTERVAL 1
+SET @@global.innodb_api_bk_commit_interval = @start_global_value;
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+5
diff --git a/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result
new file mode 100644
index 00000000000..5256c1ece8a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_api_disable_rowlock_basic.result
@@ -0,0 +1,53 @@
+'#---------------------BS_STVARS_035_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+COUNT(@@GLOBAL.innodb_api_disable_rowlock)
+1
+1 Expected
+'#---------------------BS_STVARS_035_02----------------------#'
+SET @@GLOBAL.innodb_api_disable_rowlock=1;
+ERROR HY000: Variable 'innodb_api_disable_rowlock' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+COUNT(@@GLOBAL.innodb_api_disable_rowlock)
+1
+1 Expected
+'#---------------------BS_STVARS_035_03----------------------#'
+SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+COUNT(@@GLOBAL.innodb_api_disable_rowlock)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_035_04----------------------#'
+SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog;
+@@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog
+1
+1 Expected
+'#---------------------BS_STVARS_035_05----------------------#'
+SELECT COUNT(@@innodb_api_disable_rowlock);
+COUNT(@@innodb_api_disable_rowlock)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_api_disable_rowlock);
+ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_api_disable_rowlock);
+ERROR HY000: Variable 'innodb_api_disable_rowlock' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+COUNT(@@GLOBAL.innodb_api_disable_rowlock)
+1
+1 Expected
+SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog;
+ERROR 42S22: Unknown column 'innodb_api_disable_rowlock' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result
new file mode 100644
index 00000000000..f06fbeb8da7
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_api_enable_binlog_basic.result
@@ -0,0 +1,53 @@
+'#---------------------BS_STVARS_035_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+COUNT(@@GLOBAL.innodb_api_enable_binlog)
+1
+1 Expected
+'#---------------------BS_STVARS_035_02----------------------#'
+SET @@GLOBAL.innodb_api_enable_binlog=1;
+ERROR HY000: Variable 'innodb_api_enable_binlog' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+COUNT(@@GLOBAL.innodb_api_enable_binlog)
+1
+1 Expected
+'#---------------------BS_STVARS_035_03----------------------#'
+SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+COUNT(@@GLOBAL.innodb_api_enable_binlog)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_035_04----------------------#'
+SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog;
+@@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog
+1
+1 Expected
+'#---------------------BS_STVARS_035_05----------------------#'
+SELECT COUNT(@@innodb_api_enable_binlog);
+COUNT(@@innodb_api_enable_binlog)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_api_enable_binlog);
+ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_api_enable_binlog);
+ERROR HY000: Variable 'innodb_api_enable_binlog' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+COUNT(@@GLOBAL.innodb_api_enable_binlog)
+1
+1 Expected
+SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog;
+ERROR 42S22: Unknown column 'innodb_api_enable_binlog' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result
new file mode 100644
index 00000000000..4484b151396
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_api_enable_mdl_basic.result
@@ -0,0 +1,53 @@
+'#---------------------BS_STVARS_035_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+COUNT(@@GLOBAL.innodb_api_enable_mdl)
+1
+1 Expected
+'#---------------------BS_STVARS_035_02----------------------#'
+SET @@GLOBAL.innodb_api_enable_mdl=1;
+ERROR HY000: Variable 'innodb_api_enable_mdl' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+COUNT(@@GLOBAL.innodb_api_enable_mdl)
+1
+1 Expected
+'#---------------------BS_STVARS_035_03----------------------#'
+SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+COUNT(@@GLOBAL.innodb_api_enable_mdl)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_035_04----------------------#'
+SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl;
+@@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl
+1
+1 Expected
+'#---------------------BS_STVARS_035_05----------------------#'
+SELECT COUNT(@@innodb_api_enable_mdl);
+COUNT(@@innodb_api_enable_mdl)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_api_enable_mdl);
+ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_api_enable_mdl);
+ERROR HY000: Variable 'innodb_api_enable_mdl' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+COUNT(@@GLOBAL.innodb_api_enable_mdl)
+1
+1 Expected
+SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl;
+ERROR 42S22: Unknown column 'innodb_api_enable_mdl' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result b/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result
new file mode 100644
index 00000000000..41071799883
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_api_trx_level_basic.result
@@ -0,0 +1,66 @@
+SET @start_global_value = @@global.innodb_api_trx_level;
+SELECT @start_global_value;
+@start_global_value
+0
+Valid values are zero or above
+SELECT @@global.innodb_api_trx_level >=0;
+@@global.innodb_api_trx_level >=0
+1
+SELECT @@global.innodb_api_trx_level <=3;
+@@global.innodb_api_trx_level <=3
+1
+SELECT @@global.innodb_api_trx_level;
+@@global.innodb_api_trx_level
+0
+SELECT @@session.innodb_api_trx_level;
+ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable
+SHOW global variables LIKE 'innodb_api_trx_level';
+Variable_name Value
+innodb_api_trx_level 0
+SHOW session variables LIKE 'innodb_api_trx_level';
+Variable_name Value
+innodb_api_trx_level 0
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_TRX_LEVEL 0
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_trx_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_TRX_LEVEL 0
+SET global innodb_api_trx_level=100;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_trx_level value: '100'
+SELECT @@global.innodb_api_trx_level;
+@@global.innodb_api_trx_level
+3
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_TRX_LEVEL 3
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_trx_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_TRX_LEVEL 3
+SET session innodb_api_trx_level=1;
+ERROR HY000: Variable 'innodb_api_trx_level' is a GLOBAL variable and should be set with SET GLOBAL
+SET global innodb_api_trx_level=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
+SET global innodb_api_trx_level=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
+SET global innodb_api_trx_level="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_api_trx_level'
+SET global innodb_api_trx_level=-7;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_trx_level value: '-7'
+SELECT @@global.innodb_api_trx_level;
+@@global.innodb_api_trx_level
+0
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_API_TRX_LEVEL 0
+SET @@global.innodb_api_trx_level = @start_global_value;
+SELECT @@global.innodb_api_trx_level;
+@@global.innodb_api_trx_level
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result b/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
index 1f458a8e1fd..900f0167261 100644
--- a/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result
@@ -6,13 +6,13 @@ Warning 1292 Truncated incorrect innodb_autoextend_increment value: '0'
SET @@global.innodb_autoextend_increment = DEFAULT;
SELECT @@global.innodb_autoextend_increment ;
@@global.innodb_autoextend_increment
-8
+64
'#---------------------FN_DYNVARS_046_02-------------------------#'
SET innodb_autoextend_increment = 1;
ERROR HY000: Variable 'innodb_autoextend_increment' is a GLOBAL variable and should be set with SET GLOBAL
SELECT @@innodb_autoextend_increment ;
@@innodb_autoextend_increment
-8
+64
SELECT local.innodb_autoextend_increment ;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_autoextend_increment = 0;
diff --git a/mysql-test/suite/sys_vars/r/innodb_cmp_per_index_enabled_basic.result b/mysql-test/suite/sys_vars/r/innodb_cmp_per_index_enabled_basic.result
new file mode 100644
index 00000000000..3ee9448bdab
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_cmp_per_index_enabled_basic.result
@@ -0,0 +1,65 @@
+SELECT @@global.innodb_cmp_per_index_enabled;
+@@global.innodb_cmp_per_index_enabled
+0
+SET GLOBAL innodb_stats_persistent=123;
+ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of '123'
+SET GLOBAL innodb_stats_persistent='foo';
+ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of 'foo'
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT @@global.innodb_cmp_per_index_enabled;
+@@global.innodb_cmp_per_index_enabled
+1
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT @@global.innodb_cmp_per_index_enabled;
+@@global.innodb_cmp_per_index_enabled
+1
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SELECT @@global.innodb_cmp_per_index_enabled;
+@@global.innodb_cmp_per_index_enabled
+0
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SELECT @@global.innodb_cmp_per_index_enabled;
+@@global.innodb_cmp_per_index_enabled
+0
+SET GLOBAL innodb_file_format=Barracuda;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
+INSERT INTO t VALUES (1);
+SELECT * FROM information_schema.innodb_cmp_per_index;
+database_name test
+table_name t
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+compress_time 0
+uncompress_ops 0
+uncompress_time 0
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+DROP TABLE t;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
+INSERT INTO t VALUES (1);
+SELECT * FROM information_schema.innodb_cmp_per_index;
+database_name test
+table_name t
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+compress_time 0
+uncompress_ops 0
+uncompress_time 0
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+database_name test
+table_name t
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+compress_time 0
+uncompress_ops 0
+uncompress_time 0
+DROP TABLE t;
+SET GLOBAL innodb_file_format=default;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result
new file mode 100644
index 00000000000..9f85eccdb7a
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result
@@ -0,0 +1,96 @@
+SET @global_start_value = @@global.innodb_compression_failure_threshold_pct;
+SELECT @global_start_value;
+@global_start_value
+5
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_compression_failure_threshold_pct = 0;
+SET @@global.innodb_compression_failure_threshold_pct = DEFAULT;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+5
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_compression_failure_threshold_pct = 1;
+ERROR HY000: Variable 'innodb_compression_failure_threshold_pct' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_compression_failure_threshold_pct;
+@@innodb_compression_failure_threshold_pct
+5
+SELECT local.innodb_compression_failure_threshold_pct;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_compression_failure_threshold_pct = 0;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_compression_failure_threshold_pct = 0;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+SET @@global.innodb_compression_failure_threshold_pct = 1;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+1
+SET @@global.innodb_compression_failure_threshold_pct = 100;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+100
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_compression_failure_threshold_pct = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '-1'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+SET @@global.innodb_compression_failure_threshold_pct = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+SET @@global.innodb_compression_failure_threshold_pct = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+SET @@global.innodb_compression_failure_threshold_pct = 101;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '101'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+100
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_compression_failure_threshold_pct =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+@@global.innodb_compression_failure_threshold_pct =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+100
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+VARIABLE_VALUE
+100
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_compression_failure_threshold_pct = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+100
+SET @@global.innodb_compression_failure_threshold_pct = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_threshold_pct'
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+100
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_compression_failure_threshold_pct = TRUE;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+1
+SET @@global.innodb_compression_failure_threshold_pct = FALSE;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+0
+SET @@global.innodb_compression_failure_threshold_pct = @global_start_value;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+@@global.innodb_compression_failure_threshold_pct
+5
diff --git a/mysql-test/suite/sys_vars/r/innodb_compression_level_basic.result b/mysql-test/suite/sys_vars/r/innodb_compression_level_basic.result
new file mode 100644
index 00000000000..b9d1a2e4953
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_compression_level_basic.result
@@ -0,0 +1,73 @@
+SET @start_global_value = @@global.innodb_compression_level;
+SELECT @start_global_value;
+@start_global_value
+6
+Valid value 0-9
+select @@global.innodb_compression_level <= 9;
+@@global.innodb_compression_level <= 9
+1
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+6
+select @@session.innodb_compression_level;
+ERROR HY000: Variable 'innodb_compression_level' is a GLOBAL variable
+show global variables like 'innodb_compression_level';
+Variable_name Value
+innodb_compression_level 6
+show session variables like 'innodb_compression_level';
+Variable_name Value
+innodb_compression_level 6
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 6
+select * from information_schema.session_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 6
+set global innodb_compression_level=2;
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+2
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 2
+select * from information_schema.session_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 2
+set session innodb_compression_level=4;
+ERROR HY000: Variable 'innodb_compression_level' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_compression_level=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
+set global innodb_compression_level=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
+set global innodb_compression_level="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_level'
+set global innodb_compression_level=10;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_level value: '10'
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+9
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 9
+set global innodb_compression_level=-7;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_level value: '-7'
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+0
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_COMPRESSION_LEVEL 0
+set global innodb_compression_level=0;
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+0
+set global innodb_compression_level=9;
+select @@global.innodb_compression_level;
+@@global.innodb_compression_level
+9
+SET @@global.innodb_compression_level = @start_global_value;
+SELECT @@global.innodb_compression_level;
+@@global.innodb_compression_level
+6
diff --git a/mysql-test/suite/sys_vars/r/innodb_compression_pad_pct_max_basic.result b/mysql-test/suite/sys_vars/r/innodb_compression_pad_pct_max_basic.result
new file mode 100644
index 00000000000..628993ef873
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_compression_pad_pct_max_basic.result
@@ -0,0 +1,86 @@
+SET @global_start_value = @@global.innodb_compression_pad_pct_max;
+SELECT @global_start_value;
+@global_start_value
+50
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_compression_pad_pct_max = DEFAULT;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+50
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_compression_pad_pct_max = 1;
+ERROR HY000: Variable 'innodb_compression_pad_pct_max' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_compression_pad_pct_max;
+@@innodb_compression_pad_pct_max
+50
+SELECT local.innodb_compression_pad_pct_max;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_compression_pad_pct_max = 0;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+0
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_compression_pad_pct_max = 0;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+0
+SET @@global.innodb_compression_pad_pct_max = 75;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+75
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_compression_pad_pct_max = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_pad_pct_max value: '-1'
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+0
+SET @@global.innodb_compression_pad_pct_max = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+0
+SET @@global.innodb_compression_pad_pct_max = 76;
+Warnings:
+Warning 1292 Truncated incorrect innodb_compression_pad_pct_max value: '76'
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+75
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_compression_pad_pct_max =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+@@global.innodb_compression_pad_pct_max =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+75
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+VARIABLE_VALUE
+75
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_compression_pad_pct_max = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+75
+SET @@global.innodb_compression_pad_pct_max = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_compression_pad_pct_max'
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+75
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_compression_pad_pct_max = TRUE;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+1
+SET @@global.innodb_compression_pad_pct_max = FALSE;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+0
+SET @@global.innodb_compression_pad_pct_max = @global_start_value;
+SELECT @@global.innodb_compression_pad_pct_max;
+@@global.innodb_compression_pad_pct_max
+50
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 cd27de0cb0b..0b790fb3557 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,7 +1,7 @@
SET @global_start_value = @@global.innodb_concurrency_tickets;
SELECT @global_start_value;
@global_start_value
-500
+5000
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_concurrency_tickets = 0;
Warnings:
@@ -9,13 +9,13 @@ Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '0'
SET @@global.innodb_concurrency_tickets = DEFAULT;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-500
+5000
'#---------------------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
-500
+5000
SELECT local.innodb_concurrency_tickets;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_concurrency_tickets = 0;
@@ -97,4 +97,4 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = @global_start_value;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-500
+5000
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
new file mode 100644
index 00000000000..c4bf621a33d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_disable_background_merge_basic.result
@@ -0,0 +1,4 @@
+SET @orig = @@global.innodb_disable_background_merge;
+SELECT @orig;
+@orig
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
index ecf11351cd9..9780357e69f 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result
@@ -1,7 +1,7 @@
SET @start_global_value = @@global.innodb_file_per_table;
SELECT @start_global_value;
@start_global_value
-0
+1
'#---------------------BS_STVARS_028_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
COUNT(@@GLOBAL.innodb_file_per_table)
@@ -66,4 +66,4 @@ ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list'
SET @@global.innodb_file_per_table = @start_global_value;
SELECT @@global.innodb_file_per_table;
@@global.innodb_file_per_table
-0
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_timeout_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_timeout_basic.result
new file mode 100644
index 00000000000..60a4081849f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_timeout_basic.result
@@ -0,0 +1,96 @@
+SET @global_start_value = @@global.innodb_flush_log_at_timeout;
+SELECT @global_start_value;
+@global_start_value
+1
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_flush_log_at_timeout = 0;
+SET @@global.innodb_flush_log_at_timeout = DEFAULT;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+1
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_flush_log_at_timeout = 1;
+ERROR HY000: Variable 'innodb_flush_log_at_timeout' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_flush_log_at_timeout;
+@@innodb_flush_log_at_timeout
+1
+SELECT local.innodb_flush_log_at_timeout;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_flush_log_at_timeout = 0;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_flush_log_at_timeout = 0;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+SET @@global.innodb_flush_log_at_timeout = 10;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+10
+SET @@global.innodb_flush_log_at_timeout = 2700;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+2700
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_flush_log_at_timeout = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flush_log_at_timeout value: '-1'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+SET @@global.innodb_flush_log_at_timeout = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+SET @@global.innodb_flush_log_at_timeout = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+SET @@global.innodb_flush_log_at_timeout = 2701;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flush_log_at_timeout value: '2701'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+2700
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_flush_log_at_timeout =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+@@global.innodb_flush_log_at_timeout =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+2700
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+VARIABLE_VALUE
+2700
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_flush_log_at_timeout = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+2700
+SET @@global.innodb_flush_log_at_timeout = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_timeout'
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+2700
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_flush_log_at_timeout = TRUE;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+1
+SET @@global.innodb_flush_log_at_timeout = FALSE;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+0
+SET @@global.innodb_flush_log_at_timeout = @global_start_value;
+SELECT @@global.innodb_flush_log_at_timeout;
+@@global.innodb_flush_log_at_timeout
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result
index 70cccb6fdfd..167c613135d 100644
--- a/mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_neighbors_basic.result
@@ -2,10 +2,6 @@ SET @start_global_value = @@global.innodb_flush_neighbors;
SELECT @start_global_value;
@start_global_value
1
-Valid values are 'ON' and 'OFF'
-select @@global.innodb_flush_neighbors in (0, 1);
-@@global.innodb_flush_neighbors in (0, 1)
-1
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
@@ -13,79 +9,92 @@ select @@session.innodb_flush_neighbors;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable
show global variables like 'innodb_flush_neighbors';
Variable_name Value
-innodb_flush_neighbors ON
+innodb_flush_neighbors 1
show session variables like 'innodb_flush_neighbors';
Variable_name Value
-innodb_flush_neighbors ON
+innodb_flush_neighbors 1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
+INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
-set global innodb_flush_neighbors='OFF';
+INNODB_FLUSH_NEIGHBORS 1
+set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS OFF
+INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS OFF
-set @@global.innodb_flush_neighbors=1;
+INNODB_FLUSH_NEIGHBORS 0
+set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
+INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
+INNODB_FLUSH_NEIGHBORS 1
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
0
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS OFF
+INNODB_FLUSH_NEIGHBORS 0
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS OFF
-set @@global.innodb_flush_neighbors='ON';
+INNODB_FLUSH_NEIGHBORS 0
+set @@global.innodb_flush_neighbors=2;
+select @@global.innodb_flush_neighbors;
+@@global.innodb_flush_neighbors
+2
+select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_NEIGHBORS 2
+select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_NEIGHBORS 2
+set @@global.innodb_flush_neighbors=DEFAULT;
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
1
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
+INNODB_FLUSH_NEIGHBORS 1
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
-set session innodb_flush_neighbors='OFF';
+INNODB_FLUSH_NEIGHBORS 1
+set session innodb_flush_neighbors=0;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL
-set @@session.innodb_flush_neighbors='ON';
+set @@session.innodb_flush_neighbors=1;
ERROR HY000: Variable 'innodb_flush_neighbors' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_flush_neighbors='OFF';
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
+set global innodb_flush_neighbors='ON';
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
set global innodb_flush_neighbors=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
-set global innodb_flush_neighbors=2;
-ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '2'
+set global innodb_flush_neighbors=3;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flush_neighbors value: '3'
+select @@global.innodb_flush_neighbors;
+@@global.innodb_flush_neighbors
+2
set global innodb_flush_neighbors=-3;
-ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of '-3'
+Warnings:
+Warning 1292 Truncated incorrect innodb_flush_neighbors value: '-3'
select @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
-1
-select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
-select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_FLUSH_NEIGHBORS ON
+0
set global innodb_flush_neighbors='AUTO';
-ERROR 42000: Variable 'innodb_flush_neighbors' can't be set to the value of 'AUTO'
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_neighbors'
SET @@global.innodb_flush_neighbors = @start_global_value;
SELECT @@global.innodb_flush_neighbors;
@@global.innodb_flush_neighbors
diff --git a/mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result b/mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result
new file mode 100644
index 00000000000..caa41bd64ed
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result
@@ -0,0 +1,98 @@
+SET @global_start_value = @@global.innodb_flushing_avg_loops;
+SELECT @global_start_value;
+@global_start_value
+30
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_flushing_avg_loops = 1;
+SET @@global.innodb_flushing_avg_loops = DEFAULT;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+30
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_flushing_avg_loops = 1;
+ERROR HY000: Variable 'innodb_flushing_avg_loops' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_flushing_avg_loops;
+@@innodb_flushing_avg_loops
+30
+SELECT local.innodb_flushing_avg_loops;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_flushing_avg_loops = 1;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_flushing_avg_loops = 1;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = 60;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+60
+SET @@global.innodb_flushing_avg_loops = 1000;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1000
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_flushing_avg_loops = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '-1'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = 1001;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '1001'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1000
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_flushing_avg_loops =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+@@global.innodb_flushing_avg_loops =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1000
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+VARIABLE_VALUE
+1000
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_flushing_avg_loops = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1000
+SET @@global.innodb_flushing_avg_loops = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_flushing_avg_loops'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1000
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_flushing_avg_loops = TRUE;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = FALSE;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '0'
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+1
+SET @@global.innodb_flushing_avg_loops = @global_start_value;
+SELECT @@global.innodb_flushing_avg_loops;
+@@global.innodb_flushing_avg_loops
+30
diff --git a/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result
new file mode 100644
index 00000000000..5af00f21c74
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result
@@ -0,0 +1,33 @@
+select @@global.innodb_force_recovery_crash in (0, 1);
+@@global.innodb_force_recovery_crash in (0, 1)
+1
+select @@global.innodb_force_recovery_crash;
+@@global.innodb_force_recovery_crash
+0
+select @@session.innodb_force_recovery_crash;
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a GLOBAL variable
+show global variables like 'innodb_force_recovery_crash';
+Variable_name Value
+innodb_force_recovery_crash 0
+show session variables like 'innodb_force_recovery_crash';
+Variable_name Value
+innodb_force_recovery_crash 0
+select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FORCE_RECOVERY_CRASH 0
+select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FORCE_RECOVERY_CRASH 0
+set global innodb_force_recovery_crash=1;
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
+set global innodb_force_recovery_crash=0;
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
+select @@global.innodb_force_recovery_crash;
+@@global.innodb_force_recovery_crash
+0
+set session innodb_force_recovery_crash='some';
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
+set @@session.innodb_force_recovery_crash='some';
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
+set global innodb_force_recovery_crash='some';
+ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
index dc68ceed211..f50b6d4180c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result
@@ -1,20 +1,20 @@
select @@global.innodb_ft_cache_size;
@@global.innodb_ft_cache_size
-32000000
+8000000
select @@session.innodb_ft_cache_size;
ERROR HY000: Variable 'innodb_ft_cache_size' is a GLOBAL variable
show global variables like 'innodb_ft_cache_size';
Variable_name Value
-innodb_ft_cache_size 32000000
+innodb_ft_cache_size 8000000
show session variables like 'innodb_ft_cache_size';
Variable_name Value
-innodb_ft_cache_size 32000000
+innodb_ft_cache_size 8000000
select * from information_schema.global_variables where variable_name='innodb_ft_cache_size';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FT_CACHE_SIZE 32000000
+INNODB_FT_CACHE_SIZE 8000000
select * from information_schema.session_variables where variable_name='innodb_ft_cache_size';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FT_CACHE_SIZE 32000000
+INNODB_FT_CACHE_SIZE 8000000
set global innodb_ft_cache_size=1;
ERROR HY000: Variable 'innodb_ft_cache_size' is a read only variable
set session innodb_ft_cache_size=1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result
index a4af92591b3..5401e26d8a5 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_enable_diag_print_basic.result
@@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_ft_enable_diag_print;
SELECT @start_global_value;
@start_global_value
-1
+0
Valid values are 'ON' and 'OFF'
select @@global.innodb_ft_enable_diag_print in (0, 1);
@@global.innodb_ft_enable_diag_print in (0, 1)
1
select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
-1
+0
select @@session.innodb_ft_enable_diag_print;
ERROR HY000: Variable 'innodb_ft_enable_diag_print' is a GLOBAL variable
show global variables like 'innodb_ft_enable_diag_print';
Variable_name Value
-innodb_ft_enable_diag_print ON
+innodb_ft_enable_diag_print OFF
show session variables like 'innodb_ft_enable_diag_print';
Variable_name Value
-innodb_ft_enable_diag_print ON
+innodb_ft_enable_diag_print OFF
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FT_ENABLE_DIAG_PRINT ON
+INNODB_FT_ENABLE_DIAG_PRINT OFF
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FT_ENABLE_DIAG_PRINT ON
+INNODB_FT_ENABLE_DIAG_PRINT OFF
set global innodb_ft_enable_diag_print='OFF';
select @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_ft_enable_diag_print' can't be set to the value of
SET @@global.innodb_ft_enable_diag_print = @start_global_value;
SELECT @@global.innodb_ft_enable_diag_print;
@@global.innodb_ft_enable_diag_print
-1
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result b/mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result
new file mode 100644
index 00000000000..ebc934acf6e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_io_capacity_max_basic.result
@@ -0,0 +1,81 @@
+SET @start_innodb_max_capacity = @@global.innodb_io_capacity_max;
+SELECT @start_innodb_max_capacity;
+@start_innodb_max_capacity
+2000
+SET @start_innodb_capacity = @@global.innodb_io_capacity;
+SELECT @start_innodb_capacity;
+@start_innodb_capacity
+200
+Valid value 100 or more
+select @@global.innodb_io_capacity_max > 99;
+@@global.innodb_io_capacity_max > 99
+1
+select @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+2000
+select @@session.innodb_io_capacity_max;
+ERROR HY000: Variable 'innodb_io_capacity_max' is a GLOBAL variable
+show global variables like 'innodb_io_capacity_max';
+Variable_name Value
+innodb_io_capacity_max 2000
+show session variables like 'innodb_io_capacity_max';
+Variable_name Value
+innodb_io_capacity_max 2000
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 2000
+select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 2000
+set global innodb_io_capacity_max=@start_innodb_capacity + 1;
+select @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+201
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 201
+select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 201
+set session innodb_io_capacity_max=444;
+ERROR HY000: Variable 'innodb_io_capacity_max' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_io_capacity_max=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
+set global innodb_io_capacity_max=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
+set global innodb_io_capacity_max="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_io_capacity_max'
+set global innodb_io_capacity_max=@start_innodb_capacity - 1;
+Warnings:
+Warning 1210 innodb_io_capacity_max cannot be set lower than innodb_io_capacity.
+Warning 1210 Setting innodb_io_capacity_max to 200
+select @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+200
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 200
+set global innodb_io_capacity_max=-7;
+Warnings:
+Warning 1292 Truncated incorrect innodb_io_capacity_max value: '-7'
+Warning 1210 innodb_io_capacity_max cannot be set lower than innodb_io_capacity.
+Warning 1210 Setting innodb_io_capacity_max to 200
+select @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+200
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_IO_CAPACITY_MAX 200
+set global innodb_io_capacity=100;
+set global innodb_io_capacity_max=100;
+select @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+100
+SET @@global.innodb_io_capacity_max = @start_innodb_max_capacity;
+SELECT @@global.innodb_io_capacity_max;
+@@global.innodb_io_capacity_max
+2000
+SET @@global.innodb_io_capacity = @start_innodb_capacity;
+SELECT @@global.innodb_io_capacity;
+@@global.innodb_io_capacity
+200
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result
new file mode 100644
index 00000000000..82388cebc82
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result
@@ -0,0 +1,109 @@
+SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT @pct_lwm_start_value;
+@pct_lwm_start_value
+0
+SET @pct_start_value = @@global.innodb_max_dirty_pages_pct;
+SELECT @pct_start_value;
+@pct_start_value
+75
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
+SET @@global.innodb_max_dirty_pages_pct_lwm = DEFAULT;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_max_dirty_pages_pct_lwm = 1;
+ERROR HY000: Variable 'innodb_max_dirty_pages_pct_lwm' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_max_dirty_pages_pct_lwm;
+@@innodb_max_dirty_pages_pct_lwm
+0
+SELECT local.innodb_max_dirty_pages_pct_lwm;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_max_dirty_pages_pct_lwm = 0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct_lwm value: '-1'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+SET @@global.innodb_max_dirty_pages_pct_lwm = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+SET @@global.innodb_max_dirty_pages_pct_lwm = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value + 1;
+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 75
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct_lwm value: '100'
+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 75
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+'#----------------------FN_DYNVARS_046_05------------------------#'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+@@global.innodb_max_dirty_pages_pct_lwm =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+VARIABLE_VALUE
+75
+'#---------------------FN_DYNVARS_046_06-------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+SET @@global.innodb_max_dirty_pages_pct_lwm = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct_lwm'
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+75
+'#---------------------FN_DYNVARS_046_07----------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = TRUE;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+1
+SET @@global.innodb_max_dirty_pages_pct_lwm = FALSE;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
+SET @@global.innodb_max_dirty_pages_pct = @pct_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+75
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
index 8bb508c877e..7a7c0a6b6a2 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
@@ -25,14 +25,15 @@ buffer_pool_size disabled
buffer_pool_reads disabled
buffer_pool_read_requests disabled
buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
buffer_pool_wait_free disabled
buffer_pool_read_ahead disabled
buffer_pool_read_ahead_evicted disabled
buffer_pool_pages_total disabled
buffer_pool_pages_misc disabled
buffer_pool_pages_data disabled
+buffer_pool_bytes_data disabled
buffer_pool_pages_dirty disabled
+buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
@@ -48,15 +49,15 @@ buffer_flush_batch_pages disabled
buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
+buffer_flush_n_to_flush_requested disabled
+buffer_flush_avg_page_rate disabled
+buffer_flush_lsn_avg_rate disabled
+buffer_flush_pct_for_dirty disabled
+buffer_flush_pct_for_lsn disabled
+buffer_flush_sync_waits disabled
buffer_flush_adaptive_total_pages disabled
buffer_flush_adaptive disabled
buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
buffer_flush_sync_total_pages disabled
buffer_flush_sync disabled
buffer_flush_sync_pages disabled
@@ -156,6 +157,8 @@ log_write_requests disabled
log_writes disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
+compression_pad_increments disabled
+compression_pad_decrements disabled
index_splits disabled
index_merges disabled
adaptive_hash_searches disabled
@@ -199,657 +202,29 @@ dml_reads disabled
dml_inserts disabled
dml_deletes disabled
dml_updates disabled
+ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
+ddl_online_create_index disabled
+ddl_pending_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
set global innodb_monitor_enable = all;
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_reset_all = all;
-select name, count, status from information_schema.innodb_metrics;
-name count status
-metadata_table_handles_opened 0 disabled
-metadata_table_handles_closed 0 disabled
-metadata_table_reference_count 0 disabled
-metadata_mem_pool_size 0 disabled
-lock_deadlocks 0 disabled
-lock_timeouts 0 disabled
-lock_rec_lock_waits 0 disabled
-lock_table_lock_waits 0 disabled
-lock_rec_lock_requests 0 disabled
-lock_rec_lock_created 0 disabled
-lock_rec_lock_removed 0 disabled
-lock_rec_locks 0 disabled
-lock_table_lock_created 0 disabled
-lock_table_lock_removed 0 disabled
-lock_table_locks 0 disabled
-lock_row_lock_current_waits 0 disabled
-lock_row_lock_time 0 disabled
-lock_row_lock_time_max 0 disabled
-lock_row_lock_waits 0 disabled
-lock_row_lock_time_avg 0 disabled
-buffer_pool_size 0 disabled
-buffer_pool_reads 0 disabled
-buffer_pool_read_requests 0 disabled
-buffer_pool_write_requests 0 disabled
-buffer_pool_pages_in_flush 0 disabled
-buffer_pool_wait_free 0 disabled
-buffer_pool_read_ahead 0 disabled
-buffer_pool_read_ahead_evicted 0 disabled
-buffer_pool_pages_total 0 disabled
-buffer_pool_pages_misc 0 disabled
-buffer_pool_pages_data 0 disabled
-buffer_pool_pages_dirty 0 disabled
-buffer_pool_pages_free 0 disabled
-buffer_pages_created 0 disabled
-buffer_pages_written 0 disabled
-buffer_pages_read 0 disabled
-buffer_data_reads 0 disabled
-buffer_data_written 0 disabled
-buffer_flush_batch_scanned 0 disabled
-buffer_flush_batch_num_scan 0 disabled
-buffer_flush_batch_scanned_per_call 0 disabled
-buffer_flush_batch_total_pages 0 disabled
-buffer_flush_batches 0 disabled
-buffer_flush_batch_pages 0 disabled
-buffer_flush_neighbor_total_pages 0 disabled
-buffer_flush_neighbor 0 disabled
-buffer_flush_neighbor_pages 0 disabled
-buffer_flush_max_dirty_total_pages 0 disabled
-buffer_flush_max_dirty 0 disabled
-buffer_flush_max_dirty_pages 0 disabled
-buffer_flush_adaptive_total_pages 0 disabled
-buffer_flush_adaptive 0 disabled
-buffer_flush_adaptive_pages 0 disabled
-buffer_flush_async_total_pages 0 disabled
-buffer_flush_async 0 disabled
-buffer_flush_async_pages 0 disabled
-buffer_flush_sync_total_pages 0 disabled
-buffer_flush_sync 0 disabled
-buffer_flush_sync_pages 0 disabled
-buffer_flush_background_total_pages 0 disabled
-buffer_flush_background 0 disabled
-buffer_flush_background_pages 0 disabled
-buffer_LRU_batch_scanned 0 disabled
-buffer_LRU_batch_num_scan 0 disabled
-buffer_LRU_batch_scanned_per_call 0 disabled
-buffer_LRU_batch_total_pages 0 disabled
-buffer_LRU_batches 0 disabled
-buffer_LRU_batch_pages 0 disabled
-buffer_LRU_single_flush_scanned 0 disabled
-buffer_LRU_single_flush_num_scan 0 disabled
-buffer_LRU_single_flush_scanned_per_call 0 disabled
-buffer_LRU_single_flush_failure_count 0 disabled
-buffer_LRU_get_free_search 0 disabled
-buffer_LRU_search_scanned 0 disabled
-buffer_LRU_search_num_scan 0 disabled
-buffer_LRU_search_scanned_per_call 0 disabled
-buffer_LRU_unzip_search_scanned 0 disabled
-buffer_LRU_unzip_search_num_scan 0 disabled
-buffer_LRU_unzip_search_scanned_per_call 0 disabled
-buffer_page_read_index_leaf 0 disabled
-buffer_page_read_index_non_leaf 0 disabled
-buffer_page_read_index_ibuf_leaf 0 disabled
-buffer_page_read_index_ibuf_non_leaf 0 disabled
-buffer_page_read_undo_log 0 disabled
-buffer_page_read_index_inode 0 disabled
-buffer_page_read_ibuf_free_list 0 disabled
-buffer_page_read_ibuf_bitmap 0 disabled
-buffer_page_read_system_page 0 disabled
-buffer_page_read_trx_system 0 disabled
-buffer_page_read_fsp_hdr 0 disabled
-buffer_page_read_xdes 0 disabled
-buffer_page_read_blob 0 disabled
-buffer_page_read_zblob 0 disabled
-buffer_page_read_zblob2 0 disabled
-buffer_page_read_other 0 disabled
-buffer_page_written_index_leaf 0 disabled
-buffer_page_written_index_non_leaf 0 disabled
-buffer_page_written_index_ibuf_leaf 0 disabled
-buffer_page_written_index_ibuf_non_leaf 0 disabled
-buffer_page_written_undo_log 0 disabled
-buffer_page_written_index_inode 0 disabled
-buffer_page_written_ibuf_free_list 0 disabled
-buffer_page_written_ibuf_bitmap 0 disabled
-buffer_page_written_system_page 0 disabled
-buffer_page_written_trx_system 0 disabled
-buffer_page_written_fsp_hdr 0 disabled
-buffer_page_written_xdes 0 disabled
-buffer_page_written_blob 0 disabled
-buffer_page_written_zblob 0 disabled
-buffer_page_written_zblob2 0 disabled
-buffer_page_written_other 0 disabled
-os_data_reads 0 disabled
-os_data_writes 0 disabled
-os_data_fsyncs 0 disabled
-os_pending_reads 0 disabled
-os_pending_writes 0 disabled
-os_log_bytes_written 0 disabled
-os_log_fsyncs 0 disabled
-os_log_pending_fsyncs 0 disabled
-os_log_pending_writes 0 disabled
-trx_rw_commits 0 disabled
-trx_ro_commits 0 disabled
-trx_nl_ro_commits 0 disabled
-trx_commits_insert_update 0 disabled
-trx_rollbacks 0 disabled
-trx_rollbacks_savepoint 0 disabled
-trx_rollback_active 0 disabled
-trx_active_transactions 0 disabled
-trx_rseg_history_len 0 disabled
-trx_undo_slots_used 0 disabled
-trx_undo_slots_cached 0 disabled
-trx_rseg_current_size 0 disabled
-purge_del_mark_records 0 disabled
-purge_upd_exist_or_extern_records 0 disabled
-purge_invoked 0 disabled
-purge_undo_log_pages 0 disabled
-purge_dml_delay_usec 0 disabled
-purge_stop_count 0 disabled
-purge_resume_count 0 disabled
-log_checkpoints 0 disabled
-log_lsn_last_flush 0 disabled
-log_lsn_last_checkpoint 0 disabled
-log_lsn_current 0 disabled
-log_lsn_checkpoint_age 0 disabled
-log_lsn_buf_pool_oldest 0 disabled
-log_max_modified_age_async 0 disabled
-log_max_modified_age_sync 0 disabled
-log_pending_log_writes 0 disabled
-log_pending_checkpoint_writes 0 disabled
-log_num_log_io 0 disabled
-log_waits 0 disabled
-log_write_requests 0 disabled
-log_writes 0 disabled
-compress_pages_compressed 0 disabled
-compress_pages_decompressed 0 disabled
-index_splits 0 disabled
-index_merges 0 disabled
-adaptive_hash_searches 0 disabled
-adaptive_hash_searches_btree 0 disabled
-adaptive_hash_pages_added 0 disabled
-adaptive_hash_pages_removed 0 disabled
-adaptive_hash_rows_added 0 disabled
-adaptive_hash_rows_removed 0 disabled
-adaptive_hash_rows_deleted_no_hash_entry 0 disabled
-adaptive_hash_rows_updated 0 disabled
-file_num_open_files 0 disabled
-ibuf_merges_insert 0 disabled
-ibuf_merges_delete_mark 0 disabled
-ibuf_merges_delete 0 disabled
-ibuf_merges_discard_insert 0 disabled
-ibuf_merges_discard_delete_mark 0 disabled
-ibuf_merges_discard_delete 0 disabled
-ibuf_merges 0 disabled
-ibuf_size 0 disabled
-innodb_master_thread_sleeps 0 disabled
-innodb_activity_count 0 disabled
-innodb_master_active_loops 0 disabled
-innodb_master_idle_loops 0 disabled
-innodb_background_drop_table_usec 0 disabled
-innodb_ibuf_merge_usec 0 disabled
-innodb_log_flush_usec 0 disabled
-innodb_mem_validate_usec 0 disabled
-innodb_master_purge_usec 0 disabled
-innodb_dict_lru_usec 0 disabled
-innodb_checkpoint_usec 0 disabled
-innodb_dblwr_writes 0 disabled
-innodb_dblwr_pages_written 0 disabled
-innodb_page_size 0 disabled
-innodb_rwlock_s_spin_waits 0 disabled
-innodb_rwlock_x_spin_waits 0 disabled
-innodb_rwlock_s_spin_rounds 0 disabled
-innodb_rwlock_x_spin_rounds 0 disabled
-innodb_rwlock_s_os_waits 0 disabled
-innodb_rwlock_x_os_waits 0 disabled
-dml_reads 0 disabled
-dml_inserts 0 disabled
-dml_deletes 0 disabled
-dml_updates 0 disabled
-ddl_background_drop_tables 0 disabled
-icp_attempts 0 disabled
-icp_no_match 0 disabled
-icp_out_of_range 0 disabled
-icp_match 0 disabled
+select name from information_schema.innodb_metrics where count!=0;
+name
set global innodb_monitor_enable = "%lock%";
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
-name status
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
+name
set global innodb_monitor_disable = "%lock%";
select name, status from information_schema.innodb_metrics
where name like "%lock%";
@@ -879,1035 +254,21 @@ innodb_rwlock_x_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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
+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
@@ -1989,7 +350,7 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
col
select name, max_count, min_count, count,
@@ -2146,7 +507,7 @@ max_count_reset, min_count_reset, count_reset, 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
-file_num_open_files 3 3 3 3 3 3 enabled
+file_num_open_files # # # # # # enabled
set global innodb_monitor_disable = file_num_open_files;
set global innodb_monitor_enable = "icp%";
create table monitor_test(a char(3), b int, c char(2),
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
index 8bb508c877e..7a7c0a6b6a2 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
@@ -25,14 +25,15 @@ buffer_pool_size disabled
buffer_pool_reads disabled
buffer_pool_read_requests disabled
buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
buffer_pool_wait_free disabled
buffer_pool_read_ahead disabled
buffer_pool_read_ahead_evicted disabled
buffer_pool_pages_total disabled
buffer_pool_pages_misc disabled
buffer_pool_pages_data disabled
+buffer_pool_bytes_data disabled
buffer_pool_pages_dirty disabled
+buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
@@ -48,15 +49,15 @@ buffer_flush_batch_pages disabled
buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
+buffer_flush_n_to_flush_requested disabled
+buffer_flush_avg_page_rate disabled
+buffer_flush_lsn_avg_rate disabled
+buffer_flush_pct_for_dirty disabled
+buffer_flush_pct_for_lsn disabled
+buffer_flush_sync_waits disabled
buffer_flush_adaptive_total_pages disabled
buffer_flush_adaptive disabled
buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
buffer_flush_sync_total_pages disabled
buffer_flush_sync disabled
buffer_flush_sync_pages disabled
@@ -156,6 +157,8 @@ log_write_requests disabled
log_writes disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
+compression_pad_increments disabled
+compression_pad_decrements disabled
index_splits disabled
index_merges disabled
adaptive_hash_searches disabled
@@ -199,657 +202,29 @@ dml_reads disabled
dml_inserts disabled
dml_deletes disabled
dml_updates disabled
+ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
+ddl_online_create_index disabled
+ddl_pending_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
set global innodb_monitor_enable = all;
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_reset_all = all;
-select name, count, status from information_schema.innodb_metrics;
-name count status
-metadata_table_handles_opened 0 disabled
-metadata_table_handles_closed 0 disabled
-metadata_table_reference_count 0 disabled
-metadata_mem_pool_size 0 disabled
-lock_deadlocks 0 disabled
-lock_timeouts 0 disabled
-lock_rec_lock_waits 0 disabled
-lock_table_lock_waits 0 disabled
-lock_rec_lock_requests 0 disabled
-lock_rec_lock_created 0 disabled
-lock_rec_lock_removed 0 disabled
-lock_rec_locks 0 disabled
-lock_table_lock_created 0 disabled
-lock_table_lock_removed 0 disabled
-lock_table_locks 0 disabled
-lock_row_lock_current_waits 0 disabled
-lock_row_lock_time 0 disabled
-lock_row_lock_time_max 0 disabled
-lock_row_lock_waits 0 disabled
-lock_row_lock_time_avg 0 disabled
-buffer_pool_size 0 disabled
-buffer_pool_reads 0 disabled
-buffer_pool_read_requests 0 disabled
-buffer_pool_write_requests 0 disabled
-buffer_pool_pages_in_flush 0 disabled
-buffer_pool_wait_free 0 disabled
-buffer_pool_read_ahead 0 disabled
-buffer_pool_read_ahead_evicted 0 disabled
-buffer_pool_pages_total 0 disabled
-buffer_pool_pages_misc 0 disabled
-buffer_pool_pages_data 0 disabled
-buffer_pool_pages_dirty 0 disabled
-buffer_pool_pages_free 0 disabled
-buffer_pages_created 0 disabled
-buffer_pages_written 0 disabled
-buffer_pages_read 0 disabled
-buffer_data_reads 0 disabled
-buffer_data_written 0 disabled
-buffer_flush_batch_scanned 0 disabled
-buffer_flush_batch_num_scan 0 disabled
-buffer_flush_batch_scanned_per_call 0 disabled
-buffer_flush_batch_total_pages 0 disabled
-buffer_flush_batches 0 disabled
-buffer_flush_batch_pages 0 disabled
-buffer_flush_neighbor_total_pages 0 disabled
-buffer_flush_neighbor 0 disabled
-buffer_flush_neighbor_pages 0 disabled
-buffer_flush_max_dirty_total_pages 0 disabled
-buffer_flush_max_dirty 0 disabled
-buffer_flush_max_dirty_pages 0 disabled
-buffer_flush_adaptive_total_pages 0 disabled
-buffer_flush_adaptive 0 disabled
-buffer_flush_adaptive_pages 0 disabled
-buffer_flush_async_total_pages 0 disabled
-buffer_flush_async 0 disabled
-buffer_flush_async_pages 0 disabled
-buffer_flush_sync_total_pages 0 disabled
-buffer_flush_sync 0 disabled
-buffer_flush_sync_pages 0 disabled
-buffer_flush_background_total_pages 0 disabled
-buffer_flush_background 0 disabled
-buffer_flush_background_pages 0 disabled
-buffer_LRU_batch_scanned 0 disabled
-buffer_LRU_batch_num_scan 0 disabled
-buffer_LRU_batch_scanned_per_call 0 disabled
-buffer_LRU_batch_total_pages 0 disabled
-buffer_LRU_batches 0 disabled
-buffer_LRU_batch_pages 0 disabled
-buffer_LRU_single_flush_scanned 0 disabled
-buffer_LRU_single_flush_num_scan 0 disabled
-buffer_LRU_single_flush_scanned_per_call 0 disabled
-buffer_LRU_single_flush_failure_count 0 disabled
-buffer_LRU_get_free_search 0 disabled
-buffer_LRU_search_scanned 0 disabled
-buffer_LRU_search_num_scan 0 disabled
-buffer_LRU_search_scanned_per_call 0 disabled
-buffer_LRU_unzip_search_scanned 0 disabled
-buffer_LRU_unzip_search_num_scan 0 disabled
-buffer_LRU_unzip_search_scanned_per_call 0 disabled
-buffer_page_read_index_leaf 0 disabled
-buffer_page_read_index_non_leaf 0 disabled
-buffer_page_read_index_ibuf_leaf 0 disabled
-buffer_page_read_index_ibuf_non_leaf 0 disabled
-buffer_page_read_undo_log 0 disabled
-buffer_page_read_index_inode 0 disabled
-buffer_page_read_ibuf_free_list 0 disabled
-buffer_page_read_ibuf_bitmap 0 disabled
-buffer_page_read_system_page 0 disabled
-buffer_page_read_trx_system 0 disabled
-buffer_page_read_fsp_hdr 0 disabled
-buffer_page_read_xdes 0 disabled
-buffer_page_read_blob 0 disabled
-buffer_page_read_zblob 0 disabled
-buffer_page_read_zblob2 0 disabled
-buffer_page_read_other 0 disabled
-buffer_page_written_index_leaf 0 disabled
-buffer_page_written_index_non_leaf 0 disabled
-buffer_page_written_index_ibuf_leaf 0 disabled
-buffer_page_written_index_ibuf_non_leaf 0 disabled
-buffer_page_written_undo_log 0 disabled
-buffer_page_written_index_inode 0 disabled
-buffer_page_written_ibuf_free_list 0 disabled
-buffer_page_written_ibuf_bitmap 0 disabled
-buffer_page_written_system_page 0 disabled
-buffer_page_written_trx_system 0 disabled
-buffer_page_written_fsp_hdr 0 disabled
-buffer_page_written_xdes 0 disabled
-buffer_page_written_blob 0 disabled
-buffer_page_written_zblob 0 disabled
-buffer_page_written_zblob2 0 disabled
-buffer_page_written_other 0 disabled
-os_data_reads 0 disabled
-os_data_writes 0 disabled
-os_data_fsyncs 0 disabled
-os_pending_reads 0 disabled
-os_pending_writes 0 disabled
-os_log_bytes_written 0 disabled
-os_log_fsyncs 0 disabled
-os_log_pending_fsyncs 0 disabled
-os_log_pending_writes 0 disabled
-trx_rw_commits 0 disabled
-trx_ro_commits 0 disabled
-trx_nl_ro_commits 0 disabled
-trx_commits_insert_update 0 disabled
-trx_rollbacks 0 disabled
-trx_rollbacks_savepoint 0 disabled
-trx_rollback_active 0 disabled
-trx_active_transactions 0 disabled
-trx_rseg_history_len 0 disabled
-trx_undo_slots_used 0 disabled
-trx_undo_slots_cached 0 disabled
-trx_rseg_current_size 0 disabled
-purge_del_mark_records 0 disabled
-purge_upd_exist_or_extern_records 0 disabled
-purge_invoked 0 disabled
-purge_undo_log_pages 0 disabled
-purge_dml_delay_usec 0 disabled
-purge_stop_count 0 disabled
-purge_resume_count 0 disabled
-log_checkpoints 0 disabled
-log_lsn_last_flush 0 disabled
-log_lsn_last_checkpoint 0 disabled
-log_lsn_current 0 disabled
-log_lsn_checkpoint_age 0 disabled
-log_lsn_buf_pool_oldest 0 disabled
-log_max_modified_age_async 0 disabled
-log_max_modified_age_sync 0 disabled
-log_pending_log_writes 0 disabled
-log_pending_checkpoint_writes 0 disabled
-log_num_log_io 0 disabled
-log_waits 0 disabled
-log_write_requests 0 disabled
-log_writes 0 disabled
-compress_pages_compressed 0 disabled
-compress_pages_decompressed 0 disabled
-index_splits 0 disabled
-index_merges 0 disabled
-adaptive_hash_searches 0 disabled
-adaptive_hash_searches_btree 0 disabled
-adaptive_hash_pages_added 0 disabled
-adaptive_hash_pages_removed 0 disabled
-adaptive_hash_rows_added 0 disabled
-adaptive_hash_rows_removed 0 disabled
-adaptive_hash_rows_deleted_no_hash_entry 0 disabled
-adaptive_hash_rows_updated 0 disabled
-file_num_open_files 0 disabled
-ibuf_merges_insert 0 disabled
-ibuf_merges_delete_mark 0 disabled
-ibuf_merges_delete 0 disabled
-ibuf_merges_discard_insert 0 disabled
-ibuf_merges_discard_delete_mark 0 disabled
-ibuf_merges_discard_delete 0 disabled
-ibuf_merges 0 disabled
-ibuf_size 0 disabled
-innodb_master_thread_sleeps 0 disabled
-innodb_activity_count 0 disabled
-innodb_master_active_loops 0 disabled
-innodb_master_idle_loops 0 disabled
-innodb_background_drop_table_usec 0 disabled
-innodb_ibuf_merge_usec 0 disabled
-innodb_log_flush_usec 0 disabled
-innodb_mem_validate_usec 0 disabled
-innodb_master_purge_usec 0 disabled
-innodb_dict_lru_usec 0 disabled
-innodb_checkpoint_usec 0 disabled
-innodb_dblwr_writes 0 disabled
-innodb_dblwr_pages_written 0 disabled
-innodb_page_size 0 disabled
-innodb_rwlock_s_spin_waits 0 disabled
-innodb_rwlock_x_spin_waits 0 disabled
-innodb_rwlock_s_spin_rounds 0 disabled
-innodb_rwlock_x_spin_rounds 0 disabled
-innodb_rwlock_s_os_waits 0 disabled
-innodb_rwlock_x_os_waits 0 disabled
-dml_reads 0 disabled
-dml_inserts 0 disabled
-dml_deletes 0 disabled
-dml_updates 0 disabled
-ddl_background_drop_tables 0 disabled
-icp_attempts 0 disabled
-icp_no_match 0 disabled
-icp_out_of_range 0 disabled
-icp_match 0 disabled
+select name from information_schema.innodb_metrics where count!=0;
+name
set global innodb_monitor_enable = "%lock%";
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
-name status
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
+name
set global innodb_monitor_disable = "%lock%";
select name, status from information_schema.innodb_metrics
where name like "%lock%";
@@ -879,1035 +254,21 @@ innodb_rwlock_x_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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
+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
@@ -1989,7 +350,7 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
col
select name, max_count, min_count, count,
@@ -2146,7 +507,7 @@ max_count_reset, min_count_reset, count_reset, 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
-file_num_open_files 3 3 3 3 3 3 enabled
+file_num_open_files # # # # # # enabled
set global innodb_monitor_disable = file_num_open_files;
set global innodb_monitor_enable = "icp%";
create table monitor_test(a char(3), b int, c char(2),
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
index 8bb508c877e..7a7c0a6b6a2 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
@@ -25,14 +25,15 @@ buffer_pool_size disabled
buffer_pool_reads disabled
buffer_pool_read_requests disabled
buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
buffer_pool_wait_free disabled
buffer_pool_read_ahead disabled
buffer_pool_read_ahead_evicted disabled
buffer_pool_pages_total disabled
buffer_pool_pages_misc disabled
buffer_pool_pages_data disabled
+buffer_pool_bytes_data disabled
buffer_pool_pages_dirty disabled
+buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
@@ -48,15 +49,15 @@ buffer_flush_batch_pages disabled
buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
+buffer_flush_n_to_flush_requested disabled
+buffer_flush_avg_page_rate disabled
+buffer_flush_lsn_avg_rate disabled
+buffer_flush_pct_for_dirty disabled
+buffer_flush_pct_for_lsn disabled
+buffer_flush_sync_waits disabled
buffer_flush_adaptive_total_pages disabled
buffer_flush_adaptive disabled
buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
buffer_flush_sync_total_pages disabled
buffer_flush_sync disabled
buffer_flush_sync_pages disabled
@@ -156,6 +157,8 @@ log_write_requests disabled
log_writes disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
+compression_pad_increments disabled
+compression_pad_decrements disabled
index_splits disabled
index_merges disabled
adaptive_hash_searches disabled
@@ -199,657 +202,29 @@ dml_reads disabled
dml_inserts disabled
dml_deletes disabled
dml_updates disabled
+ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
+ddl_online_create_index disabled
+ddl_pending_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
set global innodb_monitor_enable = all;
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_reset_all = all;
-select name, count, status from information_schema.innodb_metrics;
-name count status
-metadata_table_handles_opened 0 disabled
-metadata_table_handles_closed 0 disabled
-metadata_table_reference_count 0 disabled
-metadata_mem_pool_size 0 disabled
-lock_deadlocks 0 disabled
-lock_timeouts 0 disabled
-lock_rec_lock_waits 0 disabled
-lock_table_lock_waits 0 disabled
-lock_rec_lock_requests 0 disabled
-lock_rec_lock_created 0 disabled
-lock_rec_lock_removed 0 disabled
-lock_rec_locks 0 disabled
-lock_table_lock_created 0 disabled
-lock_table_lock_removed 0 disabled
-lock_table_locks 0 disabled
-lock_row_lock_current_waits 0 disabled
-lock_row_lock_time 0 disabled
-lock_row_lock_time_max 0 disabled
-lock_row_lock_waits 0 disabled
-lock_row_lock_time_avg 0 disabled
-buffer_pool_size 0 disabled
-buffer_pool_reads 0 disabled
-buffer_pool_read_requests 0 disabled
-buffer_pool_write_requests 0 disabled
-buffer_pool_pages_in_flush 0 disabled
-buffer_pool_wait_free 0 disabled
-buffer_pool_read_ahead 0 disabled
-buffer_pool_read_ahead_evicted 0 disabled
-buffer_pool_pages_total 0 disabled
-buffer_pool_pages_misc 0 disabled
-buffer_pool_pages_data 0 disabled
-buffer_pool_pages_dirty 0 disabled
-buffer_pool_pages_free 0 disabled
-buffer_pages_created 0 disabled
-buffer_pages_written 0 disabled
-buffer_pages_read 0 disabled
-buffer_data_reads 0 disabled
-buffer_data_written 0 disabled
-buffer_flush_batch_scanned 0 disabled
-buffer_flush_batch_num_scan 0 disabled
-buffer_flush_batch_scanned_per_call 0 disabled
-buffer_flush_batch_total_pages 0 disabled
-buffer_flush_batches 0 disabled
-buffer_flush_batch_pages 0 disabled
-buffer_flush_neighbor_total_pages 0 disabled
-buffer_flush_neighbor 0 disabled
-buffer_flush_neighbor_pages 0 disabled
-buffer_flush_max_dirty_total_pages 0 disabled
-buffer_flush_max_dirty 0 disabled
-buffer_flush_max_dirty_pages 0 disabled
-buffer_flush_adaptive_total_pages 0 disabled
-buffer_flush_adaptive 0 disabled
-buffer_flush_adaptive_pages 0 disabled
-buffer_flush_async_total_pages 0 disabled
-buffer_flush_async 0 disabled
-buffer_flush_async_pages 0 disabled
-buffer_flush_sync_total_pages 0 disabled
-buffer_flush_sync 0 disabled
-buffer_flush_sync_pages 0 disabled
-buffer_flush_background_total_pages 0 disabled
-buffer_flush_background 0 disabled
-buffer_flush_background_pages 0 disabled
-buffer_LRU_batch_scanned 0 disabled
-buffer_LRU_batch_num_scan 0 disabled
-buffer_LRU_batch_scanned_per_call 0 disabled
-buffer_LRU_batch_total_pages 0 disabled
-buffer_LRU_batches 0 disabled
-buffer_LRU_batch_pages 0 disabled
-buffer_LRU_single_flush_scanned 0 disabled
-buffer_LRU_single_flush_num_scan 0 disabled
-buffer_LRU_single_flush_scanned_per_call 0 disabled
-buffer_LRU_single_flush_failure_count 0 disabled
-buffer_LRU_get_free_search 0 disabled
-buffer_LRU_search_scanned 0 disabled
-buffer_LRU_search_num_scan 0 disabled
-buffer_LRU_search_scanned_per_call 0 disabled
-buffer_LRU_unzip_search_scanned 0 disabled
-buffer_LRU_unzip_search_num_scan 0 disabled
-buffer_LRU_unzip_search_scanned_per_call 0 disabled
-buffer_page_read_index_leaf 0 disabled
-buffer_page_read_index_non_leaf 0 disabled
-buffer_page_read_index_ibuf_leaf 0 disabled
-buffer_page_read_index_ibuf_non_leaf 0 disabled
-buffer_page_read_undo_log 0 disabled
-buffer_page_read_index_inode 0 disabled
-buffer_page_read_ibuf_free_list 0 disabled
-buffer_page_read_ibuf_bitmap 0 disabled
-buffer_page_read_system_page 0 disabled
-buffer_page_read_trx_system 0 disabled
-buffer_page_read_fsp_hdr 0 disabled
-buffer_page_read_xdes 0 disabled
-buffer_page_read_blob 0 disabled
-buffer_page_read_zblob 0 disabled
-buffer_page_read_zblob2 0 disabled
-buffer_page_read_other 0 disabled
-buffer_page_written_index_leaf 0 disabled
-buffer_page_written_index_non_leaf 0 disabled
-buffer_page_written_index_ibuf_leaf 0 disabled
-buffer_page_written_index_ibuf_non_leaf 0 disabled
-buffer_page_written_undo_log 0 disabled
-buffer_page_written_index_inode 0 disabled
-buffer_page_written_ibuf_free_list 0 disabled
-buffer_page_written_ibuf_bitmap 0 disabled
-buffer_page_written_system_page 0 disabled
-buffer_page_written_trx_system 0 disabled
-buffer_page_written_fsp_hdr 0 disabled
-buffer_page_written_xdes 0 disabled
-buffer_page_written_blob 0 disabled
-buffer_page_written_zblob 0 disabled
-buffer_page_written_zblob2 0 disabled
-buffer_page_written_other 0 disabled
-os_data_reads 0 disabled
-os_data_writes 0 disabled
-os_data_fsyncs 0 disabled
-os_pending_reads 0 disabled
-os_pending_writes 0 disabled
-os_log_bytes_written 0 disabled
-os_log_fsyncs 0 disabled
-os_log_pending_fsyncs 0 disabled
-os_log_pending_writes 0 disabled
-trx_rw_commits 0 disabled
-trx_ro_commits 0 disabled
-trx_nl_ro_commits 0 disabled
-trx_commits_insert_update 0 disabled
-trx_rollbacks 0 disabled
-trx_rollbacks_savepoint 0 disabled
-trx_rollback_active 0 disabled
-trx_active_transactions 0 disabled
-trx_rseg_history_len 0 disabled
-trx_undo_slots_used 0 disabled
-trx_undo_slots_cached 0 disabled
-trx_rseg_current_size 0 disabled
-purge_del_mark_records 0 disabled
-purge_upd_exist_or_extern_records 0 disabled
-purge_invoked 0 disabled
-purge_undo_log_pages 0 disabled
-purge_dml_delay_usec 0 disabled
-purge_stop_count 0 disabled
-purge_resume_count 0 disabled
-log_checkpoints 0 disabled
-log_lsn_last_flush 0 disabled
-log_lsn_last_checkpoint 0 disabled
-log_lsn_current 0 disabled
-log_lsn_checkpoint_age 0 disabled
-log_lsn_buf_pool_oldest 0 disabled
-log_max_modified_age_async 0 disabled
-log_max_modified_age_sync 0 disabled
-log_pending_log_writes 0 disabled
-log_pending_checkpoint_writes 0 disabled
-log_num_log_io 0 disabled
-log_waits 0 disabled
-log_write_requests 0 disabled
-log_writes 0 disabled
-compress_pages_compressed 0 disabled
-compress_pages_decompressed 0 disabled
-index_splits 0 disabled
-index_merges 0 disabled
-adaptive_hash_searches 0 disabled
-adaptive_hash_searches_btree 0 disabled
-adaptive_hash_pages_added 0 disabled
-adaptive_hash_pages_removed 0 disabled
-adaptive_hash_rows_added 0 disabled
-adaptive_hash_rows_removed 0 disabled
-adaptive_hash_rows_deleted_no_hash_entry 0 disabled
-adaptive_hash_rows_updated 0 disabled
-file_num_open_files 0 disabled
-ibuf_merges_insert 0 disabled
-ibuf_merges_delete_mark 0 disabled
-ibuf_merges_delete 0 disabled
-ibuf_merges_discard_insert 0 disabled
-ibuf_merges_discard_delete_mark 0 disabled
-ibuf_merges_discard_delete 0 disabled
-ibuf_merges 0 disabled
-ibuf_size 0 disabled
-innodb_master_thread_sleeps 0 disabled
-innodb_activity_count 0 disabled
-innodb_master_active_loops 0 disabled
-innodb_master_idle_loops 0 disabled
-innodb_background_drop_table_usec 0 disabled
-innodb_ibuf_merge_usec 0 disabled
-innodb_log_flush_usec 0 disabled
-innodb_mem_validate_usec 0 disabled
-innodb_master_purge_usec 0 disabled
-innodb_dict_lru_usec 0 disabled
-innodb_checkpoint_usec 0 disabled
-innodb_dblwr_writes 0 disabled
-innodb_dblwr_pages_written 0 disabled
-innodb_page_size 0 disabled
-innodb_rwlock_s_spin_waits 0 disabled
-innodb_rwlock_x_spin_waits 0 disabled
-innodb_rwlock_s_spin_rounds 0 disabled
-innodb_rwlock_x_spin_rounds 0 disabled
-innodb_rwlock_s_os_waits 0 disabled
-innodb_rwlock_x_os_waits 0 disabled
-dml_reads 0 disabled
-dml_inserts 0 disabled
-dml_deletes 0 disabled
-dml_updates 0 disabled
-ddl_background_drop_tables 0 disabled
-icp_attempts 0 disabled
-icp_no_match 0 disabled
-icp_out_of_range 0 disabled
-icp_match 0 disabled
+select name from information_schema.innodb_metrics where count!=0;
+name
set global innodb_monitor_enable = "%lock%";
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
-name status
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
+name
set global innodb_monitor_disable = "%lock%";
select name, status from information_schema.innodb_metrics
where name like "%lock%";
@@ -879,1035 +254,21 @@ innodb_rwlock_x_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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
+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
@@ -1989,7 +350,7 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
col
select name, max_count, min_count, count,
@@ -2146,7 +507,7 @@ max_count_reset, min_count_reset, count_reset, 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
-file_num_open_files 3 3 3 3 3 3 enabled
+file_num_open_files # # # # # # enabled
set global innodb_monitor_disable = file_num_open_files;
set global innodb_monitor_enable = "icp%";
create table monitor_test(a char(3), b int, c char(2),
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
index 8bb508c877e..7a7c0a6b6a2 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
@@ -25,14 +25,15 @@ buffer_pool_size disabled
buffer_pool_reads disabled
buffer_pool_read_requests disabled
buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
buffer_pool_wait_free disabled
buffer_pool_read_ahead disabled
buffer_pool_read_ahead_evicted disabled
buffer_pool_pages_total disabled
buffer_pool_pages_misc disabled
buffer_pool_pages_data disabled
+buffer_pool_bytes_data disabled
buffer_pool_pages_dirty disabled
+buffer_pool_bytes_dirty disabled
buffer_pool_pages_free disabled
buffer_pages_created disabled
buffer_pages_written disabled
@@ -48,15 +49,15 @@ buffer_flush_batch_pages disabled
buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
+buffer_flush_n_to_flush_requested disabled
+buffer_flush_avg_page_rate disabled
+buffer_flush_lsn_avg_rate disabled
+buffer_flush_pct_for_dirty disabled
+buffer_flush_pct_for_lsn disabled
+buffer_flush_sync_waits disabled
buffer_flush_adaptive_total_pages disabled
buffer_flush_adaptive disabled
buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
buffer_flush_sync_total_pages disabled
buffer_flush_sync disabled
buffer_flush_sync_pages disabled
@@ -156,6 +157,8 @@ log_write_requests disabled
log_writes disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
+compression_pad_increments disabled
+compression_pad_decrements disabled
index_splits disabled
index_merges disabled
adaptive_hash_searches disabled
@@ -199,657 +202,29 @@ dml_reads disabled
dml_inserts disabled
dml_deletes disabled
dml_updates disabled
+ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
+ddl_online_create_index disabled
+ddl_pending_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
icp_match disabled
set global innodb_monitor_enable = all;
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_reset_all = all;
-select name, count, status from information_schema.innodb_metrics;
-name count status
-metadata_table_handles_opened 0 disabled
-metadata_table_handles_closed 0 disabled
-metadata_table_reference_count 0 disabled
-metadata_mem_pool_size 0 disabled
-lock_deadlocks 0 disabled
-lock_timeouts 0 disabled
-lock_rec_lock_waits 0 disabled
-lock_table_lock_waits 0 disabled
-lock_rec_lock_requests 0 disabled
-lock_rec_lock_created 0 disabled
-lock_rec_lock_removed 0 disabled
-lock_rec_locks 0 disabled
-lock_table_lock_created 0 disabled
-lock_table_lock_removed 0 disabled
-lock_table_locks 0 disabled
-lock_row_lock_current_waits 0 disabled
-lock_row_lock_time 0 disabled
-lock_row_lock_time_max 0 disabled
-lock_row_lock_waits 0 disabled
-lock_row_lock_time_avg 0 disabled
-buffer_pool_size 0 disabled
-buffer_pool_reads 0 disabled
-buffer_pool_read_requests 0 disabled
-buffer_pool_write_requests 0 disabled
-buffer_pool_pages_in_flush 0 disabled
-buffer_pool_wait_free 0 disabled
-buffer_pool_read_ahead 0 disabled
-buffer_pool_read_ahead_evicted 0 disabled
-buffer_pool_pages_total 0 disabled
-buffer_pool_pages_misc 0 disabled
-buffer_pool_pages_data 0 disabled
-buffer_pool_pages_dirty 0 disabled
-buffer_pool_pages_free 0 disabled
-buffer_pages_created 0 disabled
-buffer_pages_written 0 disabled
-buffer_pages_read 0 disabled
-buffer_data_reads 0 disabled
-buffer_data_written 0 disabled
-buffer_flush_batch_scanned 0 disabled
-buffer_flush_batch_num_scan 0 disabled
-buffer_flush_batch_scanned_per_call 0 disabled
-buffer_flush_batch_total_pages 0 disabled
-buffer_flush_batches 0 disabled
-buffer_flush_batch_pages 0 disabled
-buffer_flush_neighbor_total_pages 0 disabled
-buffer_flush_neighbor 0 disabled
-buffer_flush_neighbor_pages 0 disabled
-buffer_flush_max_dirty_total_pages 0 disabled
-buffer_flush_max_dirty 0 disabled
-buffer_flush_max_dirty_pages 0 disabled
-buffer_flush_adaptive_total_pages 0 disabled
-buffer_flush_adaptive 0 disabled
-buffer_flush_adaptive_pages 0 disabled
-buffer_flush_async_total_pages 0 disabled
-buffer_flush_async 0 disabled
-buffer_flush_async_pages 0 disabled
-buffer_flush_sync_total_pages 0 disabled
-buffer_flush_sync 0 disabled
-buffer_flush_sync_pages 0 disabled
-buffer_flush_background_total_pages 0 disabled
-buffer_flush_background 0 disabled
-buffer_flush_background_pages 0 disabled
-buffer_LRU_batch_scanned 0 disabled
-buffer_LRU_batch_num_scan 0 disabled
-buffer_LRU_batch_scanned_per_call 0 disabled
-buffer_LRU_batch_total_pages 0 disabled
-buffer_LRU_batches 0 disabled
-buffer_LRU_batch_pages 0 disabled
-buffer_LRU_single_flush_scanned 0 disabled
-buffer_LRU_single_flush_num_scan 0 disabled
-buffer_LRU_single_flush_scanned_per_call 0 disabled
-buffer_LRU_single_flush_failure_count 0 disabled
-buffer_LRU_get_free_search 0 disabled
-buffer_LRU_search_scanned 0 disabled
-buffer_LRU_search_num_scan 0 disabled
-buffer_LRU_search_scanned_per_call 0 disabled
-buffer_LRU_unzip_search_scanned 0 disabled
-buffer_LRU_unzip_search_num_scan 0 disabled
-buffer_LRU_unzip_search_scanned_per_call 0 disabled
-buffer_page_read_index_leaf 0 disabled
-buffer_page_read_index_non_leaf 0 disabled
-buffer_page_read_index_ibuf_leaf 0 disabled
-buffer_page_read_index_ibuf_non_leaf 0 disabled
-buffer_page_read_undo_log 0 disabled
-buffer_page_read_index_inode 0 disabled
-buffer_page_read_ibuf_free_list 0 disabled
-buffer_page_read_ibuf_bitmap 0 disabled
-buffer_page_read_system_page 0 disabled
-buffer_page_read_trx_system 0 disabled
-buffer_page_read_fsp_hdr 0 disabled
-buffer_page_read_xdes 0 disabled
-buffer_page_read_blob 0 disabled
-buffer_page_read_zblob 0 disabled
-buffer_page_read_zblob2 0 disabled
-buffer_page_read_other 0 disabled
-buffer_page_written_index_leaf 0 disabled
-buffer_page_written_index_non_leaf 0 disabled
-buffer_page_written_index_ibuf_leaf 0 disabled
-buffer_page_written_index_ibuf_non_leaf 0 disabled
-buffer_page_written_undo_log 0 disabled
-buffer_page_written_index_inode 0 disabled
-buffer_page_written_ibuf_free_list 0 disabled
-buffer_page_written_ibuf_bitmap 0 disabled
-buffer_page_written_system_page 0 disabled
-buffer_page_written_trx_system 0 disabled
-buffer_page_written_fsp_hdr 0 disabled
-buffer_page_written_xdes 0 disabled
-buffer_page_written_blob 0 disabled
-buffer_page_written_zblob 0 disabled
-buffer_page_written_zblob2 0 disabled
-buffer_page_written_other 0 disabled
-os_data_reads 0 disabled
-os_data_writes 0 disabled
-os_data_fsyncs 0 disabled
-os_pending_reads 0 disabled
-os_pending_writes 0 disabled
-os_log_bytes_written 0 disabled
-os_log_fsyncs 0 disabled
-os_log_pending_fsyncs 0 disabled
-os_log_pending_writes 0 disabled
-trx_rw_commits 0 disabled
-trx_ro_commits 0 disabled
-trx_nl_ro_commits 0 disabled
-trx_commits_insert_update 0 disabled
-trx_rollbacks 0 disabled
-trx_rollbacks_savepoint 0 disabled
-trx_rollback_active 0 disabled
-trx_active_transactions 0 disabled
-trx_rseg_history_len 0 disabled
-trx_undo_slots_used 0 disabled
-trx_undo_slots_cached 0 disabled
-trx_rseg_current_size 0 disabled
-purge_del_mark_records 0 disabled
-purge_upd_exist_or_extern_records 0 disabled
-purge_invoked 0 disabled
-purge_undo_log_pages 0 disabled
-purge_dml_delay_usec 0 disabled
-purge_stop_count 0 disabled
-purge_resume_count 0 disabled
-log_checkpoints 0 disabled
-log_lsn_last_flush 0 disabled
-log_lsn_last_checkpoint 0 disabled
-log_lsn_current 0 disabled
-log_lsn_checkpoint_age 0 disabled
-log_lsn_buf_pool_oldest 0 disabled
-log_max_modified_age_async 0 disabled
-log_max_modified_age_sync 0 disabled
-log_pending_log_writes 0 disabled
-log_pending_checkpoint_writes 0 disabled
-log_num_log_io 0 disabled
-log_waits 0 disabled
-log_write_requests 0 disabled
-log_writes 0 disabled
-compress_pages_compressed 0 disabled
-compress_pages_decompressed 0 disabled
-index_splits 0 disabled
-index_merges 0 disabled
-adaptive_hash_searches 0 disabled
-adaptive_hash_searches_btree 0 disabled
-adaptive_hash_pages_added 0 disabled
-adaptive_hash_pages_removed 0 disabled
-adaptive_hash_rows_added 0 disabled
-adaptive_hash_rows_removed 0 disabled
-adaptive_hash_rows_deleted_no_hash_entry 0 disabled
-adaptive_hash_rows_updated 0 disabled
-file_num_open_files 0 disabled
-ibuf_merges_insert 0 disabled
-ibuf_merges_delete_mark 0 disabled
-ibuf_merges_delete 0 disabled
-ibuf_merges_discard_insert 0 disabled
-ibuf_merges_discard_delete_mark 0 disabled
-ibuf_merges_discard_delete 0 disabled
-ibuf_merges 0 disabled
-ibuf_size 0 disabled
-innodb_master_thread_sleeps 0 disabled
-innodb_activity_count 0 disabled
-innodb_master_active_loops 0 disabled
-innodb_master_idle_loops 0 disabled
-innodb_background_drop_table_usec 0 disabled
-innodb_ibuf_merge_usec 0 disabled
-innodb_log_flush_usec 0 disabled
-innodb_mem_validate_usec 0 disabled
-innodb_master_purge_usec 0 disabled
-innodb_dict_lru_usec 0 disabled
-innodb_checkpoint_usec 0 disabled
-innodb_dblwr_writes 0 disabled
-innodb_dblwr_pages_written 0 disabled
-innodb_page_size 0 disabled
-innodb_rwlock_s_spin_waits 0 disabled
-innodb_rwlock_x_spin_waits 0 disabled
-innodb_rwlock_s_spin_rounds 0 disabled
-innodb_rwlock_x_spin_rounds 0 disabled
-innodb_rwlock_s_os_waits 0 disabled
-innodb_rwlock_x_os_waits 0 disabled
-dml_reads 0 disabled
-dml_inserts 0 disabled
-dml_deletes 0 disabled
-dml_updates 0 disabled
-ddl_background_drop_tables 0 disabled
-icp_attempts 0 disabled
-icp_no_match 0 disabled
-icp_out_of_range 0 disabled
-icp_match 0 disabled
+select name from information_schema.innodb_metrics where count!=0;
+name
set global innodb_monitor_enable = "%lock%";
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
-name status
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
+name
set global innodb_monitor_disable = "%lock%";
select name, status from information_schema.innodb_metrics
where name like "%lock%";
@@ -879,1035 +254,21 @@ innodb_rwlock_x_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, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened enabled
-metadata_table_handles_closed enabled
-metadata_table_reference_count enabled
-metadata_mem_pool_size enabled
-lock_deadlocks enabled
-lock_timeouts enabled
-lock_rec_lock_waits enabled
-lock_table_lock_waits enabled
-lock_rec_lock_requests enabled
-lock_rec_lock_created enabled
-lock_rec_lock_removed enabled
-lock_rec_locks enabled
-lock_table_lock_created enabled
-lock_table_lock_removed enabled
-lock_table_locks enabled
-lock_row_lock_current_waits enabled
-lock_row_lock_time enabled
-lock_row_lock_time_max enabled
-lock_row_lock_waits enabled
-lock_row_lock_time_avg enabled
-buffer_pool_size enabled
-buffer_pool_reads enabled
-buffer_pool_read_requests enabled
-buffer_pool_write_requests enabled
-buffer_pool_pages_in_flush enabled
-buffer_pool_wait_free enabled
-buffer_pool_read_ahead enabled
-buffer_pool_read_ahead_evicted enabled
-buffer_pool_pages_total enabled
-buffer_pool_pages_misc enabled
-buffer_pool_pages_data enabled
-buffer_pool_pages_dirty enabled
-buffer_pool_pages_free enabled
-buffer_pages_created enabled
-buffer_pages_written enabled
-buffer_pages_read enabled
-buffer_data_reads enabled
-buffer_data_written enabled
-buffer_flush_batch_scanned enabled
-buffer_flush_batch_num_scan enabled
-buffer_flush_batch_scanned_per_call enabled
-buffer_flush_batch_total_pages enabled
-buffer_flush_batches enabled
-buffer_flush_batch_pages enabled
-buffer_flush_neighbor_total_pages enabled
-buffer_flush_neighbor enabled
-buffer_flush_neighbor_pages enabled
-buffer_flush_max_dirty_total_pages enabled
-buffer_flush_max_dirty enabled
-buffer_flush_max_dirty_pages enabled
-buffer_flush_adaptive_total_pages enabled
-buffer_flush_adaptive enabled
-buffer_flush_adaptive_pages enabled
-buffer_flush_async_total_pages enabled
-buffer_flush_async enabled
-buffer_flush_async_pages enabled
-buffer_flush_sync_total_pages enabled
-buffer_flush_sync enabled
-buffer_flush_sync_pages enabled
-buffer_flush_background_total_pages enabled
-buffer_flush_background enabled
-buffer_flush_background_pages enabled
-buffer_LRU_batch_scanned enabled
-buffer_LRU_batch_num_scan enabled
-buffer_LRU_batch_scanned_per_call enabled
-buffer_LRU_batch_total_pages enabled
-buffer_LRU_batches enabled
-buffer_LRU_batch_pages enabled
-buffer_LRU_single_flush_scanned enabled
-buffer_LRU_single_flush_num_scan enabled
-buffer_LRU_single_flush_scanned_per_call enabled
-buffer_LRU_single_flush_failure_count enabled
-buffer_LRU_get_free_search enabled
-buffer_LRU_search_scanned enabled
-buffer_LRU_search_num_scan enabled
-buffer_LRU_search_scanned_per_call enabled
-buffer_LRU_unzip_search_scanned enabled
-buffer_LRU_unzip_search_num_scan enabled
-buffer_LRU_unzip_search_scanned_per_call enabled
-buffer_page_read_index_leaf enabled
-buffer_page_read_index_non_leaf enabled
-buffer_page_read_index_ibuf_leaf enabled
-buffer_page_read_index_ibuf_non_leaf enabled
-buffer_page_read_undo_log enabled
-buffer_page_read_index_inode enabled
-buffer_page_read_ibuf_free_list enabled
-buffer_page_read_ibuf_bitmap enabled
-buffer_page_read_system_page enabled
-buffer_page_read_trx_system enabled
-buffer_page_read_fsp_hdr enabled
-buffer_page_read_xdes enabled
-buffer_page_read_blob enabled
-buffer_page_read_zblob enabled
-buffer_page_read_zblob2 enabled
-buffer_page_read_other enabled
-buffer_page_written_index_leaf enabled
-buffer_page_written_index_non_leaf enabled
-buffer_page_written_index_ibuf_leaf enabled
-buffer_page_written_index_ibuf_non_leaf enabled
-buffer_page_written_undo_log enabled
-buffer_page_written_index_inode enabled
-buffer_page_written_ibuf_free_list enabled
-buffer_page_written_ibuf_bitmap enabled
-buffer_page_written_system_page enabled
-buffer_page_written_trx_system enabled
-buffer_page_written_fsp_hdr enabled
-buffer_page_written_xdes enabled
-buffer_page_written_blob enabled
-buffer_page_written_zblob enabled
-buffer_page_written_zblob2 enabled
-buffer_page_written_other enabled
-os_data_reads enabled
-os_data_writes enabled
-os_data_fsyncs enabled
-os_pending_reads enabled
-os_pending_writes enabled
-os_log_bytes_written enabled
-os_log_fsyncs enabled
-os_log_pending_fsyncs enabled
-os_log_pending_writes enabled
-trx_rw_commits enabled
-trx_ro_commits enabled
-trx_nl_ro_commits enabled
-trx_commits_insert_update enabled
-trx_rollbacks enabled
-trx_rollbacks_savepoint enabled
-trx_rollback_active enabled
-trx_active_transactions enabled
-trx_rseg_history_len enabled
-trx_undo_slots_used enabled
-trx_undo_slots_cached enabled
-trx_rseg_current_size enabled
-purge_del_mark_records enabled
-purge_upd_exist_or_extern_records enabled
-purge_invoked enabled
-purge_undo_log_pages enabled
-purge_dml_delay_usec enabled
-purge_stop_count enabled
-purge_resume_count enabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed enabled
-compress_pages_decompressed enabled
-index_splits enabled
-index_merges enabled
-adaptive_hash_searches enabled
-adaptive_hash_searches_btree enabled
-adaptive_hash_pages_added enabled
-adaptive_hash_pages_removed enabled
-adaptive_hash_rows_added enabled
-adaptive_hash_rows_removed enabled
-adaptive_hash_rows_deleted_no_hash_entry enabled
-adaptive_hash_rows_updated enabled
-file_num_open_files enabled
-ibuf_merges_insert enabled
-ibuf_merges_delete_mark enabled
-ibuf_merges_delete enabled
-ibuf_merges_discard_insert enabled
-ibuf_merges_discard_delete_mark enabled
-ibuf_merges_discard_delete enabled
-ibuf_merges enabled
-ibuf_size enabled
-innodb_master_thread_sleeps enabled
-innodb_activity_count enabled
-innodb_master_active_loops enabled
-innodb_master_idle_loops enabled
-innodb_background_drop_table_usec enabled
-innodb_ibuf_merge_usec enabled
-innodb_log_flush_usec enabled
-innodb_mem_validate_usec enabled
-innodb_master_purge_usec enabled
-innodb_dict_lru_usec enabled
-innodb_checkpoint_usec enabled
-innodb_dblwr_writes enabled
-innodb_dblwr_pages_written enabled
-innodb_page_size enabled
-innodb_rwlock_s_spin_waits enabled
-innodb_rwlock_x_spin_waits enabled
-innodb_rwlock_s_spin_rounds enabled
-innodb_rwlock_x_spin_rounds enabled
-innodb_rwlock_s_os_waits enabled
-innodb_rwlock_x_os_waits enabled
-dml_reads enabled
-dml_inserts enabled
-dml_deletes enabled
-dml_updates enabled
-ddl_background_drop_tables enabled
-icp_attempts enabled
-icp_no_match enabled
-icp_out_of_range enabled
-icp_match enabled
+select name from information_schema.innodb_metrics where status!='enabled';
+name
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints disabled
-log_lsn_last_flush disabled
-log_lsn_last_checkpoint disabled
-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_writes disabled
-log_pending_checkpoint_writes disabled
-log_num_log_io disabled
-log_waits disabled
-log_write_requests disabled
-log_writes disabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics where status!='disabled';
+name
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
-name status
-metadata_table_handles_opened disabled
-metadata_table_handles_closed disabled
-metadata_table_reference_count disabled
-metadata_mem_pool_size disabled
-lock_deadlocks disabled
-lock_timeouts disabled
-lock_rec_lock_waits disabled
-lock_table_lock_waits disabled
-lock_rec_lock_requests disabled
-lock_rec_lock_created disabled
-lock_rec_lock_removed disabled
-lock_rec_locks disabled
-lock_table_lock_created disabled
-lock_table_lock_removed disabled
-lock_table_locks disabled
-lock_row_lock_current_waits disabled
-lock_row_lock_time disabled
-lock_row_lock_time_max disabled
-lock_row_lock_waits disabled
-lock_row_lock_time_avg disabled
-buffer_pool_size disabled
-buffer_pool_reads disabled
-buffer_pool_read_requests disabled
-buffer_pool_write_requests disabled
-buffer_pool_pages_in_flush disabled
-buffer_pool_wait_free disabled
-buffer_pool_read_ahead disabled
-buffer_pool_read_ahead_evicted disabled
-buffer_pool_pages_total disabled
-buffer_pool_pages_misc disabled
-buffer_pool_pages_data disabled
-buffer_pool_pages_dirty disabled
-buffer_pool_pages_free disabled
-buffer_pages_created disabled
-buffer_pages_written disabled
-buffer_pages_read disabled
-buffer_data_reads disabled
-buffer_data_written disabled
-buffer_flush_batch_scanned disabled
-buffer_flush_batch_num_scan disabled
-buffer_flush_batch_scanned_per_call disabled
-buffer_flush_batch_total_pages disabled
-buffer_flush_batches disabled
-buffer_flush_batch_pages disabled
-buffer_flush_neighbor_total_pages disabled
-buffer_flush_neighbor disabled
-buffer_flush_neighbor_pages disabled
-buffer_flush_max_dirty_total_pages disabled
-buffer_flush_max_dirty disabled
-buffer_flush_max_dirty_pages disabled
-buffer_flush_adaptive_total_pages disabled
-buffer_flush_adaptive disabled
-buffer_flush_adaptive_pages disabled
-buffer_flush_async_total_pages disabled
-buffer_flush_async disabled
-buffer_flush_async_pages disabled
-buffer_flush_sync_total_pages disabled
-buffer_flush_sync disabled
-buffer_flush_sync_pages disabled
-buffer_flush_background_total_pages disabled
-buffer_flush_background disabled
-buffer_flush_background_pages disabled
-buffer_LRU_batch_scanned disabled
-buffer_LRU_batch_num_scan disabled
-buffer_LRU_batch_scanned_per_call disabled
-buffer_LRU_batch_total_pages disabled
-buffer_LRU_batches disabled
-buffer_LRU_batch_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
-buffer_LRU_search_num_scan disabled
-buffer_LRU_search_scanned_per_call disabled
-buffer_LRU_unzip_search_scanned disabled
-buffer_LRU_unzip_search_num_scan disabled
-buffer_LRU_unzip_search_scanned_per_call disabled
-buffer_page_read_index_leaf disabled
-buffer_page_read_index_non_leaf disabled
-buffer_page_read_index_ibuf_leaf disabled
-buffer_page_read_index_ibuf_non_leaf disabled
-buffer_page_read_undo_log disabled
-buffer_page_read_index_inode disabled
-buffer_page_read_ibuf_free_list disabled
-buffer_page_read_ibuf_bitmap disabled
-buffer_page_read_system_page disabled
-buffer_page_read_trx_system disabled
-buffer_page_read_fsp_hdr disabled
-buffer_page_read_xdes disabled
-buffer_page_read_blob disabled
-buffer_page_read_zblob disabled
-buffer_page_read_zblob2 disabled
-buffer_page_read_other disabled
-buffer_page_written_index_leaf disabled
-buffer_page_written_index_non_leaf disabled
-buffer_page_written_index_ibuf_leaf disabled
-buffer_page_written_index_ibuf_non_leaf disabled
-buffer_page_written_undo_log disabled
-buffer_page_written_index_inode disabled
-buffer_page_written_ibuf_free_list disabled
-buffer_page_written_ibuf_bitmap disabled
-buffer_page_written_system_page disabled
-buffer_page_written_trx_system disabled
-buffer_page_written_fsp_hdr disabled
-buffer_page_written_xdes disabled
-buffer_page_written_blob disabled
-buffer_page_written_zblob disabled
-buffer_page_written_zblob2 disabled
-buffer_page_written_other disabled
-os_data_reads disabled
-os_data_writes disabled
-os_data_fsyncs disabled
-os_pending_reads disabled
-os_pending_writes disabled
-os_log_bytes_written disabled
-os_log_fsyncs disabled
-os_log_pending_fsyncs disabled
-os_log_pending_writes disabled
-trx_rw_commits disabled
-trx_ro_commits disabled
-trx_nl_ro_commits disabled
-trx_commits_insert_update disabled
-trx_rollbacks disabled
-trx_rollbacks_savepoint disabled
-trx_rollback_active disabled
-trx_active_transactions disabled
-trx_rseg_history_len disabled
-trx_undo_slots_used disabled
-trx_undo_slots_cached disabled
-trx_rseg_current_size disabled
-purge_del_mark_records disabled
-purge_upd_exist_or_extern_records disabled
-purge_invoked disabled
-purge_undo_log_pages disabled
-purge_dml_delay_usec disabled
-purge_stop_count disabled
-purge_resume_count disabled
-log_checkpoints enabled
-log_lsn_last_flush enabled
-log_lsn_last_checkpoint enabled
-log_lsn_current enabled
-log_lsn_checkpoint_age enabled
-log_lsn_buf_pool_oldest enabled
-log_max_modified_age_async enabled
-log_max_modified_age_sync enabled
-log_pending_log_writes enabled
-log_pending_checkpoint_writes enabled
-log_num_log_io enabled
-log_waits enabled
-log_write_requests enabled
-log_writes enabled
-compress_pages_compressed disabled
-compress_pages_decompressed disabled
-index_splits disabled
-index_merges disabled
-adaptive_hash_searches disabled
-adaptive_hash_searches_btree disabled
-adaptive_hash_pages_added disabled
-adaptive_hash_pages_removed disabled
-adaptive_hash_rows_added disabled
-adaptive_hash_rows_removed disabled
-adaptive_hash_rows_deleted_no_hash_entry disabled
-adaptive_hash_rows_updated disabled
-file_num_open_files disabled
-ibuf_merges_insert disabled
-ibuf_merges_delete_mark disabled
-ibuf_merges_delete disabled
-ibuf_merges_discard_insert disabled
-ibuf_merges_discard_delete_mark disabled
-ibuf_merges_discard_delete disabled
-ibuf_merges disabled
-ibuf_size disabled
-innodb_master_thread_sleeps disabled
-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_checkpoint_usec disabled
-innodb_dblwr_writes disabled
-innodb_dblwr_pages_written disabled
-innodb_page_size disabled
-innodb_rwlock_s_spin_waits disabled
-innodb_rwlock_x_spin_waits disabled
-innodb_rwlock_s_spin_rounds disabled
-innodb_rwlock_x_spin_rounds disabled
-innodb_rwlock_s_os_waits disabled
-innodb_rwlock_x_os_waits disabled
-dml_reads disabled
-dml_inserts disabled
-dml_deletes disabled
-dml_updates disabled
-ddl_background_drop_tables disabled
-icp_attempts disabled
-icp_no_match disabled
-icp_out_of_range disabled
-icp_match disabled
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
+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
@@ -1989,7 +350,7 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
col
select name, max_count, min_count, count,
@@ -2146,7 +507,7 @@ max_count_reset, min_count_reset, count_reset, 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
-file_num_open_files 3 3 3 3 3 3 enabled
+file_num_open_files # # # # # # enabled
set global innodb_monitor_disable = file_num_open_files;
set global innodb_monitor_enable = "icp%";
create table monitor_test(a char(3), b int, c char(2),
diff --git a/mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result b/mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result
index a285cc14a01..add91e56039 100644
--- a/mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_old_blocks_time_basic.result
@@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_old_blocks_time;
SELECT @start_global_value;
@start_global_value
-0
+1000
Valid values are zero or above
select @@global.innodb_old_blocks_time >=0;
@@global.innodb_old_blocks_time >=0
1
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
-0
+1000
select @@session.innodb_old_blocks_time;
ERROR HY000: Variable 'innodb_old_blocks_time' is a GLOBAL variable
show global variables like 'innodb_old_blocks_time';
Variable_name Value
-innodb_old_blocks_time 0
+innodb_old_blocks_time 1000
show session variables like 'innodb_old_blocks_time';
Variable_name Value
-innodb_old_blocks_time 0
+innodb_old_blocks_time 1000
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_OLD_BLOCKS_TIME 0
+INNODB_OLD_BLOCKS_TIME 1000
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_OLD_BLOCKS_TIME 0
+INNODB_OLD_BLOCKS_TIME 1000
set global innodb_old_blocks_time=10;
select @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
@@ -53,4 +53,4 @@ INNODB_OLD_BLOCKS_TIME 0
SET @@global.innodb_old_blocks_time = @start_global_value;
SELECT @@global.innodb_old_blocks_time;
@@global.innodb_old_blocks_time
-0
+1000
diff --git a/mysql-test/suite/sys_vars/r/innodb_online_alter_log_max_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_online_alter_log_max_size_basic.result
new file mode 100644
index 00000000000..99f315eb1f9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_online_alter_log_max_size_basic.result
@@ -0,0 +1,64 @@
+SET @start_global_value = @@global.innodb_online_alter_log_max_size;
+SELECT @start_global_value;
+@start_global_value
+134217728
+select @@global.innodb_online_alter_log_max_size >= 524288;
+@@global.innodb_online_alter_log_max_size >= 524288
+1
+select @@global.innodb_online_alter_log_max_size;
+@@global.innodb_online_alter_log_max_size
+134217728
+select @@session.innodb_online_alter_log_max_size;
+ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable
+show global variables like 'innodb_online_alter_log_max_size';
+Variable_name Value
+innodb_online_alter_log_max_size 134217728
+show session variables like 'innodb_online_alter_log_max_size';
+Variable_name Value
+innodb_online_alter_log_max_size 134217728
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 134217728
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 134217728
+set global innodb_online_alter_log_max_size=1048576;
+select @@global.innodb_online_alter_log_max_size;
+@@global.innodb_online_alter_log_max_size
+1048576
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 1048576
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 1048576
+set @@global.innodb_online_alter_log_max_size=524288;
+select @@global.innodb_online_alter_log_max_size;
+@@global.innodb_online_alter_log_max_size
+524288
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 524288
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_ONLINE_ALTER_LOG_MAX_SIZE 524288
+set session innodb_online_alter_log_max_size='some';
+ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_online_alter_log_max_size='some';
+ERROR HY000: Variable 'innodb_online_alter_log_max_size' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_online_alter_log_max_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
+set global innodb_online_alter_log_max_size='foo';
+ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
+set global innodb_online_alter_log_max_size=-2;
+Warnings:
+Warning 1292 Truncated incorrect innodb_online_alter_log_max_size value: '-2'
+set global innodb_online_alter_log_max_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_online_alter_log_max_size'
+set global innodb_online_alter_log_max_size=2;
+Warnings:
+Warning 1292 Truncated incorrect innodb_online_alter_log_max_size value: '2'
+SET @@global.innodb_online_alter_log_max_size = @start_global_value;
+SELECT @@global.innodb_online_alter_log_max_size;
+@@global.innodb_online_alter_log_max_size
+134217728
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result
new file mode 100644
index 00000000000..41204422767
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_run_now_basic.result
@@ -0,0 +1,27 @@
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 0
+purge_resume_count 0
+SET @orig = @@global.innodb_purge_run_now;
+SELECT @orig;
+@orig
+0
+SET GLOBAL innodb_purge_stop_now = ON;
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 1
+purge_resume_count 0
+SET GLOBAL innodb_purge_run_now = ON;
+SELECT @@global.innodb_purge_run_now;
+@@global.innodb_purge_run_now
+0
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 1
+purge_resume_count 1
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result
new file mode 100644
index 00000000000..41204422767
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_stop_now_basic.result
@@ -0,0 +1,27 @@
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 0
+purge_resume_count 0
+SET @orig = @@global.innodb_purge_run_now;
+SELECT @orig;
+@orig
+0
+SET GLOBAL innodb_purge_stop_now = ON;
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 1
+purge_resume_count 0
+SET GLOBAL innodb_purge_run_now = ON;
+SELECT @@global.innodb_purge_run_now;
+@@global.innodb_purge_run_now
+0
+SELECT name, count
+FROM information_schema.innodb_metrics
+WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+name count
+purge_stop_count 1
+purge_resume_count 1
diff --git a/mysql-test/suite/sys_vars/r/innodb_read_only_basic.result b/mysql-test/suite/sys_vars/r/innodb_read_only_basic.result
new file mode 100644
index 00000000000..a97f1ddc698
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_read_only_basic.result
@@ -0,0 +1,22 @@
+Valid values are 'ON' and 'OFF'
+select @@global.innodb_read_only;
+@@global.innodb_read_only
+0
+select @@session.innodb_read_only;
+ERROR HY000: Variable 'innodb_read_only' is a GLOBAL variable
+show global variables like 'innodb_read_only';
+Variable_name Value
+innodb_read_only OFF
+show session variables like 'innodb_read_only';
+Variable_name Value
+innodb_read_only OFF
+select * from information_schema.global_variables where variable_name='innodb_read_only';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_READ_ONLY OFF
+select * from information_schema.session_variables where variable_name='innodb_read_only';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_READ_ONLY OFF
+set global innodb_read_only=1;
+ERROR HY000: Variable 'innodb_read_only' is a read only variable
+set session innodb_read_only=1;
+ERROR HY000: Variable 'innodb_read_only' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_auto_recalc_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_auto_recalc_basic.result
new file mode 100644
index 00000000000..dd4970cbdb0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_auto_recalc_basic.result
@@ -0,0 +1,24 @@
+SELECT @@innodb_stats_auto_recalc;
+@@innodb_stats_auto_recalc
+1
+SET GLOBAL innodb_stats_auto_recalc=ON;
+SELECT @@innodb_stats_auto_recalc;
+@@innodb_stats_auto_recalc
+1
+SET GLOBAL innodb_stats_auto_recalc=OFF;
+SELECT @@innodb_stats_auto_recalc;
+@@innodb_stats_auto_recalc
+0
+SET GLOBAL innodb_stats_auto_recalc=1;
+SELECT @@innodb_stats_auto_recalc;
+@@innodb_stats_auto_recalc
+1
+SET GLOBAL innodb_stats_auto_recalc=0;
+SELECT @@innodb_stats_auto_recalc;
+@@innodb_stats_auto_recalc
+0
+SET GLOBAL innodb_stats_auto_recalc=123;
+ERROR 42000: Variable 'innodb_stats_auto_recalc' can't be set to the value of '123'
+SET GLOBAL innodb_stats_auto_recalc='foo';
+ERROR 42000: Variable 'innodb_stats_auto_recalc' can't be set to the value of 'foo'
+SET GLOBAL innodb_stats_auto_recalc=default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result
index 852ef8a353d..19e4a8a67d2 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_on_metadata_basic.result
@@ -1,28 +1,28 @@
SET @start_global_value = @@global.innodb_stats_on_metadata;
SELECT @start_global_value;
@start_global_value
-1
+0
Valid values are 'ON' and 'OFF'
select @@global.innodb_stats_on_metadata in (0, 1);
@@global.innodb_stats_on_metadata in (0, 1)
1
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
-1
+0
select @@session.innodb_stats_on_metadata;
ERROR HY000: Variable 'innodb_stats_on_metadata' is a GLOBAL variable
show global variables like 'innodb_stats_on_metadata';
Variable_name Value
-innodb_stats_on_metadata ON
+innodb_stats_on_metadata OFF
show session variables like 'innodb_stats_on_metadata';
Variable_name Value
-innodb_stats_on_metadata ON
+innodb_stats_on_metadata OFF
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_ON_METADATA ON
+INNODB_STATS_ON_METADATA OFF
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_STATS_ON_METADATA ON
+INNODB_STATS_ON_METADATA OFF
set global innodb_stats_on_metadata='OFF';
select @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
@@ -89,4 +89,4 @@ ERROR 42000: Variable 'innodb_stats_on_metadata' can't be set to the value of 'A
SET @@global.innodb_stats_on_metadata = @start_global_value;
SELECT @@global.innodb_stats_on_metadata;
@@global.innodb_stats_on_metadata
-1
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result
new file mode 100644
index 00000000000..1cbdd16afdf
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result
@@ -0,0 +1,24 @@
+SELECT @@innodb_stats_persistent;
+@@innodb_stats_persistent
+0
+SET GLOBAL innodb_stats_persistent=ON;
+SELECT @@innodb_stats_persistent;
+@@innodb_stats_persistent
+1
+SET GLOBAL innodb_stats_persistent=OFF;
+SELECT @@innodb_stats_persistent;
+@@innodb_stats_persistent
+0
+SET GLOBAL innodb_stats_persistent=1;
+SELECT @@innodb_stats_persistent;
+@@innodb_stats_persistent
+1
+SET GLOBAL innodb_stats_persistent=0;
+SELECT @@innodb_stats_persistent;
+@@innodb_stats_persistent
+0
+SET GLOBAL innodb_stats_persistent=123;
+ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of '123'
+SET GLOBAL innodb_stats_persistent='foo';
+ERROR 42000: Variable 'innodb_stats_persistent' can't be set to the value of 'foo'
+SET GLOBAL innodb_stats_persistent=off;
diff --git a/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
index be1a58394b8..99bc0727ad8 100644
--- a/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
+++ b/mysql-test/suite/sys_vars/r/max_connect_errors_basic.result
@@ -1,18 +1,18 @@
SET @start_value = @@global.max_connect_errors;
SELECT @start_value;
@start_value
-10
+100
'#--------------------FN_DYNVARS_073_01------------------------#'
SET @@global.max_connect_errors = 5000;
SET @@global.max_connect_errors = DEFAULT;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
-10
+100
'#---------------------FN_DYNVARS_073_02-------------------------#'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors = 10;
@@global.max_connect_errors = 10
-1
+0
'#--------------------FN_DYNVARS_073_03------------------------#'
SET @@global.max_connect_errors = 4096;
SELECT @@global.max_connect_errors;
@@ -131,4 +131,4 @@ ERROR 42S22: Unknown column 'max_connect_errors' in 'field list'
SET @@global.max_connect_errors = @start_value;
SELECT @@global.max_connect_errors;
@@global.max_connect_errors
-10
+100
diff --git a/mysql-test/suite/sys_vars/r/metadata_locks_hash_instances_basic.result b/mysql-test/suite/sys_vars/r/metadata_locks_hash_instances_basic.result
new file mode 100644
index 00000000000..46e65fbc003
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/metadata_locks_hash_instances_basic.result
@@ -0,0 +1,51 @@
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+@@GLOBAL.metadata_locks_hash_instances
+8
+####################################################################
+# Check that value cannot be set (this variable is settable only #
+# at start-up). #
+####################################################################
+SET @@GLOBAL.metadata_locks_hash_instances=1;
+ERROR HY000: Variable 'metadata_locks_hash_instances' is a read only variable
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+@@GLOBAL.metadata_locks_hash_instances
+8
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+SELECT @@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='metadata_locks_hash_instances';
+@@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
+1
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+@@GLOBAL.metadata_locks_hash_instances
+8
+SELECT VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='metadata_locks_hash_instances';
+VARIABLE_VALUE
+8
+######################################################################
+# Check if accessing variable with and without GLOBAL point to same #
+# variable #
+######################################################################
+SELECT @@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances;
+@@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances
+1
+######################################################################
+# Check if variable has only the GLOBAL scope #
+######################################################################
+SELECT @@metadata_locks_hash_instances;
+@@metadata_locks_hash_instances
+8
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+@@GLOBAL.metadata_locks_hash_instances
+8
+SELECT @@local.metadata_locks_hash_instances;
+ERROR HY000: Variable 'metadata_locks_hash_instances' is a GLOBAL variable
+SELECT @@SESSION.metadata_locks_hash_instances;
+ERROR HY000: Variable 'metadata_locks_hash_instances' is a GLOBAL variable
diff --git a/mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result b/mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result
new file mode 100644
index 00000000000..a65a71ff8a0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/pfs_session_connect_attrs_size_basic.result
@@ -0,0 +1,23 @@
+select @@global.performance_schema_session_connect_attrs_size;
+@@global.performance_schema_session_connect_attrs_size
+2048
+select @@session.performance_schema_session_connect_attrs_size;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a GLOBAL variable
+show global variables like 'performance_schema_session_connect_attrs_size';
+Variable_name Value
+performance_schema_session_connect_attrs_size 2048
+show session variables like 'performance_schema_session_connect_attrs_size';
+Variable_name Value
+performance_schema_session_connect_attrs_size 2048
+select * from information_schema.global_variables
+where variable_name='performance_schema_session_connect_attrs_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE 2048
+select * from information_schema.session_variables
+where variable_name='performance_schema_session_connect_attrs_size';
+VARIABLE_NAME VARIABLE_VALUE
+PERFORMANCE_SCHEMA_SESSION_CONNECT_ATTRS_SIZE 2048
+set global performance_schema_session_connect_attrs_size=1;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable
+set session performance_schema_session_connect_attrs_size=1;
+ERROR HY000: Variable 'performance_schema_session_connect_attrs_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_func.result b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
index fb650399597..f01b2c4c48b 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_func.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
@@ -81,7 +81,7 @@ DROP FUNCTION f_slow_current_time;
DROP TABLE t1;
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
DROP PROCEDURE IF EXISTS p1;
CREATE PROCEDURE p1()
diff --git a/mysql-test/suite/sys_vars/r/sql_notes_func.result b/mysql-test/suite/sys_vars/r/sql_notes_func.result
index 87c4ecb8431..28510f027da 100644
--- a/mysql-test/suite/sys_vars/r/sql_notes_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_notes_func.result
@@ -13,7 +13,7 @@ SELECT @@warning_count;
0 Expected
DROP TABLE IF EXISTS t1;
Warnings:
-Note 1051 Unknown table 't1'
+Note 1051 Unknown table 'test.t1'
SELECT @@warning_count;
@@warning_count
1
diff --git a/mysql-test/suite/sys_vars/t/host_cache_size_basic-master.opt b/mysql-test/suite/sys_vars/t/host_cache_size_basic-master.opt
new file mode 100644
index 00000000000..7fb505c5572
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/host_cache_size_basic-master.opt
@@ -0,0 +1 @@
+--host-cache-size=123
diff --git a/mysql-test/suite/sys_vars/t/host_cache_size_basic.test b/mysql-test/suite/sys_vars/t/host_cache_size_basic.test
new file mode 100644
index 00000000000..38713d2f963
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/host_cache_size_basic.test
@@ -0,0 +1,41 @@
+--source include/not_embedded.inc
+
+#
+# Only global
+#
+
+select @@global.host_cache_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.host_cache_size;
+
+show global variables like 'host_cache_size';
+
+show session variables like 'host_cache_size';
+
+select * from information_schema.global_variables
+ where variable_name='host_cache_size';
+
+select * from information_schema.session_variables
+ where variable_name='host_cache_size';
+
+#
+# Read-Write
+#
+
+set global host_cache_size=1;
+select @@global.host_cache_size;
+
+set global host_cache_size=12;
+select @@global.host_cache_size;
+
+set global host_cache_size=0;
+select @@global.host_cache_size;
+
+--error ER_GLOBAL_VARIABLE
+set session host_cache_size=1;
+
+# Restore default
+set global host_cache_size=123;
+select @@global.host_cache_size;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_lwm_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_lwm_basic.test
new file mode 100644
index 00000000000..04f07cdd3df
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_flushing_lwm_basic.test
@@ -0,0 +1,142 @@
+############ mysql-test\t\innodb_adaptive_flushing_lwm_basic.test #############
+# #
+# Variable Name: innodb_adaptive_flushing_lwm #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 10 #
+# Range: 0-70 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description:Test Cases of Dynamic System Variable innodb_adaptive_flushing_lwm #
+# 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_adaptive_flushing_lwm TESTS #
+########################################################################
+
+
+###############################################################################
+#Saving initial value of innodb_adaptive_flushing_lwm in a temporary variable #
+###############################################################################
+
+SET @global_start_value = @@global.innodb_adaptive_flushing_lwm;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_adaptive_flushing_lwm #
+########################################################################
+
+SET @@global.innodb_adaptive_flushing_lwm = 1;
+SET @@global.innodb_adaptive_flushing_lwm = DEFAULT;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+###################################################################################
+# Check if innodb_adaptive_flushing_lwm can be accessed with and without @@ sign #
+###################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_adaptive_flushing_lwm = 1;
+SELECT @@innodb_adaptive_flushing_lwm;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_adaptive_flushing_lwm;
+
+SET global innodb_adaptive_flushing_lwm = 1;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+###############################################################################
+# change the value of innodb_adaptive_flushing_lwm to a valid value #
+###############################################################################
+
+SET @@global.innodb_adaptive_flushing_lwm = 1;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+SET @@global.innodb_adaptive_flushing_lwm = 60;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+SET @@global.innodb_adaptive_flushing_lwm = 70;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_adaptive_flushing_lwm to invalid value #
+###########################################################################
+
+SET @@global.innodb_adaptive_flushing_lwm = -1;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_adaptive_flushing_lwm = "T";
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_adaptive_flushing_lwm = "Y";
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+SET @@global.innodb_adaptive_flushing_lwm = 71;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_adaptive_flushing_lwm =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
+SELECT @@global.innodb_adaptive_flushing_lwm;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_adaptive_flushing_lwm';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_adaptive_flushing_lwm = OFF;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_adaptive_flushing_lwm = ON;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+
+SET @@global.innodb_adaptive_flushing_lwm = TRUE;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+SET @@global.innodb_adaptive_flushing_lwm = FALSE;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_adaptive_flushing_lwm = @global_start_value;
+SELECT @@global.innodb_adaptive_flushing_lwm;
+
+###############################################################
+# END OF innodb_adaptive_flushing_lwm TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_analyze_is_persistent_basic.test b/mysql-test/suite/sys_vars/t/innodb_analyze_is_persistent_basic.test
deleted file mode 100644
index 1283678b2b1..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_analyze_is_persistent_basic.test
+++ /dev/null
@@ -1,81 +0,0 @@
-
-# 2010-01-25 - Added
-#
-
---source include/have_innodb.inc
-
-SET @start_global_value = @@global.innodb_analyze_is_persistent;
-SELECT @start_global_value;
-
-#
-# exists as global only
-#
---echo Valid values are 'ON' and 'OFF'
-SELECT @@global.innodb_analyze_is_persistent in (0, 1);
-SELECT @@global.innodb_analyze_is_persistent;
-#--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT @@session.innodb_analyze_is_persistent;
-SHOW global variables LIKE 'innodb_analyze_is_persistent';
-SHOW session variables LIKE 'innodb_analyze_is_persistent';
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-
-#
-# SHOW that it's writable
-#
-SET global innodb_analyze_is_persistent='OFF';
-SELECT @@global.innodb_analyze_is_persistent;
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SET @@global.innodb_analyze_is_persistent=1;
-SELECT @@global.innodb_analyze_is_persistent;
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SET global innodb_analyze_is_persistent=0;
-SELECT @@global.innodb_analyze_is_persistent;
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SET @@global.innodb_analyze_is_persistent='ON';
-SELECT @@global.innodb_analyze_is_persistent;
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-#--error ER_GLOBAL_VARIABLE
-SET session innodb_analyze_is_persistent='OFF';
-#--error ER_GLOBAL_VARIABLE
-SET @@session.innodb_analyze_is_persistent='ON';
-
-#
-# incorrect types
-#
---error ER_WRONG_TYPE_FOR_VAR
-SET global innodb_analyze_is_persistent=1.1;
---error ER_WRONG_TYPE_FOR_VAR
-SET global innodb_analyze_is_persistent=1e1;
---error ER_WRONG_VALUE_FOR_VAR
-SET global innodb_analyze_is_persistent=2;
---error ER_WRONG_VALUE_FOR_VAR
-SET global innodb_analyze_is_persistent=-3;
-SELECT @@global.innodb_analyze_is_persistent;
-SELECT * FROM information_schema.global_variables
-WHERE variable_name='innodb_analyze_is_persistent';
-SELECT * FROM information_schema.session_variables
-WHERE variable_name='innodb_analyze_is_persistent';
---error ER_WRONG_VALUE_FOR_VAR
-SET global innodb_analyze_is_persistent='AUTO';
-
-#
-# Cleanup
-#
-
-SET @@global.innodb_analyze_is_persistent = @start_global_value;
-SELECT @@global.innodb_analyze_is_persistent;
diff --git a/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test
new file mode 100644
index 00000000000..b3a7aebce4e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test
@@ -0,0 +1,58 @@
+#
+# 2012-08-01 Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_api_bk_commit_interval;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid values are positive number
+SELECT @@global.innodb_api_bk_commit_interval > 0;
+SELECT @@global.innodb_api_bk_commit_interval <= 1024*1024*1024;
+SELECT @@global.innodb_api_bk_commit_interval;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.innodb_api_bk_commit_interval;
+SHOW global variables LIKE 'innodb_api_bk_commit_interval';
+SHOW session variables LIKE 'innodb_api_bk_commit_interval';
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+
+#
+# show that it's writable
+#
+SET global innodb_api_bk_commit_interval=100;
+SELECT @@global.innodb_api_bk_commit_interval;
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+--error ER_GLOBAL_VARIABLE
+SET session innodb_api_bk_commit_interval=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_bk_commit_interval=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_bk_commit_interval=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_bk_commit_interval="foo";
+SET global innodb_api_bk_commit_interval=-7;
+SELECT @@global.innodb_api_bk_commit_interval;
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_bk_commit_interval';
+
+#
+# cleanup
+#
+
+SET @@global.innodb_api_bk_commit_interval = @start_global_value;
+SELECT @@global.innodb_api_bk_commit_interval;
diff --git a/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test
new file mode 100644
index 00000000000..c9c04a27229
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test
@@ -0,0 +1,102 @@
+
+
+################## mysql-test\t\innodb_api_disable_rowlock_basic.test ##############
+# #
+# Variable Name: innodb_api_disable_rowlock #
+# Scope: Global #
+# Access Type: Static #
+# Data Type: numeric #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author : Sharique Abdullah #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable innodb_api_disable_rowlock #
+# 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_035_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+--echo 1 Expected
+
+
+--echo '#---------------------BS_STVARS_035_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_api_disable_rowlock=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+--echo 1 Expected
+
+
+
+
+--echo '#---------------------BS_STVARS_035_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_04----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_api_disable_rowlock = @@GLOBAL.innodb_api_enable_binlog;
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_05----------------------#'
+################################################################################
+# Check if innodb_log_file_size can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_api_disable_rowlock);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_api_disable_rowlock);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_api_disable_rowlock);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_api_disable_rowlock = @@SESSION.innodb_api_enable_binlog;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test
new file mode 100644
index 00000000000..637541ef621
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test
@@ -0,0 +1,102 @@
+
+
+################## mysql-test\t\innodb_api_enable_binlog_basic.test ##############
+# #
+# Variable Name: innodb_api_enable_binlog #
+# Scope: Global #
+# Access Type: Static #
+# Data Type: numeric #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author : Sharique Abdullah #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable innodb_api_enable_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_035_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+--echo 1 Expected
+
+
+--echo '#---------------------BS_STVARS_035_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_api_enable_binlog=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+--echo 1 Expected
+
+
+
+
+--echo '#---------------------BS_STVARS_035_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_04----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_api_enable_binlog = @@GLOBAL.innodb_api_enable_binlog;
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_05----------------------#'
+################################################################################
+# Check if innodb_log_file_size can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_api_enable_binlog);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_api_enable_binlog);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_api_enable_binlog);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_api_enable_binlog = @@SESSION.innodb_api_enable_binlog;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test
new file mode 100644
index 00000000000..0e440a72cce
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test
@@ -0,0 +1,102 @@
+
+
+################## mysql-test\t\innodb_api_enable_mdl_basic.test ##############
+# #
+# Variable Name: innodb_api_enable_mdl #
+# Scope: Global #
+# Access Type: Static #
+# Data Type: numeric #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author : Sharique Abdullah #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable innodb_api_enable_mdl #
+# 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_035_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+--echo 1 Expected
+
+
+--echo '#---------------------BS_STVARS_035_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_api_enable_mdl=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+--echo 1 Expected
+
+
+
+
+--echo '#---------------------BS_STVARS_035_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_04----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_api_enable_mdl = @@GLOBAL.innodb_api_enable_mdl;
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_035_05----------------------#'
+################################################################################
+# Check if innodb_log_file_size can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_api_enable_mdl);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_api_enable_mdl);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_api_enable_mdl);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_api_enable_mdl = @@SESSION.innodb_api_enable_mdl;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test b/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test
new file mode 100644
index 00000000000..49c34b647fd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test
@@ -0,0 +1,58 @@
+#
+# 2011-08-01 Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_api_trx_level;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid values are zero or above
+SELECT @@global.innodb_api_trx_level >=0;
+SELECT @@global.innodb_api_trx_level <=3;
+SELECT @@global.innodb_api_trx_level;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.innodb_api_trx_level;
+SHOW global variables LIKE 'innodb_api_trx_level';
+SHOW session variables LIKE 'innodb_api_trx_level';
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_trx_level';
+
+#
+# show that it's writable
+#
+SET global innodb_api_trx_level=100;
+SELECT @@global.innodb_api_trx_level;
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_api_trx_level';
+--error ER_GLOBAL_VARIABLE
+SET session innodb_api_trx_level=1;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_trx_level=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_trx_level=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_api_trx_level="foo";
+SET global innodb_api_trx_level=-7;
+SELECT @@global.innodb_api_trx_level;
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_api_trx_level';
+
+#
+# cleanup
+#
+
+SET @@global.innodb_api_trx_level = @start_global_value;
+SELECT @@global.innodb_api_trx_level;
diff --git a/mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test b/mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test
index eb208e7197f..cbe62a105ff 100644
--- a/mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test
@@ -4,7 +4,7 @@
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
-# Default Value: 8 #
+# Default Value: 64 #
# Range: 0,1 #
# #
# #
diff --git a/mysql-test/suite/sys_vars/t/innodb_cmp_per_index_enabled_basic.test b/mysql-test/suite/sys_vars/t/innodb_cmp_per_index_enabled_basic.test
new file mode 100644
index 00000000000..d729acea02c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_cmp_per_index_enabled_basic.test
@@ -0,0 +1,69 @@
+-- source include/have_innodb.inc
+# CREATE TABLE ... KEY_BLOCK_SIZE=8; does not work with page size = 4k
+-- source include/have_innodb_16k.inc
+
+# Check the default value
+SELECT @@global.innodb_cmp_per_index_enabled;
+
+# should be a boolean
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_persistent=123;
+
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_persistent='foo';
+
+# Check that changing value works and that setting the same value again
+# is as expected
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT @@global.innodb_cmp_per_index_enabled;
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT @@global.innodb_cmp_per_index_enabled;
+
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SELECT @@global.innodb_cmp_per_index_enabled;
+
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SELECT @@global.innodb_cmp_per_index_enabled;
+
+SET GLOBAL innodb_file_format=Barracuda;
+
+-- vertical_results
+
+# Check that enabling after being disabled resets the stats
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
+
+INSERT INTO t VALUES (1);
+
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+DROP TABLE t;
+
+# Check that enabling after being enabled does not reset the stats
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+CREATE TABLE t (a INT) ENGINE=INNODB KEY_BLOCK_SIZE=8;
+
+INSERT INTO t VALUES (1);
+
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+DROP TABLE t;
+
+#
+
+SET GLOBAL innodb_file_format=default;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_compression_failure_threshold_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_compression_failure_threshold_pct_basic.test
new file mode 100644
index 00000000000..1cdfaa6b31d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_compression_failure_threshold_pct_basic.test
@@ -0,0 +1,143 @@
+##### mysql-test\t\innodb_compression_failure_threshold_pct_basic.test ########
+# #
+# Variable Name: innodb_compression_failure_threshold_pct #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 5 #
+# Range: 0-100 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description: Test Cases of Dynamic System Variable #
+# innodb_compression_failure_threshold_pct #
+# 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+######################################################################
+# START OF innodb_compression_failure_threshold_pct TESTS #
+######################################################################
+
+
+############################################################################################
+# Saving initial value of innodb_compression_failure_threshold_pct in a temporary variable #
+############################################################################################
+
+SET @global_start_value = @@global.innodb_compression_failure_threshold_pct;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_compression_failure_threshold_pct#
+########################################################################
+
+SET @@global.innodb_compression_failure_threshold_pct = 0;
+SET @@global.innodb_compression_failure_threshold_pct = DEFAULT;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+##############################################################################################
+# check if innodb_compression_failure_threshold_pct can be accessed with and without @@ sign #
+##############################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_compression_failure_threshold_pct = 1;
+SELECT @@innodb_compression_failure_threshold_pct;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_compression_failure_threshold_pct;
+
+SET global innodb_compression_failure_threshold_pct = 0;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+#################################################################################
+# change the value of innodb_compression_failure_threshold_pct to a valid value #
+#################################################################################
+
+SET @@global.innodb_compression_failure_threshold_pct = 0;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+SET @@global.innodb_compression_failure_threshold_pct = 1;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+SET @@global.innodb_compression_failure_threshold_pct = 100;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+################################################################################
+# Cange the value of innodb_compression_failure_threshold_pct to invalid value #
+################################################################################
+
+SET @@global.innodb_compression_failure_threshold_pct = -1;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = "T";
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = "Y";
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+SET @@global.innodb_compression_failure_threshold_pct = 101;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_compression_failure_threshold_pct =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+SELECT @@global.innodb_compression_failure_threshold_pct;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = OFF;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = ON;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.innodb_compression_failure_threshold_pct = TRUE;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+SET @@global.innodb_compression_failure_threshold_pct = FALSE;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_compression_failure_threshold_pct = @global_start_value;
+SELECT @@global.innodb_compression_failure_threshold_pct;
+
+###############################################################
+# END OF innodb_compression_failure_threshold_pct TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test b/mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test
new file mode 100644
index 00000000000..a90abdde2f1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test
@@ -0,0 +1,64 @@
+
+
+# 2012-05-29 - Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_compression_level;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid value 0-9
+select @@global.innodb_compression_level <= 9;
+select @@global.innodb_compression_level;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_compression_level;
+show global variables like 'innodb_compression_level';
+show session variables like 'innodb_compression_level';
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+select * from information_schema.session_variables where variable_name='innodb_compression_level';
+
+#
+# show that it's writable
+#
+set global innodb_compression_level=2;
+select @@global.innodb_compression_level;
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+select * from information_schema.session_variables where variable_name='innodb_compression_level';
+--error ER_GLOBAL_VARIABLE
+set session innodb_compression_level=4;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_compression_level=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_compression_level=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_compression_level="foo";
+
+set global innodb_compression_level=10;
+select @@global.innodb_compression_level;
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+set global innodb_compression_level=-7;
+select @@global.innodb_compression_level;
+select * from information_schema.global_variables where variable_name='innodb_compression_level';
+
+#
+# min/max values
+#
+set global innodb_compression_level=0;
+select @@global.innodb_compression_level;
+set global innodb_compression_level=9;
+select @@global.innodb_compression_level;
+
+#
+# cleanup
+#
+
+SET @@global.innodb_compression_level = @start_global_value;
+SELECT @@global.innodb_compression_level;
diff --git a/mysql-test/suite/sys_vars/t/innodb_compression_pad_pct_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_compression_pad_pct_max_basic.test
new file mode 100644
index 00000000000..3ca566956ef
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_compression_pad_pct_max_basic.test
@@ -0,0 +1,136 @@
+############# mysql-test\t\innodb_compression_pad_pct_max_basic.test ##########
+# #
+# Variable Name: innodb_compression_pad_pct_max #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 50 #
+# Range: 0-75 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description: Test Cases of Dynamic System Variable #
+# innodb_compression_pad_pct_max #
+# 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+######################################################################
+# START OF innodb_compression_pad_pct_max TESTS #
+######################################################################
+
+
+############################################################################################
+# Saving initial value of innodb_compression_pad_pct_max in a temporary variable #
+############################################################################################
+
+SET @global_start_value = @@global.innodb_compression_pad_pct_max;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_compression_pad_pct_max #
+########################################################################
+
+SET @@global.innodb_compression_pad_pct_max = DEFAULT;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+##############################################################################################
+# check if innodb_compression_pad_pct_max can be accessed with and without @@ sign #
+##############################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_compression_pad_pct_max = 1;
+SELECT @@innodb_compression_pad_pct_max;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_compression_pad_pct_max;
+
+SET global innodb_compression_pad_pct_max = 0;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+#################################################################################
+# change the value of innodb_compression_pad_pct_max to a valid value #
+#################################################################################
+
+SET @@global.innodb_compression_pad_pct_max = 0;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+SET @@global.innodb_compression_pad_pct_max = 75;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+################################################################################
+# Cange the value of innodb_compression_pad_pct_max to invalid value #
+################################################################################
+
+SET @@global.innodb_compression_pad_pct_max = -1;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = "T";
+SELECT @@global.innodb_compression_pad_pct_max;
+
+SET @@global.innodb_compression_pad_pct_max = 76;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_compression_pad_pct_max =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+SELECT @@global.innodb_compression_pad_pct_max;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = OFF;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = ON;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.innodb_compression_pad_pct_max = TRUE;
+SELECT @@global.innodb_compression_pad_pct_max;
+SET @@global.innodb_compression_pad_pct_max = FALSE;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_compression_pad_pct_max = @global_start_value;
+SELECT @@global.innodb_compression_pad_pct_max;
+
+###############################################################
+# END OF innodb_compression_pad_pct_max TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
index 67b0247d169..f73e25179ba 100644
--- a/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test
@@ -4,7 +4,7 @@
# Scope: GLOBAL #
# Access Type: Dynamic #
# Data Type: Numeric #
-# Default Value: 500 #
+# Default Value: 5000 #
# Range: 1-4294967295 #
# #
# #
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
new file mode 100644
index 00000000000..9ab1a90efe1
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_disable_background_merge_basic.test
@@ -0,0 +1,12 @@
+#
+# 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_flush_log_at_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_timeout_basic.test
new file mode 100644
index 00000000000..0ab079adaa8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_timeout_basic.test
@@ -0,0 +1,151 @@
+################# mysql-test\t\innodb_flush_log_at_timeout_basic.test #########
+# #
+# Variable Name: innodb_flush_log_at_timeout #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 1 #
+# Range: 0-2700 #
+# #
+# #
+# Creation Date: 2012-05-10 #
+# Author: Nuno Carvalho #
+# #
+#Description: Test Cases of Dynamic System Variable #
+# innodb_flush_log_at_timeout 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_flush_log_at_timeout TESTS #
+########################################################################
+
+
+#############################################################################
+# Saving initial value of innodb_flush_log_at_timeout #
+#############################################################################
+
+
+SET @global_start_value = @@global.innodb_flush_log_at_timeout;
+SELECT @global_start_value;
+
+
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+##########################################################################
+# Display the DEFAULT value of innodb_flush_log_at_timeout #
+##########################################################################
+
+SET @@global.innodb_flush_log_at_timeout = 0;
+SET @@global.innodb_flush_log_at_timeout = DEFAULT;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+###############################################################################
+# Check if variable can be accessed with and without @@ sign #
+###############################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_flush_log_at_timeout = 1;
+SELECT @@innodb_flush_log_at_timeout;
+
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_flush_log_at_timeout;
+
+
+SET global innodb_flush_log_at_timeout = 0;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+#############################################################################
+# change the value of innodb_flush_log_at_timeout to a valid value #
+#############################################################################
+
+
+SET @@global.innodb_flush_log_at_timeout = 0;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+SET @@global.innodb_flush_log_at_timeout = 10;
+SELECT @@global.innodb_flush_log_at_timeout;
+SET @@global.innodb_flush_log_at_timeout = 2700;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###############################################################################
+# Change the value of innodb_flush_log_at_timeout to invalid value #
+###############################################################################
+
+SET @@global.innodb_flush_log_at_timeout = -1;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = "T";
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = "Y";
+SELECT @@global.innodb_flush_log_at_timeout;
+
+SET @@global.innodb_flush_log_at_timeout = 2701;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_flush_log_at_timeout =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+SELECT @@global.innodb_flush_log_at_timeout;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = OFF;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = ON;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+
+SET @@global.innodb_flush_log_at_timeout = TRUE;
+SELECT @@global.innodb_flush_log_at_timeout;
+SET @@global.innodb_flush_log_at_timeout = FALSE;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+##############################
+# Restore initial value #
+##############################
+
+
+SET @@global.innodb_flush_log_at_timeout = @global_start_value;
+SELECT @@global.innodb_flush_log_at_timeout;
+
+###############################################################
+# END OF innodb_flush_log_at_timeout TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test
index 2f28809de3e..698e30b6669 100644
--- a/mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test
@@ -11,8 +11,6 @@ SELECT @start_global_value;
#
# exists as global only
#
---echo Valid values are 'ON' and 'OFF'
-select @@global.innodb_flush_neighbors in (0, 1);
select @@global.innodb_flush_neighbors;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.innodb_flush_neighbors;
@@ -24,11 +22,11 @@ select * from information_schema.session_variables where variable_name='innodb_f
#
# show that it's writable
#
-set global innodb_flush_neighbors='OFF';
+set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
-set @@global.innodb_flush_neighbors=1;
+set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
@@ -36,30 +34,35 @@ set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
-set @@global.innodb_flush_neighbors='ON';
+set @@global.innodb_flush_neighbors=2;
+select @@global.innodb_flush_neighbors;
+select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
+select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+set @@global.innodb_flush_neighbors=DEFAULT;
select @@global.innodb_flush_neighbors;
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
--error ER_GLOBAL_VARIABLE
-set session innodb_flush_neighbors='OFF';
+set session innodb_flush_neighbors=0;
--error ER_GLOBAL_VARIABLE
-set @@session.innodb_flush_neighbors='ON';
+set @@session.innodb_flush_neighbors=1;
#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_flush_neighbors='OFF';
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_flush_neighbors='ON';
+--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors=1.1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors=1e1;
---error ER_WRONG_VALUE_FOR_VAR
-set global innodb_flush_neighbors=2;
---error ER_WRONG_VALUE_FOR_VAR
+set global innodb_flush_neighbors=3;
+select @@global.innodb_flush_neighbors;
set global innodb_flush_neighbors=-3;
select @@global.innodb_flush_neighbors;
-select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
-select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
---error ER_WRONG_VALUE_FOR_VAR
+--error ER_WRONG_TYPE_FOR_VAR
set global innodb_flush_neighbors='AUTO';
#
diff --git a/mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test b/mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test
new file mode 100644
index 00000000000..a84e623f2c3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test
@@ -0,0 +1,143 @@
+############ mysql-test\t\innodb_flushing_avg_loops_basic.test ################
+# #
+# Variable Name: innodb_flushing_avg_loops #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 10 #
+# Range: 0-70 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description:Test Cases of Dynamic System Variable innodb_flushing_avg_loops #
+# 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+########################################################################
+# START OF innodb_flushing_avg_loops TESTS #
+########################################################################
+
+
+###############################################################################
+#Saving initial value of innodb_flushing_avg_loops in a temporary variable #
+###############################################################################
+
+SET @global_start_value = @@global.innodb_flushing_avg_loops;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_flushing_avg_loops #
+########################################################################
+
+SET @@global.innodb_flushing_avg_loops = 1;
+SET @@global.innodb_flushing_avg_loops = DEFAULT;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+##################################################################################
+# Check if innodb_flushing_avg_loops can be accessed with and without @@ sign #
+##################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_flushing_avg_loops = 1;
+SELECT @@innodb_flushing_avg_loops;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_flushing_avg_loops;
+
+SET global innodb_flushing_avg_loops = 1;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+###############################################################################
+# change the value of innodb_flushing_avg_loops to a valid value #
+###############################################################################
+
+SET @@global.innodb_flushing_avg_loops = 1;
+SELECT @@global.innodb_flushing_avg_loops;
+
+SET @@global.innodb_flushing_avg_loops = 60;
+SELECT @@global.innodb_flushing_avg_loops;
+
+SET @@global.innodb_flushing_avg_loops = 1000;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_flushing_avg_loops to invalid value #
+###########################################################################
+
+SET @@global.innodb_flushing_avg_loops = -1;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = "T";
+SELECT @@global.innodb_flushing_avg_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = "Y";
+SELECT @@global.innodb_flushing_avg_loops;
+
+SET @@global.innodb_flushing_avg_loops = 1001;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_flushing_avg_loops =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+SELECT @@global.innodb_flushing_avg_loops;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = OFF;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = ON;
+SELECT @@global.innodb_flushing_avg_loops;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+
+SET @@global.innodb_flushing_avg_loops = TRUE;
+SELECT @@global.innodb_flushing_avg_loops;
+SET @@global.innodb_flushing_avg_loops = FALSE;
+SELECT @@global.innodb_flushing_avg_loops;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_flushing_avg_loops = @global_start_value;
+SELECT @@global.innodb_flushing_avg_loops;
+
+###############################################################
+# END OF innodb_flushing_avg_loops TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test
new file mode 100644
index 00000000000..5eefe1b9219
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test
@@ -0,0 +1,28 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+#
+# exists as global only
+#
+select @@global.innodb_force_recovery_crash in (0, 1);
+select @@global.innodb_force_recovery_crash;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_force_recovery_crash;
+show global variables like 'innodb_force_recovery_crash';
+show session variables like 'innodb_force_recovery_crash';
+select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
+select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
+
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_force_recovery_crash=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_force_recovery_crash=0;
+select @@global.innodb_force_recovery_crash;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session innodb_force_recovery_crash='some';
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set @@session.innodb_force_recovery_crash='some';
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_force_recovery_crash='some';
diff --git a/mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test
new file mode 100644
index 00000000000..125ceaa1c30
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_io_capacity_max_basic.test
@@ -0,0 +1,74 @@
+
+
+# 2012-04-02 - Added
+#
+
+--source include/have_innodb.inc
+
+SET @start_innodb_max_capacity = @@global.innodb_io_capacity_max;
+SELECT @start_innodb_max_capacity;
+
+SET @start_innodb_capacity = @@global.innodb_io_capacity;
+SELECT @start_innodb_capacity;
+
+#
+# exists as global only
+#
+--echo Valid value 100 or more
+select @@global.innodb_io_capacity_max > 99;
+select @@global.innodb_io_capacity_max;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_io_capacity_max;
+show global variables like 'innodb_io_capacity_max';
+show session variables like 'innodb_io_capacity_max';
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
+
+#
+# show that it's writable. Allowed value cannot be lower than innodb_io_capacity
+#
+set global innodb_io_capacity_max=@start_innodb_capacity + 1;
+select @@global.innodb_io_capacity_max;
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+select * from information_schema.session_variables where variable_name='innodb_io_capacity_max';
+--error ER_GLOBAL_VARIABLE
+set session innodb_io_capacity_max=444;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_io_capacity_max=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_io_capacity_max=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_io_capacity_max="foo";
+
+#
+# can't set it below innodb_io_capacity
+#
+set global innodb_io_capacity_max=@start_innodb_capacity - 1;
+select @@global.innodb_io_capacity_max;
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+set global innodb_io_capacity_max=-7;
+select @@global.innodb_io_capacity_max;
+select * from information_schema.global_variables where variable_name='innodb_io_capacity_max';
+
+#
+# min/max values
+#
+# first set innodb_io_cpaacity lower
+set global innodb_io_capacity=100;
+set global innodb_io_capacity_max=100;
+select @@global.innodb_io_capacity_max;
+
+#
+# cleanup
+#
+
+SET @@global.innodb_io_capacity_max = @start_innodb_max_capacity;
+SELECT @@global.innodb_io_capacity_max;
+
+SET @@global.innodb_io_capacity = @start_innodb_capacity;
+SELECT @@global.innodb_io_capacity;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test
new file mode 100644
index 00000000000..7a6da2e6a08
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test
@@ -0,0 +1,151 @@
+############# mysql-test\t\innodb_max_dirty_pages_pct_lwm_basic.test ##########
+# #
+# Variable Name: innodb_max_dirty_pages_pct_lwm #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 75 #
+# Range: 0-99 #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author: Rizwan #
+# #
+#Description: Test Cases of Dynamic System Variable #
+# innodb_max_dirty_pages_pct_lwm 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/have_innodb.inc
+--source include/load_sysvars.inc
+
+######################################################################
+# START OF innodb_max_dirty_pages_pct_lwm TESTS #
+######################################################################
+
+
+#################################################################################
+#Saving initial value of innodb_max_dirty_pages_pct_lwm in a temporary variable #
+#################################################################################
+
+SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT @pct_lwm_start_value;
+
+SET @pct_start_value = @@global.innodb_max_dirty_pages_pct;
+SELECT @pct_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_max_dirty_pages_pct_lwm #
+########################################################################
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
+SET @@global.innodb_max_dirty_pages_pct_lwm = DEFAULT;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+###################################################################################
+#check if innodb_max_dirty_pages_pct_lwm can be accessed with and without @@ sign #
+###################################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_max_dirty_pages_pct_lwm = 1;
+SELECT @@innodb_max_dirty_pages_pct_lwm;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_max_dirty_pages_pct_lwm;
+
+SET global innodb_max_dirty_pages_pct_lwm = 0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+##########################################################################
+# change the value of innodb_max_dirty_pages_pct_lwm to a valid value #
+# Aloowed values are <= innodb_max_dirty_pages_pct value #
+##########################################################################
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+###########################################################################
+# Change the value of innodb_max_dirty_pages_pct_lwm to invalid value #
+###########################################################################
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = -1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = "T";
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = "Y";
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_start_value + 1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+
+
+--echo '#----------------------FN_DYNVARS_046_05------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+SELECT @@global.innodb_max_dirty_pages_pct_lwm =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+
+--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = OFF;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = ON;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+--echo '#---------------------FN_DYNVARS_046_07----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = TRUE;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SET @@global.innodb_max_dirty_pages_pct_lwm = FALSE;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+##############################
+# Restore initial value #
+##############################
+
+SET @@global.innodb_max_dirty_pages_pct = @pct_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+###############################################################
+# END OF innodb_max_dirty_pages_pct_lwm TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test
index 8afbcac80df..1b23ae14e49 100644
--- a/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
-# status should all change to "started"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "enabled"
+select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
-# status should all change to "stopped"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "disabled"
+select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
-select name, count, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@@ -59,28 +59,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, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
-# Reset the counter value while counter is off (stopped)
+# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@@ -336,6 +337,8 @@ drop table monitor_test;
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
from information_schema.innodb_metrics
diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test
index 8afbcac80df..1b23ae14e49 100644
--- a/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
-# status should all change to "started"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "enabled"
+select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
-# status should all change to "stopped"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "disabled"
+select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
-select name, count, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@@ -59,28 +59,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, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
-# Reset the counter value while counter is off (stopped)
+# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@@ -336,6 +337,8 @@ drop table monitor_test;
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
from information_schema.innodb_metrics
diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test
index 8afbcac80df..1b23ae14e49 100644
--- a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
-# status should all change to "started"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "enabled"
+select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
-# status should all change to "stopped"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "disabled"
+select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
-select name, count, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@@ -59,28 +59,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, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
-# Reset the counter value while counter is off (stopped)
+# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@@ -336,6 +337,8 @@ drop table monitor_test;
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
from information_schema.innodb_metrics
diff --git a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test
index 8afbcac80df..1b23ae14e49 100644
--- a/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test
@@ -11,8 +11,8 @@ select name, status from information_schema.innodb_metrics;
# Turn on all monitor counters
set global innodb_monitor_enable = all;
-# status should all change to "started"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "enabled"
+select name from information_schema.innodb_metrics where status!='enabled';
# Test wrong argument to the global configure option
--error ER_WRONG_VALUE_FOR_VAR
@@ -29,21 +29,21 @@ set global innodb_monitor_enable = aaa;
# insensitive
set global innodb_monitor_disable = All;
-# status should all change to "stopped"
-select name, status from information_schema.innodb_metrics;
+# status should all change to "disabled"
+select name from information_schema.innodb_metrics where status!='disabled';
# Reset all counter values
set global innodb_monitor_reset_all = all;
# count should all change to 0
-select name, count, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where count!=0;
# Test wildcard match, turn on all counters contain string "lock"
set global innodb_monitor_enable = "%lock%";
# All lock related counter should be enabled
-select name, status from information_schema.innodb_metrics
-where name like "%lock%";
+select name from information_schema.innodb_metrics
+where status != IF(name like "%lock%", 'enabled', 'disabled');
# Disable them
set global innodb_monitor_disable = "%lock%";
@@ -59,28 +59,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, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all counters
set global innodb_monitor_disable="%%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# One more round testing. All counters will be turned on with
# single wildcard character "%"
set global innodb_monitor_enable="%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='enabled';
# Turn off all the counters with "%_%"
set global innodb_monitor_disable="%_%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics where status!='disabled';
# Turn on all counters start with "log"
set global innodb_monitor_enable="log%%%%";
-select name, status from information_schema.innodb_metrics;
+select name from information_schema.innodb_metrics
+where status != IF(name like "log%", 'enabled', 'disabled');
# Turn on counters "os_data_fsync" with wildcard match "os_%a_fs_ncs", "_"
# is single character wildcard match word
@@ -153,7 +154,7 @@ where name = "metadata_table_handles_opened";
# Turn off the counter "metadata_table_handles_opened"
set global innodb_monitor_disable = metadata_table_handles_opened;
-# Reset the counter value while counter is off (stopped)
+# Reset the counter value while counter is off (disabled)
set global innodb_monitor_reset = metadata_table_handles_opened;
select name, max_count, min_count, count,
@@ -192,7 +193,7 @@ set global innodb_monitor_enable = metadata_table_handles_opened;
drop table monitor_test;
# Create a new table to test "metadata_table_handles_opened" counter
-create table monitor_test(col int) engine = innodb;
+create table monitor_test(col int) engine = innodb stats_persistent=0;
select * from monitor_test;
@@ -336,6 +337,8 @@ drop table monitor_test;
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
from information_schema.innodb_metrics
diff --git a/mysql-test/suite/sys_vars/t/innodb_online_alter_log_max_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_online_alter_log_max_size_basic.test
new file mode 100644
index 00000000000..aa1cc83819e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_online_alter_log_max_size_basic.test
@@ -0,0 +1,51 @@
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_online_alter_log_max_size;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.innodb_online_alter_log_max_size >= 524288;
+select @@global.innodb_online_alter_log_max_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_online_alter_log_max_size;
+show global variables like 'innodb_online_alter_log_max_size';
+show session variables like 'innodb_online_alter_log_max_size';
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+
+#
+# show that it's writable
+#
+set global innodb_online_alter_log_max_size=1048576;
+select @@global.innodb_online_alter_log_max_size;
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+set @@global.innodb_online_alter_log_max_size=524288;
+select @@global.innodb_online_alter_log_max_size;
+select * from information_schema.global_variables where variable_name='innodb_online_alter_log_max_size';
+select * from information_schema.session_variables where variable_name='innodb_online_alter_log_max_size';
+--error ER_GLOBAL_VARIABLE
+set session innodb_online_alter_log_max_size='some';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_online_alter_log_max_size='some';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_online_alter_log_max_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_online_alter_log_max_size='foo';
+set global innodb_online_alter_log_max_size=-2;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_online_alter_log_max_size=1e1;
+set global innodb_online_alter_log_max_size=2;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_online_alter_log_max_size = @start_global_value;
+SELECT @@global.innodb_online_alter_log_max_size;
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
new file mode 100644
index 00000000000..0704784dbcc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_run_now_basic.test
@@ -0,0 +1,53 @@
+#
+# Basic test for innodb_purge_run_now, note it is a duplicate of
+# innodb_purge_stop_now.
+#
+
+-- source include/have_innodb.inc
+
+# The config variable is a debug variable for now
+-- source include/have_debug.inc
+
+--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;
+--enable_query_log
+
+# Should be 0 for both
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+# Check the default value
+SET @orig = @@global.innodb_purge_run_now;
+SELECT @orig;
+
+# Stop of purge
+SET GLOBAL innodb_purge_stop_now = ON;
+
+# Stop count should now be 1
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+SET GLOBAL innodb_purge_run_now = ON;
+
+# Should always be OFF
+SELECT @@global.innodb_purge_run_now;
+
+# Both should be 1 now
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+--disable_query_log
+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
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
new file mode 100644
index 00000000000..0704784dbcc
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_stop_now_basic.test
@@ -0,0 +1,53 @@
+#
+# Basic test for innodb_purge_run_now, note it is a duplicate of
+# innodb_purge_stop_now.
+#
+
+-- source include/have_innodb.inc
+
+# The config variable is a debug variable for now
+-- source include/have_debug.inc
+
+--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;
+--enable_query_log
+
+# Should be 0 for both
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+# Check the default value
+SET @orig = @@global.innodb_purge_run_now;
+SELECT @orig;
+
+# Stop of purge
+SET GLOBAL innodb_purge_stop_now = ON;
+
+# Stop count should now be 1
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+SET GLOBAL innodb_purge_run_now = ON;
+
+# Should always be OFF
+SELECT @@global.innodb_purge_run_now;
+
+# Both should be 1 now
+SELECT name, count
+ FROM information_schema.innodb_metrics
+ WHERE name = 'purge_stop_count' OR name = 'purge_resume_count';
+
+--disable_query_log
+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
diff --git a/mysql-test/suite/sys_vars/t/innodb_read_only_basic.test b/mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
new file mode 100644
index 00000000000..581eb3538b8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
@@ -0,0 +1,20 @@
+--source include/have_innodb.inc
+
+# Can only be set from the command line.
+# show the global and session values;
+
+--echo Valid values are 'ON' and 'OFF'
+select @@global.innodb_read_only;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_read_only;
+show global variables like 'innodb_read_only';
+show session variables like 'innodb_read_only';
+select * from information_schema.global_variables where variable_name='innodb_read_only';
+select * from information_schema.session_variables where variable_name='innodb_read_only';
+
+# Show that it's read-only
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_read_only=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session innodb_read_only=1;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_auto_recalc_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_auto_recalc_basic.test
new file mode 100644
index 00000000000..0020c493091
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_auto_recalc_basic.test
@@ -0,0 +1,31 @@
+#
+# innodb_stats_auto_recalc
+#
+
+-- source include/have_innodb.inc
+
+# show the default value
+SELECT @@innodb_stats_auto_recalc;
+
+# check that it is writeable
+SET GLOBAL innodb_stats_auto_recalc=ON;
+SELECT @@innodb_stats_auto_recalc;
+
+SET GLOBAL innodb_stats_auto_recalc=OFF;
+SELECT @@innodb_stats_auto_recalc;
+
+SET GLOBAL innodb_stats_auto_recalc=1;
+SELECT @@innodb_stats_auto_recalc;
+
+SET GLOBAL innodb_stats_auto_recalc=0;
+SELECT @@innodb_stats_auto_recalc;
+
+# should be a boolean
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_auto_recalc=123;
+
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_auto_recalc='foo';
+
+# restore the environment
+SET GLOBAL innodb_stats_auto_recalc=default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test
new file mode 100644
index 00000000000..4277b58de00
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test
@@ -0,0 +1,31 @@
+#
+# innodb_stats_persistent
+#
+
+-- source include/have_innodb.inc
+
+# show the default value
+SELECT @@innodb_stats_persistent;
+
+# check that it is writeable
+SET GLOBAL innodb_stats_persistent=ON;
+SELECT @@innodb_stats_persistent;
+
+SET GLOBAL innodb_stats_persistent=OFF;
+SELECT @@innodb_stats_persistent;
+
+SET GLOBAL innodb_stats_persistent=1;
+SELECT @@innodb_stats_persistent;
+
+SET GLOBAL innodb_stats_persistent=0;
+SELECT @@innodb_stats_persistent;
+
+# should be a boolean
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_persistent=123;
+
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_stats_persistent='foo';
+
+# restore the environment
+SET GLOBAL innodb_stats_persistent=off;
diff --git a/mysql-test/suite/sys_vars/t/metadata_locks_hash_instances_basic.test b/mysql-test/suite/sys_vars/t/metadata_locks_hash_instances_basic.test
new file mode 100644
index 00000000000..5fcf1d956d0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/metadata_locks_hash_instances_basic.test
@@ -0,0 +1,60 @@
+########## mysql-test\t\metadata_locks_hash_instances_basic.test ##############
+# #
+# Variable Name: metadata_locks_hash_instances #
+# Scope: Global #
+# Access Type: Static #
+# Data Type: Integer #
+# #
+###############################################################################
+
+
+--echo ####################################################################
+--echo # Displaying default value #
+--echo ####################################################################
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+
+
+--echo ####################################################################
+--echo # Check that value cannot be set (this variable is settable only #
+--echo # at start-up). #
+--echo ####################################################################
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.metadata_locks_hash_instances=1;
+
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+
+
+--echo #################################################################
+--echo # Check if the value in GLOBAL Table matches value in variable #
+--echo #################################################################
+SELECT @@GLOBAL.metadata_locks_hash_instances = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='metadata_locks_hash_instances';
+
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+
+SELECT VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='metadata_locks_hash_instances';
+
+
+--echo ######################################################################
+--echo # Check if accessing variable with and without GLOBAL point to same #
+--echo # variable #
+--echo ######################################################################
+SELECT @@metadata_locks_hash_instances = @@GLOBAL.metadata_locks_hash_instances;
+
+
+--echo ######################################################################
+--echo # Check if variable has only the GLOBAL scope #
+--echo ######################################################################
+
+SELECT @@metadata_locks_hash_instances;
+
+SELECT @@GLOBAL.metadata_locks_hash_instances;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@local.metadata_locks_hash_instances;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@SESSION.metadata_locks_hash_instances;
diff --git a/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic-master.opt b/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic-master.opt
new file mode 100644
index 00000000000..dcbb8a0bef2
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic-master.opt
@@ -0,0 +1,2 @@
+--loose-enable-performance-schema
+--loose-performance-schema-session-connect-attrs-size=2048
diff --git a/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test b/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test
new file mode 100644
index 00000000000..c10700b8903
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test
@@ -0,0 +1,47 @@
+# Copyright (C) 2012 Sun Microsystems, Inc.
+#
+# 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+#
+# Only global
+#
+
+select @@global.performance_schema_session_connect_attrs_size;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.performance_schema_session_connect_attrs_size;
+
+show global variables like 'performance_schema_session_connect_attrs_size';
+
+show session variables like 'performance_schema_session_connect_attrs_size';
+
+select * from information_schema.global_variables
+ where variable_name='performance_schema_session_connect_attrs_size';
+
+select * from information_schema.session_variables
+ where variable_name='performance_schema_session_connect_attrs_size';
+
+#
+# Read-only
+#
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global performance_schema_session_connect_attrs_size=1;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session performance_schema_session_connect_attrs_size=1;
+
diff --git a/mysql-test/suite/vcol/t/rpl_vcol.test b/mysql-test/suite/vcol/t/rpl_vcol.test
index 43003f80ee9..03837df1b99 100644
--- a/mysql-test/suite/vcol/t/rpl_vcol.test
+++ b/mysql-test/suite/vcol/t/rpl_vcol.test
@@ -27,7 +27,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
SET @@session.storage_engine = 'InnoDB';
#------------------------------------------------------------------------------#
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
index baefddc0fd1..516e121a2aa 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
let $skip_full_text_checks = 1;
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 e11618163cc..38baa2b3024 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
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_handler_innodb.test b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
index 1a50aeaaa86..bf443c6bbd3 100644
--- a/mysql-test/suite/vcol/t/vcol_handler_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_handler_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
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 3b83c7f4565..5d9ac12e930 100644
--- a/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_ins_upd_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_keys_innodb.test b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
index d44d2f701cf..e408672ac07 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
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 42834d5c0bb..88ed6157294 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
@@ -35,7 +35,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_partition_innodb.test b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
index ab90bbf303a..7790a82800c 100644
--- a/mysql-test/suite/vcol/t/vcol_partition_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_partition_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_select_innodb.test b/mysql-test/suite/vcol/t/vcol_select_innodb.test
index 787f5fe77a7..314aecb75b9 100644
--- a/mysql-test/suite/vcol/t/vcol_select_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_select_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
index 32e2600c2fc..53826a460a7 100644
--- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test
@@ -32,7 +32,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
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 57655d6d3fe..5a36fb1c06d 100644
--- a/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_trigger_sp_innodb.test
@@ -34,7 +34,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/suite/vcol/t/vcol_view_innodb.test b/mysql-test/suite/vcol/t/vcol_view_innodb.test
index 322fb122436..01fced8e4c3 100644
--- a/mysql-test/suite/vcol/t/vcol_view_innodb.test
+++ b/mysql-test/suite/vcol/t/vcol_view_innodb.test
@@ -33,7 +33,7 @@
##### Storage engine to be tested
# Set the session storage engine
---source include/have_xtradb.inc
+--source include/have_innodb.inc
eval SET @@session.storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index d48b1687fa0..f40f8c11fac 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -1,3 +1,4 @@
+--source include/have_innodb.inc
#
# Test of alter table
#
@@ -1215,6 +1216,24 @@ ALTER TABLE db1.t1 ADD baz INT;
DROP DATABASE db1;
+--echo # Additional coverage for refactoring which is made as part
+--echo # of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege
+--echo # to allow temp table operations".
+--echo #
+--echo # At some point the below test case failed on assertion.
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TEMPORARY TABLE t1 (i int) ENGINE=MyISAM;
+
+--error ER_ILLEGAL_HA
+ALTER TABLE t1 DISCARD TABLESPACE;
+
+DROP TABLE t1;
+
+
--echo #
--echo # Bug#11938039 RE-EXECUTION OF FRM-ONLY ALTER TABLE WITH RENAME
--echo # CLAUSE FAILS OR ABORTS SERVER.
@@ -1258,3 +1277,360 @@ CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # Bug#11938817 ALTER BEHAVIOR DIFFERENT THEN DOCUMENTED
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT) engine=innodb;
+INSERT INTO t1 VALUES (1), (2);
+
+--enable_info
+--echo # This should not do anything
+ALTER TABLE t1;
+--echo # Check that we rebuild the table
+ALTER TABLE t1 engine=innodb;
+--echo # This should also rebuild the table
+ALTER TABLE t1 FORCE;
+--disable_info
+
+DROP TABLE t1;
+
+--echo # Bug#11748057 (formerly known as 34972): ALTER TABLE statement doesn't
+--echo # identify correct column name.
+--echo #
+
+CREATE TABLE t1 (c1 int unsigned , c2 char(100) not null default '');
+ALTER TABLE t1 ADD c3 char(16) NOT NULL DEFAULT '' AFTER c2,
+ MODIFY c2 char(100) NOT NULL DEFAULT '' AFTER c1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo #
+--echo # WL#5534 Online ALTER, Phase 1
+--echo #
+
+--echo # Single thread tests.
+--echo # See innodb_mysql_sync.test for multi thread tests.
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB;
+CREATE TABLE m1(a INT PRIMARY KEY, b INT) engine=MyISAM;
+INSERT INTO t1 VALUES (1,1), (2,2);
+INSERT INTO m1 VALUES (1,1), (2,2);
+
+--echo #
+--echo # 1: Test ALGORITHM keyword
+--echo #
+
+--echo # --enable_info allows us to see how many rows were updated
+--echo # by ALTER TABLE. in-place will show 0 rows, while copy > 0.
+
+--enable_info
+ALTER TABLE t1 ADD INDEX i1(b);
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
+--error ER_UNKNOWN_ALTER_ALGORITHM
+ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= INVALID;
+
+ALTER TABLE m1 ENABLE KEYS;
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= DEFAULT;
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY;
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE;
+--disable_info
+
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+
+--echo #
+--echo # 2: Test ALGORITHM + old_alter_table
+--echo #
+
+--enable_info
+SET SESSION old_alter_table= 1;
+ALTER TABLE t1 ADD INDEX i1(b);
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= DEFAULT;
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= COPY;
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE;
+SET SESSION old_alter_table= 0;
+--disable_info
+
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+
+--echo #
+--echo # 3: Test unsupported in-place operation
+--echo #
+
+ALTER TABLE t1 ADD COLUMN (c1 INT);
+ALTER TABLE t1 ADD COLUMN (c2 INT), ALGORITHM= DEFAULT;
+ALTER TABLE t1 ADD COLUMN (c3 INT), ALGORITHM= COPY;
+ALTER TABLE t1 ADD COLUMN (c4 INT), ALGORITHM= INPLACE;
+
+ALTER TABLE t1 DROP COLUMN c1, DROP COLUMN c2, DROP COLUMN c3, DROP COLUMN c4;
+
+--echo #
+--echo # 4: Test LOCK keyword
+--echo #
+
+--enable_info
+ALTER TABLE t1 ADD INDEX i1(b), LOCK= DEFAULT;
+ALTER TABLE t1 ADD INDEX i2(b), LOCK= NONE;
+ALTER TABLE t1 ADD INDEX i3(b), LOCK= SHARED;
+ALTER TABLE t1 ADD INDEX i4(b), LOCK= EXCLUSIVE;
+--error ER_UNKNOWN_ALTER_LOCK
+ALTER TABLE t1 ADD INDEX i5(b), LOCK= INVALID;
+--disable_info
+
+ALTER TABLE m1 ENABLE KEYS, LOCK= DEFAULT;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE m1 ENABLE KEYS, LOCK= NONE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED;
+ALTER TABLE m1 ENABLE KEYS, LOCK= EXCLUSIVE;
+
+ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
+
+--echo #
+--echo # 5: Test ALGORITHM + LOCK
+--echo #
+
+--enable_info
+ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= NONE;
+ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= INPLACE, LOCK= SHARED;
+ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE;
+ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= COPY, LOCK= SHARED;
+ALTER TABLE t1 ADD INDEX i6(b), ALGORITHM= COPY, LOCK= EXCLUSIVE;
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED;
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE;
+# This works because the lock will be SNW for the copy phase.
+# It will still require exclusive lock for actually enabling keys.
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED;
+ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= EXCLUSIVE;
+--disable_info
+
+DROP TABLE t1, m1;
+
+--echo #
+--echo # 6: Possible deadlock involving thr_lock.c
+--echo #
+
+CREATE TABLE t1(a INT PRIMARY KEY, b INT);
+INSERT INTO t1 VALUES (1,1), (2,2);
+
+START TRANSACTION;
+INSERT INTO t1 VALUES (3,3);
+
+--echo # Connection con1
+connect (con1, localhost, root);
+--echo # Sending:
+--send ALTER TABLE t1 DISABLE KEYS
+
+--echo # Connection default
+connection default;
+--echo # Waiting until ALTER TABLE is blocked.
+let $wait_condition=
+ SELECT COUNT(*) = 1 FROM information_schema.processlist
+ WHERE state = "Waiting for table metadata lock" AND
+ info = "ALTER TABLE t1 DISABLE KEYS";
+--source include/wait_condition.inc
+UPDATE t1 SET b = 4;
+COMMIT;
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: ALTER TABLE t1 DISABLE KEYS
+--reap
+disconnect con1;
+--source include/wait_until_disconnected.inc
+
+--echo # Connection default
+connection default;
+DROP TABLE t1;
+
+--echo #
+--echo # 7: Which operations require copy and which can be done in-place?
+--echo #
+--echo # Test which ALTER TABLE operations are done in-place and
+--echo # which operations are done using temporary table copy.
+--echo #
+--echo # --enable_info allows us to see how many rows were updated
+--echo # by ALTER TABLE. in-place will show 0 rows, while copy > 0.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS ti1, ti2, ti3, tm1, tm2, tm3;
+--enable_warnings
+
+--echo # Single operation tests
+
+CREATE TABLE ti1(a INT NOT NULL, b INT, c INT) engine=InnoDB;
+CREATE TABLE tm1(a INT NOT NULL, b INT, c INT) engine=MyISAM;
+CREATE TABLE ti2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=InnoDB;
+CREATE TABLE tm2(a INT PRIMARY KEY AUTO_INCREMENT, b INT, c INT) engine=MyISAM;
+INSERT INTO ti1 VALUES (1,1,1), (2,2,2);
+INSERT INTO ti2 VALUES (1,1,1), (2,2,2);
+INSERT INTO tm1 VALUES (1,1,1), (2,2,2);
+INSERT INTO tm2 VALUES (1,1,1), (2,2,2);
+
+--enable_info
+ALTER TABLE ti1;
+ALTER TABLE tm1;
+
+ALTER TABLE ti1 ADD COLUMN d VARCHAR(200);
+ALTER TABLE tm1 ADD COLUMN d VARCHAR(200);
+ALTER TABLE ti1 ADD COLUMN d2 VARCHAR(200);
+ALTER TABLE tm1 ADD COLUMN d2 VARCHAR(200);
+ALTER TABLE ti1 ADD COLUMN e ENUM('a', 'b') FIRST;
+ALTER TABLE tm1 ADD COLUMN e ENUM('a', 'b') FIRST;
+ALTER TABLE ti1 ADD COLUMN f INT AFTER a;
+ALTER TABLE tm1 ADD COLUMN f INT AFTER a;
+
+ALTER TABLE ti1 ADD INDEX ii1(b);
+ALTER TABLE tm1 ADD INDEX im1(b);
+ALTER TABLE ti1 ADD UNIQUE INDEX ii2 (c);
+ALTER TABLE tm1 ADD UNIQUE INDEX im2 (c);
+ALTER TABLE ti1 ADD FULLTEXT INDEX ii3 (d);
+ALTER TABLE tm1 ADD FULLTEXT INDEX im3 (d);
+ALTER TABLE ti1 ADD FULLTEXT INDEX ii4 (d2);
+ALTER TABLE tm1 ADD FULLTEXT INDEX im4 (d2);
+
+# Bug#14140038 INCONSISTENT HANDLING OF FULLTEXT INDEXES IN ALTER TABLE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
+ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+ALTER TABLE ti1 ADD PRIMARY KEY(a);
+ALTER TABLE tm1 ADD PRIMARY KEY(a);
+
+ALTER TABLE ti1 DROP INDEX ii3;
+ALTER TABLE tm1 DROP INDEX im3;
+
+ALTER TABLE ti1 DROP COLUMN d2;
+ALTER TABLE tm1 DROP COLUMN d2;
+
+ALTER TABLE ti1 ADD CONSTRAINT fi1 FOREIGN KEY (b) REFERENCES ti2(a);
+ALTER TABLE tm1 ADD CONSTRAINT fm1 FOREIGN KEY (b) REFERENCES tm2(a);
+
+ALTER TABLE ti1 ALTER COLUMN b SET DEFAULT 1;
+ALTER TABLE tm1 ALTER COLUMN b SET DEFAULT 1;
+ALTER TABLE ti1 ALTER COLUMN b DROP DEFAULT;
+ALTER TABLE tm1 ALTER COLUMN b DROP DEFAULT;
+
+# This will set both ALTER_COLUMN_NAME and COLUMN_DEFAULT_VALUE
+ALTER TABLE ti1 CHANGE COLUMN f g INT;
+ALTER TABLE tm1 CHANGE COLUMN f g INT;
+ALTER TABLE ti1 CHANGE COLUMN g h VARCHAR(20);
+ALTER TABLE tm1 CHANGE COLUMN g h VARCHAR(20);
+ALTER TABLE ti1 MODIFY COLUMN e ENUM('a', 'b', 'c');
+ALTER TABLE tm1 MODIFY COLUMN e ENUM('a', 'b', 'c');
+ALTER TABLE ti1 MODIFY COLUMN e INT;
+ALTER TABLE tm1 MODIFY COLUMN e INT;
+# This will set both ALTER_COLUMN_ORDER and COLUMN_DEFAULT_VALUE
+ALTER TABLE ti1 MODIFY COLUMN e INT AFTER h;
+ALTER TABLE tm1 MODIFY COLUMN e INT AFTER h;
+ALTER TABLE ti1 MODIFY COLUMN e INT FIRST;
+ALTER TABLE tm1 MODIFY COLUMN e INT FIRST;
+# This will set both ALTER_COLUMN_NOT_NULLABLE and COLUMN_DEFAULT_VALUE
+--disable_info
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+SET @orig_sql_mode = @@sql_mode;
+SET @@sql_mode = 'STRICT_TRANS_TABLES';
+--enable_info
+ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;
+--disable_info
+SET @@sql_mode = @orig_sql_mode;
+--enable_info
+ALTER TABLE tm1 MODIFY COLUMN c INT NOT NULL;
+# This will set both ALTER_COLUMN_NULLABLE and COLUMN_DEFAULT_VALUE
+ALTER TABLE ti1 MODIFY COLUMN c INT NULL;
+ALTER TABLE tm1 MODIFY COLUMN c INT NULL;
+# This will set both ALTER_COLUMN_EQUAL_PACK_LENGTH and COLUMN_DEFAULT_VALUE
+ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30);
+ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30);
+ALTER TABLE ti1 MODIFY COLUMN h VARCHAR(30) AFTER d;
+ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30) AFTER d;
+
+ALTER TABLE ti1 DROP COLUMN h;
+ALTER TABLE tm1 DROP COLUMN h;
+
+ALTER TABLE ti1 DROP INDEX ii2;
+ALTER TABLE tm1 DROP INDEX im2;
+ALTER TABLE ti1 DROP PRIMARY KEY;
+ALTER TABLE tm1 DROP PRIMARY KEY;
+
+ALTER TABLE ti1 DROP FOREIGN KEY fi1;
+ALTER TABLE tm1 DROP FOREIGN KEY fm1;
+
+ALTER TABLE ti1 RENAME TO ti3;
+ALTER TABLE tm1 RENAME TO tm3;
+ALTER TABLE ti3 RENAME TO ti1;
+ALTER TABLE tm3 RENAME TO tm1;
+
+ALTER TABLE ti1 ORDER BY b;
+ALTER TABLE tm1 ORDER BY b;
+
+ALTER TABLE ti1 CONVERT TO CHARACTER SET utf16;
+ALTER TABLE tm1 CONVERT TO CHARACTER SET utf16;
+ALTER TABLE ti1 DEFAULT CHARACTER SET utf8;
+ALTER TABLE tm1 DEFAULT CHARACTER SET utf8;
+
+ALTER TABLE ti1 FORCE;
+ALTER TABLE tm1 FORCE;
+
+ALTER TABLE ti1 AUTO_INCREMENT 3;
+ALTER TABLE tm1 AUTO_INCREMENT 3;
+ALTER TABLE ti1 AVG_ROW_LENGTH 10;
+ALTER TABLE tm1 AVG_ROW_LENGTH 10;
+ALTER TABLE ti1 CHECKSUM 1;
+ALTER TABLE tm1 CHECKSUM 1;
+ALTER TABLE ti1 COMMENT 'test';
+ALTER TABLE tm1 COMMENT 'test';
+ALTER TABLE ti1 MAX_ROWS 100;
+ALTER TABLE tm1 MAX_ROWS 100;
+ALTER TABLE ti1 MIN_ROWS 1;
+ALTER TABLE tm1 MIN_ROWS 1;
+ALTER TABLE ti1 PACK_KEYS 1;
+ALTER TABLE tm1 PACK_KEYS 1;
+
+--disable_info
+DROP TABLE ti1, ti2, tm1, tm2;
+
+--echo # Tests of >1 operation (InnoDB)
+
+CREATE TABLE ti1(a INT PRIMARY KEY AUTO_INCREMENT, b INT) engine=InnoDB;
+INSERT INTO ti1(b) VALUES (1), (2);
+
+--enable_info
+ALTER TABLE ti1 RENAME TO ti3, ADD INDEX ii1(b);
+
+ALTER TABLE ti3 DROP INDEX ii1, AUTO_INCREMENT 5;
+--disable_info
+INSERT INTO ti3(b) VALUES (5);
+--enable_info
+ALTER TABLE ti3 ADD INDEX ii1(b), AUTO_INCREMENT 7;
+--disable_info
+INSERT INTO ti3(b) VALUES (7);
+SELECT * FROM ti3;
+
+DROP TABLE ti3;
+
+--echo #
+--echo # 8: Scenario in which ALTER TABLE was returning an unwarranted
+--echo # ER_ILLEGAL_HA error at some point during work on this WL.
+--echo #
+
+CREATE TABLE tm1(i INT DEFAULT 1) engine=MyISAM;
+ALTER TABLE tm1 ADD INDEX ii1(i), ALTER COLUMN i DROP DEFAULT;
+DROP TABLE tm1;
diff --git a/mysql-test/t/alter_table_online.test b/mysql-test/t/alter_table_online.test
index 19096efe0fa..a9ce77d1445 100644
--- a/mysql-test/t/alter_table_online.test
+++ b/mysql-test/t/alter_table_online.test
@@ -1,5 +1,5 @@
#
-# Test of alter online table
+# Test of ALTER ONLINE TABLE syntax
#
--source include/have_innodb.inc
@@ -29,15 +29,15 @@ drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify b int default 5;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 change b new_name int;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify e enum('a','b','c');
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 comment "new comment";
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 rename to t2;
drop table t1;
@@ -49,52 +49,50 @@ drop table t1;
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 drop column b, add b int;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify b bigint;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify e enum('c','a','b');
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify c varchar(50);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify c varchar(100);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 add f int;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 engine=memory;
alter table t1 engine=innodb;
alter table t1 add index (b);
---error ER_CANT_DO_ONLINE
alter online table t1 add index c (c);
---error ER_CANT_DO_ONLINE
alter online table t1 drop index b;
drop table t1;
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
insert into t1 (a) values (1),(2),(3);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 drop column b, add b int;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify b bigint;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify e enum('c','a','b');
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify c varchar(50);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 modify c varchar(100);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 add f int;
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 engine=memory;
alter table t1 engine=innodb;
alter table t1 add index (b);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 add index c (c);
---error ER_CANT_DO_ONLINE
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter online table t1 drop index b;
drop table t1;
diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test
index fda20ca0ec5..e4067245622 100644
--- a/mysql-test/t/ctype_utf8mb4.test
+++ b/mysql-test/t/ctype_utf8mb4.test
@@ -1812,8 +1812,7 @@ SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
--echo #
---echo # Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH
---echo # LONGTEXT, UNION, USER VARIABLE
+--echo # Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH LONGTEXT, UNION, USER VARIABLE
--echo # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
--echo #
diff --git a/mysql-test/t/events_restart.test b/mysql-test/t/events_restart.test
index 83d28c0812d..c6152e5d961 100644
--- a/mysql-test/t/events_restart.test
+++ b/mysql-test/t/events_restart.test
@@ -107,3 +107,25 @@ let $wait_condition=
where db='events_test' and command = 'Connect' and user=current_user();
--source include/wait_condition.inc
+--echo #
+--echo # Test for bug#11748899 -- EVENT SET TO DISABLED AND ON COMPLETION
+--echo # NOT PRESERVE IS DELETED AT SERVER
+--echo #
+SELECT @@event_scheduler;
+USE test;
+--disable_warnings
+DROP EVENT IF EXISTS e1;
+--enable_warnings
+CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DISABLE DO SELECT 1;
+--replace_column 6 # 9 # 10 #
+SHOW EVENTS;
+
+--echo "Now we restart the server"
+--source include/restart_mysqld.inc
+USE test;
+SELECT @@event_scheduler;
+--replace_column 6 # 9 # 10 #
+SHOW EVENTS;
+DROP EVENT e1;
+
+--echo # end test for bug#11748899
diff --git a/mysql-test/t/flush_read_lock.test b/mysql-test/t/flush_read_lock.test
index f024bff0af7..e8ec07392b5 100644
--- a/mysql-test/t/flush_read_lock.test
+++ b/mysql-test/t/flush_read_lock.test
@@ -708,11 +708,10 @@ let $cleanup_stmt1= create table t2_base(j int);
--source include/check_ftwrl_incompatible.inc
--echo # 13.1.b) DROP TABLES which affects only temporary tables
---echo # in theory can be compatible with FTWRL.
---echo # In practice it is not yet.
+--echo # is compatible with FTWRL.
let $statement= drop table t2_temp;
-let $cleanup_stmt1= create temporary table t2_temp(j int);
---source include/check_ftwrl_incompatible.inc
+let $cleanup_stmt= create temporary table t2_temp(j int);
+--source include/check_ftwrl_compatible.inc
--echo #
--echo # 13.1.c) DROP TEMPORARY TABLES should be compatible with FTWRL.
@@ -1902,35 +1901,10 @@ let $statement= analyze table t3_temp_trans;
let $cleanup_stmt= ;
--source include/check_ftwrl_compatible.inc
--echo #
---echo # 39.2.c) Some statements do implicit commit and not
---echo # considered read-only. As result they are
---echo # not compatible with FTWRL.
---echo #
-flush tables with read lock;
---echo # Implicit commits are allowed under FTWRL.
-alter table t3_temp_trans add column c1 int;
-unlock tables;
---echo #
---echo # Switching to connection '$con_aux1'.
-connection $con_aux1;
-flush tables with read lock;
---echo # Switching to connection 'default'.
-connection default;
---send alter table t3_temp_trans drop column c1
---echo # Switching to connection '$con_aux1'.
-connection $con_aux1;
---echo # Check that ALTER TABLE is blocked.
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = "Waiting for commit lock" and
- info = "alter table t3_temp_trans drop column c1";
---source include/wait_condition.inc
-unlock tables;
---echo # Switching to connection 'default'.
-connection default;
---echo # Reap ALTER TABLE
---reap
-
+--echo # And ALTER TABLE:
+let $statement= alter table t3_temp_trans add column c1 int;
+let $cleanup_stmt= alter table t3_temp_trans drop column c1;
+--source include/check_ftwrl_compatible.inc
--echo #
--echo # 40) Test effect of implicit commit for DDL which is otherwise
diff --git a/mysql-test/t/innodb_mysql_sync.test b/mysql-test/t/innodb_mysql_sync.test
index 2f3bd643837..b1e21837404 100644
--- a/mysql-test/t/innodb_mysql_sync.test
+++ b/mysql-test/t/innodb_mysql_sync.test
@@ -168,7 +168,7 @@ connection default;
CREATE DATABASE db1;
CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
INSERT INTO db1.t1(value) VALUES (1), (2);
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
--echo # Sending:
--send ALTER TABLE db1.t1 ADD INDEX(value)
@@ -186,26 +186,27 @@ connection default;
--reap
DROP DATABASE db1;
---echo # Test 2: Primary index (implicit), should block reads.
+--echo # Test 2: Primary index (implicit), should block writes.
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
--echo # Sending:
---send ALTER TABLE t1 ADD UNIQUE INDEX(a)
+--send ALTER TABLE t1 ADD UNIQUE INDEX(a), LOCK=SHARED
--echo # Connection con1
connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
USE test;
+SELECT * FROM t1;
--echo # Sending:
---send SELECT * FROM t1
+--send UPDATE t1 SET a=NULL
--echo # Connection con2
connection con2;
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
WHERE state= 'Waiting for table metadata lock'
- AND info='SELECT * FROM t1';
+ AND info='UPDATE t1 SET a=NULL';
--source include/wait_condition.inc
SET DEBUG_SYNC= "now SIGNAL query";
@@ -216,30 +217,31 @@ connection default;
--echo # Connection con1
connection con1;
---echo # Reaping: SELECT * FROM t1
+--echo # Reaping: UPDATE t1 SET a=NULL
--reap
---echo # Test 3: Primary index (explicit), should block reads.
+--echo # Test 3: Primary index (explicit), should block writes.
--echo # Connection default
connection default;
ALTER TABLE t1 DROP INDEX a;
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
--echo # Sending:
---send ALTER TABLE t1 ADD PRIMARY KEY (a)
+--send ALTER TABLE t1 ADD PRIMARY KEY (a), LOCK=SHARED
--echo # Connection con1
connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
+SELECT * FROM t1;
--echo # Sending:
---send SELECT * FROM t1
+--send UPDATE t1 SET a=NULL
--echo # Connection con2
connection con2;
--echo # Waiting for SELECT to be blocked by the metadata lock on t1
let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
WHERE state= 'Waiting for table metadata lock'
- AND info='SELECT * FROM t1';
+ AND info='UPDATE t1 SET a=NULL';
--source include/wait_condition.inc
SET DEBUG_SYNC= "now SIGNAL query";
@@ -250,14 +252,14 @@ connection default;
--echo # Connection con1
connection con1;
---echo # Reaping: SELECT * FROM t1
+--echo # Reaping: UPDATE t1 SET a=NULL
--reap
--echo # Test 4: Secondary unique index, should not block reads.
--echo # Connection default
connection default;
-SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
+SET DEBUG_SYNC= "alter_table_inplace_after_lock_downgrade SIGNAL manage WAIT_FOR query";
--echo # Sending:
--send ALTER TABLE t1 ADD UNIQUE (b)
@@ -304,6 +306,292 @@ DROP TABLE t1;
disconnect con1;
+--echo #
+--echo # Bug#13417754 ASSERT IN ROW_DROP_DATABASE_FOR_MYSQL DURING DROP SCHEMA
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP DATABASE IF EXISTS db1;
+--enable_warnings
+
+CREATE TABLE t1(a int) engine=InnoDB;
+CREATE DATABASE db1;
+
+connect(con1, localhost, root);
+connect(con2, localhost, root);
+
+--echo # Connection con1
+connection con1;
+SET DEBUG_SYNC= 'after_innobase_rename_table SIGNAL locked WAIT_FOR continue';
+--echo # Sending:
+--send ALTER TABLE t1 RENAME db1.t1
+
+--echo # Connection con2
+connection con2;
+SET DEBUG_SYNC= 'now WAIT_FOR locked';
+--echo # DROP DATABASE db1 should now be blocked by ALTER TABLE
+--echo # Sending:
+--send DROP DATABASE db1
+
+--echo # Connection default
+connection default;
+--echo # Check that DROP DATABASE is blocked by IX lock on db1
+let $wait_condition=
+ SELECT COUNT(*) = 1 FROM information_schema.processlist
+ WHERE state = "Waiting for schema metadata lock" and
+ info = "DROP DATABASE db1";
+--source include/wait_condition.inc
+--echo # Resume ALTER TABLE
+SET DEBUG_SYNC= 'now SIGNAL continue';
+
+--echo # Connection con1
+connection con1;
+--echo # Reaping: ALTER TABLE t1 RENAME db1.t1;
+--reap
+
+--echo # Connection con2
+connection con2;
+--echo # Reaping: DROP DATABASE db1
+--reap
+
+--echo # Connection default;
+connection default;
+SET DEBUG_SYNC= 'RESET';
+disconnect con1;
+disconnect con2;
+
+
+--echo #
+--echo # WL#5534 Online ALTER, Phase 1
+--echo #
+
+--echo # Multi thread tests.
+--echo # See alter_table.test for single thread tests.
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT PRIMARY KEY, b INT) engine=InnoDB;
+INSERT INTO t1 VALUES (1,1), (2,2);
+SET DEBUG_SYNC= 'RESET';
+connect (con1, localhost, root);
+SET SESSION lock_wait_timeout= 1;
+
+--echo #
+--echo # 1: In-place + writes blocked.
+--echo #
+
+--echo # Connection default
+--connection default
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4';
+--echo # Sending:
+--send ALTER TABLE t1 ADD INDEX i1(b), ALGORITHM= INPLACE, LOCK= SHARED
+
+--echo # Connection con1;
+--connection con1
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (3,3);
+
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+--echo # Now both reads and writes should be blocked
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (4,4);
+
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR beforecommit';
+--echo # Still both reads and writes should be blocked.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (5,5);
+
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+--echo # Same here.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (6,6);
+
+SET DEBUG_SYNC= 'now SIGNAL continue4';
+--echo # Connection default
+--connection default
+--echo # Reaping ALTER TABLE ...
+--reap
+SET DEBUG_SYNC= 'RESET';
+DELETE FROM t1 WHERE a= 3;
+
+--echo #
+--echo # 2: Copy + writes blocked.
+--echo #
+
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_copy_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue3';
+--echo # Sending:
+--send ALTER TABLE t1 ADD INDEX i2(b), ALGORITHM= COPY, LOCK= SHARED
+
+--echo # Connection con1;
+--connection con1
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (3,3);
+
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+--echo # Now writes should be blocked, reads still allowed.
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (4,4);
+
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+--echo # Now both reads and writes should be blocked.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1 limit 1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (5,5);
+
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+--echo # Connection default
+--connection default
+--echo # Reaping ALTER TABLE ...
+--reap
+SET DEBUG_SYNC= 'RESET';
+DELETE FROM t1 WHERE a= 3;
+
+--echo #
+--echo # 3: In-place + writes allowed.
+--echo #
+
+--echo # TODO: Enable this test once WL#5526 is pushed
+--disable_parsing
+
+--echo # Connection default
+--connection default
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_downgrade SIGNAL downgraded WAIT_FOR continue3';
+SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue4';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue5';
+--echo # Sending:
+--send ALTER TABLE t1 ADD INDEX i3(b), ALGORITHM= INPLACE, LOCK= NONE
+
+--echo # Connection con1;
+--connection con1
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (3,3);
+
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+--echo # Now writes should be blocked, reads still allowed.
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (4,4);
+
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR downgraded';
+--echo # Now writes should be allowed again.
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (5,5);
+
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+SET DEBUG_SYNC= 'now WAIT_FOR beforecommit';
+--echo # Now both reads and writes should be blocked.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (6,6);
+
+SET DEBUG_SYNC= 'now SIGNAL continue4';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+--echo # Same here.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (7,7);
+
+SET DEBUG_SYNC= 'now SIGNAL continue5';
+--echo # Connection default
+--connection default
+--echo # Reaping ALTER TABLE ...
+--reap
+SET DEBUG_SYNC= 'RESET';
+DELETE FROM t1 WHERE a= 3 OR a= 4;
+
+--echo # TODO: Enable this test once WL#5526 is pushed
+--enable_parsing
+
+--echo #
+--echo # 4: In-place + reads and writes blocked.
+--echo #
+
+--echo # Connection default
+--connection default
+SET DEBUG_SYNC= 'alter_opened_table SIGNAL opened WAIT_FOR continue1';
+SET DEBUG_SYNC= 'alter_table_inplace_after_lock_upgrade SIGNAL upgraded WAIT_FOR continue2';
+SET DEBUG_SYNC= 'alter_table_inplace_before_commit SIGNAL beforecommit WAIT_FOR continue3';
+SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL binlog WAIT_FOR continue4';
+--echo # Sending:
+--send ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= INPLACE, LOCK= EXCLUSIVE
+
+--echo # Connection con1;
+--connection con1
+SET DEBUG_SYNC= 'now WAIT_FOR opened';
+--echo # At this point, neither reads nor writes should be blocked.
+SELECT * FROM t1;
+INSERT INTO t1 VALUES (3,3);
+
+SET DEBUG_SYNC= 'now SIGNAL continue1';
+SET DEBUG_SYNC= 'now WAIT_FOR upgraded';
+--echo # Now both reads and writes should be blocked.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (4,4);
+
+SET DEBUG_SYNC= 'now SIGNAL continue2';
+SET DEBUG_SYNC= 'now WAIT_FOR beforecommit';
+--echo # Same here.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (5,5);
+
+SET DEBUG_SYNC= 'now SIGNAL continue3';
+SET DEBUG_SYNC= 'now WAIT_FOR binlog';
+--echo # Same here.
+--error ER_LOCK_WAIT_TIMEOUT
+SELECT * FROM t1;
+--error ER_LOCK_WAIT_TIMEOUT
+INSERT INTO t1 VALUES (6,6);
+
+SET DEBUG_SYNC= 'now SIGNAL continue4';
+--echo # Connection default
+--connection default
+--echo # Reaping ALTER TABLE ...
+--reap
+SET DEBUG_SYNC= 'RESET';
+
+--connection default
+--disconnect con1
+DROP TABLE t1;
+SET DEBUG_SYNC= 'RESET';
+
+
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index e8f0bf8c511..0b900b14b0b 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -48,7 +48,7 @@ connection con1;
set @long_query_time = 2;
set session long_query_time = @long_query_time;
select sleep(@long_query_time + 1);
---replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
--echo # Switch to connection default
connection default;
@@ -58,7 +58,7 @@ set global slow_query_log= ON;
connection con1;
set session long_query_time = @long_query_time;
select sleep(@long_query_time + 1);
---replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
--echo # Switch to connection default
connection default;
diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test
index eb652946672..0b9932c2c4d 100644
--- a/mysql-test/t/log_tables.test
+++ b/mysql-test/t/log_tables.test
@@ -180,7 +180,7 @@ drop table bug16905;
truncate table mysql.slow_log;
set session long_query_time=1;
select sleep(2);
---replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME
+--replace_column 1 TIMESTAMP 2 USER_HOST 3 QUERY_TIME 12 THREAD_ID
select * from mysql.slow_log;
set @@session.long_query_time = @saved_long_query_time;
@@ -290,10 +290,10 @@ drop table mysql.slow_log;
use mysql;
CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `event_time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
`user_host` mediumtext NOT NULL,
- `thread_id` int(11) 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
@@ -311,7 +311,8 @@ CREATE TABLE `slow_log` (
`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
+ `sql_text` mediumtext NOT NULL,
+ `thread_id` BIGINT(21) UNSIGNED NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
set global general_log='ON';
@@ -746,6 +747,7 @@ BEGIN
DECLARE start_time, query_time, lock_time CHAR(28);
DECLARE user_host MEDIUMTEXT;
DECLARE rows_set, rows_examined, last_insert_id, insert_id, server_id INT;
+ DECLARE thread_id BIGINT UNSIGNED;
DECLARE dbname MEDIUMTEXT;
DECLARE sql_text BLOB;
DECLARE done INT DEFAULT 0;
@@ -763,7 +765,7 @@ BEGIN
FETCH cur1 INTO
start_time, user_host, query_time, lock_time,
rows_set, rows_examined, dbname, last_insert_id,
- insert_id, server_id, sql_text;
+ insert_id, server_id, sql_text, thread_id;
END;
IF NOT done THEN
@@ -771,7 +773,7 @@ BEGIN
INSERT INTO
`db_17876.slow_log_data`
VALUES(start_time, user_host, query_time, lock_time, rows_set, rows_examined,
- dbname, last_insert_id, insert_id, server_id, sql_text);
+ dbname, last_insert_id, insert_id, server_id, sql_text, thread_id);
END;
END IF;
END;
diff --git a/mysql-test/t/lowercase_table4.test b/mysql-test/t/lowercase_table4.test
index 3758ab62214..d13b1a16be1 100644
--- a/mysql-test/t/lowercase_table4.test
+++ b/mysql-test/t/lowercase_table4.test
@@ -72,7 +72,7 @@ CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
query_vertical SHOW CREATE TABLE `Table2`;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
+query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
DROP TABLE `Table2`;
DROP TABLE `Table1`;
@@ -101,7 +101,7 @@ CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
query_vertical SHOW CREATE TABLE Product_Order;
query_vertical SHOW CREATE TABLE Product;
query_vertical SHOW CREATE TABLE Customer;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS;
+query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
DROP TABLE Product_Order;
DROP TABLE Product;
DROP TABLE Customer;
diff --git a/mysql-test/t/mdl_sync.test b/mysql-test/t/mdl_sync.test
index fef8a9848ca..57eea6c4fc1 100644
--- a/mysql-test/t/mdl_sync.test
+++ b/mysql-test/t/mdl_sync.test
@@ -38,7 +38,7 @@ lock tables t2 read;
connection con1;
--echo connection: con1
-set debug_sync='mdl_upgrade_shared_lock_to_exclusive SIGNAL parked WAIT_FOR go';
+set debug_sync='mdl_upgrade_lock SIGNAL parked WAIT_FOR go';
--send alter table t1 rename t3
connection default;
@@ -110,8 +110,13 @@ select column_name from information_schema.columns where
table_schema='test' and table_name='t1';
select count(*) from t1;
insert into t1 values (1), (1);
+--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
+--echo # which will fail when constructing .frm and thus obtaining SU metadata
+--echo # lock.
+--error ER_KEY_COLUMN_DOES_NOT_EXITS
+alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
---echo # which will fail after opening the table and thus obtaining SNW metadata
+--echo # which will fail during copying the table and thus obtaining SNW metadata
--echo # lock.
--error ER_DUP_ENTRY
alter table t1 add primary key (c1);
@@ -230,8 +235,13 @@ select column_name from information_schema.columns where
table_schema='test' and table_name='t1';
select count(*) from t1;
insert into t1 values (1);
+--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
+--echo # which will fail when constructing .frm and thus obtaining SU metadata
+--echo # lock.
+--error ER_KEY_COLUMN_DOES_NOT_EXITS
+alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
---echo # which will fail after opening the table and thus obtaining SNW metadata
+--echo # which will fail during copying the table and thus obtaining SNW metadata
--echo # lock.
--error ER_DUP_ENTRY
alter table t1 add primary key (c1);
@@ -359,8 +369,13 @@ select column_name from information_schema.columns where
table_schema='test' and table_name='t1';
select count(*) from t1;
insert into t1 values (1);
+--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
+--echo # which will fail when constructing .frm and thus obtaining SU metadata
+--echo # lock.
+--error ER_KEY_COLUMN_DOES_NOT_EXITS
+alter table t1 add index (not_exist);
--echo # Check that SNW lock is compatible with it. To do this use ALTER TABLE
---echo # which will fail after opening the table and thus obtaining SNW metadata
+--echo # which will fail during copying the table and thus obtaining SNW metadata
--echo # lock.
--error ER_DUP_ENTRY
alter table t1 add primary key (c1);
@@ -477,8 +492,13 @@ select column_name from information_schema.columns where
select * from t1;
--enable_result_log
insert into t1 values (1);
+--echo # Check that SU lock is compatible with it. To do this use ALTER TABLE
+--echo # which will fail when constructing .frm and thus obtaining SU metadata
+--echo # lock.
+--error ER_KEY_COLUMN_DOES_NOT_EXITS
+alter table t1 add index (not_exist);
--echo # Check that SNW lock is not compatible with SW lock.
---echo # Again we use ALTER TABLE which fails after opening
+--echo # Again we use ALTER TABLE which fails during copying
--echo # the table to avoid upgrade of SNW -> X.
--echo # Sending:
--send alter table t1 add primary key (c1);
@@ -570,16 +590,144 @@ rename table t2 to t1;
connection default;
--echo #
--echo #
---echo # 5) Acquire SNW lock on the table. We have to use DEBUG_SYNC for
---echo # this, to prevent SNW from being immediately upgraded to X.
+--echo # 5) Acquire SU lock on the table. We have to use DEBUG_SYNC for
+--echo # this, to prevent SU from being immediately upgraded to X.
--echo #
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
+--echo # Sending:
+--send alter table t1 add primary key (c1);
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+set debug_sync= 'now WAIT_FOR locked';
+--echo # Check that S, SH, SR and SW locks are compatible with it.
+handler t1 open;
+handler t1 close;
+select column_name from information_schema.columns where
+ table_schema='test' and table_name='t1';
+select count(*) from t1;
+delete from t1 limit 1;
+--echo # Check that SU lock is incompatible with SU lock.
+--echo # Sending:
+--send alter table t1 add primary key (c1);
+--echo #
+--echo # Switching to connection 'mdl_con2'.
+connection mdl_con2;
+--echo # Check that the above ALTER is blocked because of SU lock.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "alter table t1 add primary key (c1)";
+--source include/wait_condition.inc
+--echo # Unblock ALTERs.
+set debug_sync= 'now SIGNAL finish';
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Reaping first ALTER TABLE.
+--error ER_DUP_ENTRY
+--reap
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+--echo # Reaping another ALTER TABLE.
+--error ER_DUP_ENTRY
+--reap
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
--echo # Sending:
--send alter table t1 add primary key (c1);
--echo #
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
set debug_sync= 'now WAIT_FOR locked';
+--echo # Check that SNRW lock is incompatible with SU lock.
+--echo # Sending:
+--send lock table t1 write;
+--echo #
+--echo # Switching to connection 'mdl_con2'.
+connection mdl_con2;
+--echo # Check that the above LOCK TABLES is blocked because of SU lock.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "lock table t1 write";
+--source include/wait_condition.inc
+--echo # Unblock ALTER and thus LOCK TABLES.
+set debug_sync= 'now SIGNAL finish';
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Reaping ALTER TABLE.
+--error ER_DUP_ENTRY
+--reap
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+--echo # Reaping LOCK TABLES
+--reap
+insert into t1 values (1);
+unlock tables;
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+set debug_sync= 'alter_opened_table SIGNAL locked WAIT_FOR finish';
+--echo # Sending:
+--send alter table t1 add primary key (c1);
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+set debug_sync= 'now WAIT_FOR locked';
+--echo # Check that X lock is incompatible with SU lock.
+--echo # Sending:
+--send rename table t1 to t2;
+--echo #
+--echo # Switching to connection 'mdl_con2'.
+connection mdl_con2;
+--echo # Check that the above RENAME is blocked because of SU lock.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table metadata lock" and
+ info = "rename table t1 to t2";
+--source include/wait_condition.inc
+--echo # Unblock ALTER and thus RENAME TABLE.
+set debug_sync= 'now SIGNAL finish';
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+--echo # Now we have ALTER TABLE with SU->SNW and RENAME TABLE with pending
+--echo # X-lock. In this case ALTER TABLE should be chosen as victim.
+--echo # Reaping ALTER TABLE.
+--error ER_LOCK_DEADLOCK
+--reap
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+--echo # Reaping RENAME TABLE
+--reap
+--echo # Revert back to original state of things.
+rename table t2 to t1;
+--echo #
+--echo # There is no need to check that upgrade from SNW/SNRW to X is
+--echo # blocked by presence of another SU lock because SNW/SNRW is
+--echo # incompatible with SU anyway.
+--echo #
+--echo # Switching to connection 'default'.
+connection default;
+--echo #
+--echo #
+--echo # 6) Acquire SNW lock on the table. We have to use DEBUG_SYNC for
+--echo # this, to prevent SNW from being immediately upgraded to X.
+--echo #
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
+--echo # Sending:
+--send alter table t1 add primary key (c1), lock=shared, algorithm=copy;
+--echo #
+--echo # Switching to connection 'mdl_con1'.
+connection mdl_con1;
+set debug_sync= 'now WAIT_FOR locked';
--echo # Check that S, SH and SR locks are compatible with it.
handler t1 open;
handler t1 close;
@@ -614,14 +762,14 @@ connection mdl_con1;
--echo #
--echo # Switching to connection 'default'.
connection default;
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
--echo # Sending:
---send alter table t1 add primary key (c1);
+--send alter table t1 add primary key (c1), lock=shared, algorithm=copy;
--echo #
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
set debug_sync= 'now WAIT_FOR locked';
---echo # Check that SNW lock is incompatible with SNW lock.
+--echo # Check that SU lock is incompatible with SNW lock.
--echo # Sending:
--send alter table t1 add primary key (c1);
--echo #
@@ -648,11 +796,15 @@ connection mdl_con1;
--error ER_DUP_ENTRY
--reap
--echo #
+--echo # Note that we can't easily check SNW vs SNW locks since
+--echo # SNW is only used by ALTER TABLE after upgrading from SU
+--echo # and SU is also incompatible with SNW.
+--echo #
--echo # Switching to connection 'default'.
connection default;
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
--echo # Sending:
---send alter table t1 add primary key (c1);
+--send alter table t1 add primary key (c1), lock=shared, algorithm=copy;
--echo #
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
@@ -687,9 +839,9 @@ unlock tables;
--echo #
--echo # Switching to connection 'default'.
connection default;
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
--echo # Sending:
---send alter table t1 add primary key (c1);
+--send alter table t1 add primary key (c1), algorithm=copy, lock=shared;
--echo #
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
@@ -730,7 +882,7 @@ rename table t2 to t1;
connection default;
--echo #
--echo #
---echo # 6) Acquire SNRW lock on the table.
+--echo # 7) Acquire SNRW lock on the table.
--echo #
--echo #
lock table t1 write;
@@ -794,13 +946,13 @@ lock table t1 write;
--echo #
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
---echo # Check that SNW lock is incompatible with SNRW lock.
+--echo # Check that SU lock is incompatible with SNRW lock.
--echo # Sending:
--send alter table t1 add primary key (c1);
--echo #
--echo # Switching to connection 'default'.
connection default;
---echo # Check that the above ALTER is blocked because of UNWR lock.
+--echo # Check that the above ALTER is blocked because of SNRW lock.
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table metadata lock" and
@@ -815,6 +967,10 @@ connection mdl_con1;
--error ER_DUP_ENTRY
--reap
--echo #
+--echo # Note that we can't easily check SNW vs SNRW locks since
+--echo # SNW is only used by ALTER TABLE after upgrading from SU
+--echo # and SU is also incompatible with SNRW.
+--echo #
--echo # Switching to connection 'default'.
connection default;
lock table t1 write;
@@ -879,7 +1035,7 @@ rename table t2 to t1;
connection default;
--echo #
--echo #
---echo # 7) Now do the same round of tests for X lock. We use additional
+--echo # 8) Now do the same round of tests for X lock. We use additional
--echo # table to get long-lived lock of this type.
--echo #
create table t2 (c1 int);
@@ -1083,7 +1239,7 @@ select count(*) = 1 from information_schema.processlist
where state = "Waiting for table metadata lock" and
info = "rename table t1 to t2";
--source include/wait_condition.inc
---echo # Check that SNW lock is incompatible with X lock.
+--echo # Check that SU lock is incompatible with X lock.
--echo # Sending:
--send alter table t1 add primary key (c1);
--echo #
@@ -1110,7 +1266,11 @@ connection mdl_con1;
--echo # Reaping ALTER.
--error ER_DUP_ENTRY
--reap
---echo #
+--echo #
+--echo # Note that we can't easily check SNW vs X locks since
+--echo # SNW is only used by ALTER TABLE after upgrading from SU
+--echo # and SU is also incompatible with X.
+--echo #
--echo # Switching to connection 'mdl_con2'.
connection mdl_con2;
--echo # Prepare for blocking RENAME TABLE.
@@ -1208,6 +1368,9 @@ rename table t3 to t1;
--echo # are pending. I.e. let us test rules for priorities between
--echo # different types of metadata locks.
--echo #
+--echo # Note: No tests for pending SU lock as this lock requires
+--echo # even stronger active or pending lock.
+--echo #
--echo #
--echo # Switching to connection 'mdl_con2'.
@@ -1657,6 +1820,9 @@ connection default;
--echo # transactional context. Obviously we are mostly interested
--echo # in conflicting types of locks.
--echo #
+--echo # Note: No tests for active/pending SU lock since
+--echo # ALTER TABLE is in its own transaction.
+--echo #
--echo #
--echo # 1) Let us check how various locks used within transactional
@@ -1673,9 +1839,9 @@ connection mdl_con1;
--echo # We have to use DEBUG_SYNC facility as otherwise SNW lock
--echo # will be immediately released (or upgraded to X lock).
insert into t2 values (1), (1);
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
--echo # Sending:
---send alter table t2 add primary key (c1);
+--send alter table t2 add primary key (c1), algorithm=copy, lock=shared;
--echo #
--echo # Switching to connection 'default'.
connection default;
@@ -1724,9 +1890,9 @@ select count(*) from t1;
--echo # Switching to connection 'mdl_con1'.
connection mdl_con1;
--echo # Create an active SNW lock on t1.
-set debug_sync= 'after_open_table_mdl_shared SIGNAL locked WAIT_FOR finish';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL locked WAIT_FOR finish';
--echo # Sending:
---send alter table t1 add primary key (c1);
+--send alter table t1 add primary key (c1), algorithm=copy, lock=shared;
--echo #
--echo # Switching to connection 'default'.
connection default;
@@ -2845,7 +3011,7 @@ drop tables t1, t2;
create table t1 (i int);
--echo # Ensure that ALTER waits once it has acquired SNW lock.
-set debug_sync='after_open_table_mdl_shared SIGNAL parked1 WAIT_FOR go1';
+set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL parked1 WAIT_FOR go1';
--echo # Sending:
--send alter table t1 add column j int
@@ -3345,18 +3511,33 @@ drop tables if exists t1, t2;
--enable_warnings
connect (con46044, localhost, root,,);
connect (con46044_2, localhost, root,,);
+connect (con46044_3, localhost, root,,);
connection default;
create table t1 (i int);
+insert into t1 values(1);
--echo # Let us check that we won't deadlock if during filling
--echo # of I_S table we encounter conflicting metadata lock
--echo # which owner is in its turn waiting for our connection.
lock tables t1 read;
+--echo # Switching to connection 'con46044_2'.
+connection con46044_2;
+--echo # Sending:
+--send update t1 set i = 2
+
--echo # Switching to connection 'con46044'.
connection con46044;
+
+--echo # Waiting until UPDATE t1 SET ... is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table level lock" and
+ info = "update t1 set i = 2";
+--source include/wait_condition.inc
+
--echo # Sending:
---send create table t2 select * from t1 for update;
+--send create table t2 select * from t1;
--echo # Switching to connection 'default'.
connection default;
@@ -3364,7 +3545,7 @@ connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table level lock" and
- info = "create table t2 select * from t1 for update";
+ info = "create table t2 select * from t1";
--source include/wait_condition.inc
--echo # First let us check that SHOW FIELDS/DESCRIBE doesn't
@@ -3395,6 +3576,10 @@ connection con46044;
--reap
drop table t2;
+connection con46044_2;
+--echo # Reaping UPDATE t1 statement
+--reap
+
--echo #
--echo # Let us also check that queries to I_S wait for conflicting metadata
--echo # locks to go away instead of skipping table with a warning in cases
@@ -3407,10 +3592,23 @@ drop table t2;
connection con46044_2;
lock tables t1 read;
+--echo # Switching to connection 'con46044_3'.
+connection con46044_3;
+--echo # Sending:
+send update t1 set i = 3;
+
--echo # Switching to connection 'con46044'.
connection con46044;
+
+--echo # Waiting until UPDATE t1 SET ... is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table level lock" and
+ info = "update t1 set i = 3";
+--source include/wait_condition.inc
+
--echo # Sending:
---send create table t2 select * from t1 for update;
+--send create table t2 select * from t1;
--echo # Switching to connection 'default'.
connection default;
@@ -3418,7 +3616,7 @@ connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table level lock" and
- info = "create table t2 select * from t1 for update";
+ info = "create table t2 select * from t1";
--source include/wait_condition.inc
--echo # Let us check that SHOW FIELDS/DESCRIBE gets blocked.
@@ -3447,14 +3645,31 @@ connection default;
--reap
drop table t2;
+connection con46044_3;
+--echo # Reaping UPDATE t1 statement
+--reap
+
--echo # Switching to connection 'con46044_2'.
connection con46044_2;
lock tables t1 read;
+--echo # Switching to connection 'con46044_3'.
+connection con46044_3;
+--echo # Sending:
+--send update t1 set i = 4
+
--echo # Switching to connection 'con46044'.
connection con46044;
+
+--echo # Waiting until UPDATE t1 SET ... is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table level lock" and
+ info = "update t1 set i = 4";
+--source include/wait_condition.inc
+
--echo # Sending:
---send create table t2 select * from t1 for update;
+--send create table t2 select * from t1;
--echo # Switching to connection 'default'.
connection default;
@@ -3462,7 +3677,7 @@ connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table level lock" and
- info = "create table t2 select * from t1 for update";
+ info = "create table t2 select * from t1";
--source include/wait_condition.inc
--echo # Check that I_S query which reads only .FRMs gets blocked.
@@ -3491,14 +3706,31 @@ connection default;
--reap
drop table t2;
+connection con46044_3;
+--echo # Reaping UPDATE t1 statement
+--reap
+
--echo # Switching to connection 'con46044_2'.
connection con46044_2;
lock tables t1 read;
+--echo # Switching to connection 'con46044_3'.
+connection con46044_3;
+--echo # Sending:
+--send update t1 set i = 5
+
--echo # Switching to connection 'con46044'.
connection con46044;
+
+--echo # Waiting until UPDATE t1 SET ... is blocked.
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = "Waiting for table level lock" and
+ info = "update t1 set i = 5";
+--source include/wait_condition.inc
+
--echo # Sending:
---send create table t2 select * from t1 for update;
+--send create table t2 select * from t1;
--echo # Switching to connection 'default'.
connection default;
@@ -3506,7 +3738,7 @@ connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
where state = "Waiting for table level lock" and
- info = "create table t2 select * from t1 for update";
+ info = "create table t2 select * from t1";
--source include/wait_condition.inc
--echo # Finally, check that I_S query which does full-blown table open
@@ -3536,11 +3768,16 @@ connection default;
--reap
drop table t2;
+connection con46044_3;
+--echo # Reaping UPDATE t1 statement
+--reap
+
--echo # Switching to connection 'default'.
connection default;
--echo # Clean-up.
disconnect con46044;
disconnect con46044_2;
+disconnect con46044_3;
drop table t1;
@@ -3563,7 +3800,7 @@ select * from t1 where c2 = 3;
--echo #
--echo # Switching to connection 'con46273'.
connection con46273;
-set debug_sync='after_lock_tables_takes_lock SIGNAL alter_table_locked WAIT_FOR alter_go';
+set debug_sync='alter_table_copy_after_lock_upgrade SIGNAL alter_table_locked WAIT_FOR alter_go';
--send alter table t1 add column e int, rename to t2;
--echo #
@@ -3826,9 +4063,9 @@ create table t1 (i int) engine=InnoDB;
--echo # Switching to connection 'con50913_1'.
connection con50913_1;
-set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go';
--echo # Sending:
---send alter table t1 add column j int
+--send alter table t1 add column j int, ALGORITHM=COPY
--echo # Switching to connection 'default'.
connection default;
@@ -3897,7 +4134,7 @@ select * from t1;
connection default;
--echo # Start ALTER TABLE which will acquire SNW lock and
--echo # table lock and get blocked on sync point.
-set debug_sync= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go';
+set debug_sync= 'alter_table_copy_after_lock_upgrade SIGNAL parked WAIT_FOR go';
--echo # Sending:
--send alter table t1 add column j int
@@ -4562,7 +4799,9 @@ connect(con2, localhost, root);
--echo # Connection con1
connection con1;
-SET DEBUG_SYNC= 'mdl_upgrade_shared_lock_to_exclusive SIGNAL upgrade WAIT_FOR continue';
+--echo # We need EXECUTE 2 since ALTER TABLE does SU => SNW => X and we want
+--echo # to stop at the second upgrade.
+SET DEBUG_SYNC= 'mdl_upgrade_lock SIGNAL upgrade WAIT_FOR continue EXECUTE 2';
--echo # Sending:
--send ALTER TABLE m1 engine=MERGE UNION=(t2, t1)
@@ -4570,6 +4809,8 @@ SET DEBUG_SYNC= 'mdl_upgrade_shared_lock_to_exclusive SIGNAL upgrade WAIT_FOR co
connection con2;
--echo # Waiting for ALTER TABLE to try lock upgrade
SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
+SET DEBUG_SYNC= 'now SIGNAL continue';
+SET DEBUG_SYNC= 'now WAIT_FOR upgrade';
--echo # Sending:
--send DELETE FROM t2 WHERE a = 3
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index bad59ff09c3..713b3ed7347 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -89,6 +89,16 @@ AND A.c = 343;
DROP TABLE t1;
--echo #
+--echo # Bug#59503: explain extended crash in get_mm_leaf
+--echo #
+CREATE TABLE t1 (a VARCHAR(51) CHARACTER SET latin1)
+ENGINE=MyISAM
+PARTITION BY KEY (a) PARTITIONS 1;
+INSERT INTO t1 VALUES ('a'),('b'),('c');
+EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE a > 1;
+DROP TABLE t1;
+
+--echo #
--echo # Bug#57778: failed primary key add to partitioned innodb table
--echo # inconsistent and crashes
--echo #
@@ -303,6 +313,31 @@ DROP TABLE t1;
#
# Bug#35765: ALTER TABLE produces wrong error when non-existent storage engine
# used
+SET sql_mode=no_engine_substitution;
+--error ER_UNKNOWN_STORAGE_ENGINE
+CREATE TABLE t1 (a INT)
+ENGINE=NonExistentEngine;
+--error ER_UNKNOWN_STORAGE_ENGINE
+CREATE TABLE t1 (a INT)
+ENGINE=NonExistentEngine
+PARTITION BY HASH (a);
+CREATE TABLE t1 (a INT)
+ENGINE=Memory;
+--error ER_UNKNOWN_STORAGE_ENGINE
+ALTER TABLE t1 ENGINE=NonExistentEngine;
+# OK to only specify one partitions engine, since it is already assigned at
+# table level (after create, it is specified on all levels and all parts).
+--error ER_UNKNOWN_STORAGE_ENGINE
+ALTER TABLE t1
+PARTITION BY HASH (a)
+(PARTITION p0 ENGINE=Memory,
+ PARTITION p1 ENGINE=NonExistentEngine);
+--error ER_UNKNOWN_STORAGE_ENGINE
+ALTER TABLE t1 ENGINE=NonExistentEngine;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+SET sql_mode='';
CREATE TABLE t1 (a INT)
ENGINE=NonExistentEngine;
DROP TABLE t1;
@@ -322,6 +357,7 @@ PARTITION BY HASH (a)
ALTER TABLE t1 ENGINE=NonExistentEngine;
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode=DEFAULT;
#
# Bug#40494: Crash MYSQL server crashes on range access with partitioning
@@ -990,13 +1026,13 @@ drop table t1;
#
# Bug #16775: Wrong engine type stored for subpartition
#
-set session storage_engine= 'memory';
+set session default_storage_engine= 'memory';
create table t1 (f_int1 int(11) default null) engine = memory
partition by range (f_int1) subpartition by hash (f_int1)
(partition part1 values less than (1000)
(subpartition subpart11 engine = memory));
drop table t1;
-set session storage_engine='myisam';
+set session default_storage_engine='myisam';
#
# Bug #16782: Crash using REPLACE on table with primary key
@@ -1840,8 +1876,7 @@ WHERE t1.id IN (
SELECT distinct id
FROM t4
WHERE taken BETWEEN @f_date AND date_add(@t_date, INTERVAL 1 DAY))
-ORDER BY t1.id
-;
+ORDER BY t1.id;
drop table t1, t2, t4;
diff --git a/mysql-test/t/partition_binlog.test b/mysql-test/t/partition_binlog.test
index 9869be75759..d6986c86ebe 100644
--- a/mysql-test/t/partition_binlog.test
+++ b/mysql-test/t/partition_binlog.test
@@ -20,7 +20,7 @@ INSERT INTO t1 VALUES (1), (10), (100), (1000);
--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1)
---error ER_WRONG_PARTITION_NAME
+--error ER_UNKNOWN_PARTITION
ALTER TABLE t1 TRUNCATE PARTITION p1;
--error ER_DROP_PARTITION_NON_EXISTENT
ALTER TABLE t1 DROP PARTITION p1;
diff --git a/mysql-test/t/partition_debug_sync.test b/mysql-test/t/partition_debug_sync.test
index bcec5503e6f..3ca21c2185a 100644
--- a/mysql-test/t/partition_debug_sync.test
+++ b/mysql-test/t/partition_debug_sync.test
@@ -5,6 +5,8 @@
#
--source include/have_partition.inc
--source include/have_debug_sync.inc
+--source include/have_debug.inc
+--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
@@ -16,7 +18,9 @@ SET DEBUG_SYNC= 'RESET';
--echo # Test when remove partitioning is done while drop table is waiting
--echo # for the table.
--echo # After MDL was introduced, there is no longer any race, so test is done
---echo # by adding a small sleep to verify that the delete waits.
+--echo # by adding a small sleep to verify that the delete waits. This happens
+--echo # only until ALTER tries to upgrade its MDL lock, which ends up in MDL
+--echo # deadlock which is correctly reported.
connect(con1, localhost, root,,);
--echo # Con 1
SET DEBUG_SYNC= 'RESET';
@@ -31,16 +35,17 @@ ENGINE = MYISAM
PARTITION p2 VALUES LESS THAN (100),
PARTITION p3 VALUES LESS THAN MAXVALUE ) */;
SET DEBUG_SYNC= 'alter_table_before_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter';
-SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed';
+SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_upgrade';
--send ALTER TABLE t1 REMOVE PARTITIONING
connection default;
--echo # Con default
SET DEBUG_SYNC= 'now WAIT_FOR removing_partitioning';
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_alter';
-SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR partitioning_removed';
+SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR waiting_for_upgrade';
DROP TABLE IF EXISTS t1;
--echo # Con 1
connection con1;
+--error ER_LOCK_DEADLOCK
--reap
connection default;
SET DEBUG_SYNC= 'RESET';
@@ -77,8 +82,54 @@ connection con1;
--reap
SET DEBUG_SYNC= 'RESET';
disconnect con1;
+--source include/wait_until_disconnected.inc
connection default;
--echo # Con default
SET DEBUG_SYNC= 'RESET';
--echo End of 5.1 tests
+
+--echo #
+--echo # Coverage test for non pruned ha_partition::store_lock()
+--echo #
+CREATE TABLE t1 (a int) ENGINE = InnoDB;
+CREATE TABLE t2 (a int PRIMARY KEY)
+ENGINE = InnoDB PARTITION BY HASH (a) PARTITIONS 3;
+
+HANDLER t1 OPEN;
+
+--echo # Con1
+connect (con1, localhost, root,,);
+
+LOCK TABLES t1 WRITE, t2 READ;
+
+--echo # Default
+connection default;
+
+SET DEBUG_SYNC="wait_for_lock SIGNAL locking";
+send INSERT INTO t2 VALUES (1), (2), (3);
+
+--echo # Con1
+connection con1;
+SET DEBUG_SYNC="now WAIT_FOR locking";
+
+send ALTER TABLE t1 ADD COLUMN b int;
+
+--echo # Default
+connection default;
+--error ER_LOCK_ABORTED
+--reap
+
+SELECT 1;
+
+--echo # Con1
+connection con1;
+--reap
+
+UNLOCK TABLES;
+--disconnect con1
+
+--echo # Default
+connection default;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index ea8faec0d51..7d903fa1165 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -41,6 +41,17 @@ EXPLAIN SELECT b FROM t1 WHERE b between 'L' and 'N' AND a > -100;
DROP TABLE t1;
--echo #
+--echo # Bug#13007154: Crash in keys_to_use_for_scanning with ORDER BY
+--echo # and PARTITIONING
+--echo #
+CREATE TABLE t1 (a INT, KEY(a))
+ENGINE = InnoDB
+PARTITION BY KEY (a) PARTITIONS 1;
+SELECT 1 FROM t1 WHERE a > (SELECT LAST_INSERT_ID() FROM t1 LIMIT 0)
+ORDER BY a;
+DROP TABLE t1;
+
+--echo #
--echo # Bug#56287: crash when using Partition datetime in sub in query
--echo #
@@ -71,7 +82,7 @@ DROP TABLE t1;
--echo # SELECT is not detected
--echo #
-SET @old_innodb_thread_concurrency:= @@innodb_thread_concurrency;
+SET @old_innodb_thread_concurrency := @@innodb_thread_concurrency;
SET @old_innodb_thread_sleep_delay := @@innodb_thread_sleep_delay;
SET GLOBAL innodb_thread_concurrency = 1;
diff --git a/mysql-test/t/partition_mgm_err.test b/mysql-test/t/partition_mgm_err.test
index f921fa8ebca..0987c427fc7 100644
--- a/mysql-test/t/partition_mgm_err.test
+++ b/mysql-test/t/partition_mgm_err.test
@@ -147,7 +147,7 @@ PARTITION BY KEY (a)
ALTER TABLE t1 ADD PARTITION PARTITIONS 0;
--error ER_TOO_MANY_PARTITIONS_ERROR
-ALTER TABLE t1 ADD PARTITION PARTITIONS 1024;
+ALTER TABLE t1 ADD PARTITION PARTITIONS 8192;
--error ER_ONLY_ON_RANGE_LIST_PARTITION
ALTER TABLE t1 DROP PARTITION x0;
diff --git a/mysql-test/t/partition_myisam.test b/mysql-test/t/partition_myisam.test
index 49c5d793169..a33b9e19fbf 100644
--- a/mysql-test/t/partition_myisam.test
+++ b/mysql-test/t/partition_myisam.test
@@ -1,5 +1,4 @@
--- source include/have_partition.inc
-
+--source include/have_partition.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
--enable_warnings
@@ -10,53 +9,88 @@ DROP TABLE IF EXISTS t1, t2;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
-
--echo #
---echo # Bug#50036: Inconsistent errors when using TIMESTAMP
---echo # columns/expressions
-
---echo # Added test with existing TIMESTAMP partitioning (when it was allowed).
-CREATE TABLE t1 (a TIMESTAMP)
-ENGINE = MyISAM
-PARTITION BY HASH (UNIX_TIMESTAMP(a));
-INSERT INTO t1 VALUES ('2000-01-02 03:04:05');
---sorted_result
-SELECT * FROM t1;
-FLUSH TABLES;
---echo # replacing t1.frm with TO_DAYS(a) which was allowed earlier.
---remove_file $MYSQLD_DATADIR/test/t1.frm
---copy_file std_data/parts/t1TIMESTAMP.frm $MYSQLD_DATADIR/test/t1.frm
---echo # Disable warnings, since the result would differ when running with
---echo # --ps-protocol (only for the 'SELECT * FROM t1' statement).
---disable_warnings
---sorted_result
-SELECT * FROM t1;
---enable_warnings
---replace_result MyISAM <curr_engine> InnoDB <curr_engine>
-SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
---sorted_result
-SELECT * FROM t1;
-ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
---error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
-ALTER TABLE t1
-PARTITION BY RANGE (TO_DAYS(a))
-(PARTITION p0 VALUES LESS THAN (10000),
- PARTITION p1 VALUES LESS THAN (MAXVALUE));
+--echo # BUG#11933226 - 60681: CHECKSUM TABLE RETURNS 0 FOR PARTITIONED TABLE
+--echo #
+CREATE TABLE t1 (
+ i INT
+)
+ENGINE=MyISAM
+PARTITION BY RANGE (i)
+(PARTITION p3 VALUES LESS THAN (3),
+ PARTITION p5 VALUES LESS THAN (5),
+ PARTITION pMax VALUES LESS THAN MAXVALUE);
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+--echo # Before patch this returned 0!
+CHECKSUM TABLE t1;
SHOW CREATE TABLE t1;
-CREATE TABLE t2 LIKE t1;
-SHOW CREATE TABLE t2;
-DROP TABLE t2;
-CREATE TABLE t2 SELECT * FROM t1;
-DROP TABLE t2;
-ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a));
+DROP TABLE t1;
+
+--echo # Same test without partitioning
+CREATE TABLE t1 (
+ i INT
+) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
-ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6);
+CHECKSUM TABLE t1;
+ALTER TABLE t1 CHECKSUM = 1;
+CHECKSUM TABLE t1 EXTENDED;
+CHECKSUM TABLE t1;
SHOW CREATE TABLE t1;
---sorted_result
-SELECT * FROM t1;
DROP TABLE t1;
+#
+# Disabled by WL#946: binary format for timestamp column is not compatible.
+# So the trick with replacing FRM file does not work any more.
+#--echo #
+#--echo # Bug#50036: Inconsistent errors when using TIMESTAMP
+#--echo # columns/expressions
+#
+#--echo # Added test with existing TIMESTAMP partitioning (when it was allowed).
+#CREATE TABLE t1 (a TIMESTAMP)
+#ENGINE = MyISAM
+#PARTITION BY HASH (UNIX_TIMESTAMP(a));
+#INSERT INTO t1 VALUES ('2000-01-02 03:04:05');
+#--sorted_result
+#SELECT * FROM t1;
+#FLUSH TABLES;
+#--echo # replacing t1.frm with TO_DAYS(a) which was allowed earlier.
+#--remove_file $MYSQLD_DATADIR/test/t1.frm
+#--copy_file std_data/parts/t1TIMESTAMP.frm $MYSQLD_DATADIR/test/t1.frm
+#--echo # Disable warnings, since the result would differ when running with
+#--echo # --ps-protocol (only for the 'SELECT * FROM t1' statement).
+#--disable_warnings
+#--sorted_result
+#SELECT * FROM t1;
+#--enable_warnings
+#--replace_result MyISAM <curr_engine> InnoDB <curr_engine>
+#SHOW CREATE TABLE t1;
+#INSERT INTO t1 VALUES ('2001-02-03 04:05:06');
+#--sorted_result
+#SELECT * FROM t1;
+#SELECT a, hex(weight_string(a)) FROM t1;
+#ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+#--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
+#ALTER TABLE t1
+#PARTITION BY RANGE (TO_DAYS(a))
+#(PARTITION p0 VALUES LESS THAN (10000),
+# PARTITION p1 VALUES LESS THAN (MAXVALUE));
+#SHOW CREATE TABLE t1;
+#CREATE TABLE t2 LIKE t1;
+#SHOW CREATE TABLE t2;
+#DROP TABLE t2;
+#CREATE TABLE t2 SELECT * FROM t1;
+#DROP TABLE t2;
+#ALTER TABLE t1 PARTITION BY HASH (UNIX_TIMESTAMP(a));
+#SHOW CREATE TABLE t1;
+#ALTER TABLE t1 ADD PARTITION PARTITIONS 2;
+#SHOW CREATE TABLE t1;
+#--sorted_result
+#SELECT * FROM t1;
+#DROP TABLE t1;
--echo #
--echo # Bug#31931: Mix of handlers error message
@@ -181,3 +215,18 @@ PARTITION BY RANGE (a)
PARTITION pMax VALUES LESS THAN MAXVALUE);
INSERT INTO t1 VALUES (1, "Partition p1, first row");
DROP TABLE t1;
+--echo #
+--echo # bug#11760213-52599: ALTER TABLE REMOVE PARTITIONING ON NON-PARTITIONED
+--echo # TABLE CORRUPTS MYISAM
+--disable_warnings
+DROP TABLE if exists `t1`;
+--enable_warnings
+CREATE TABLE `t1`(`a` INT)ENGINE=myisam;
+ALTER TABLE `t1` ADD COLUMN `b` INT;
+CREATE UNIQUE INDEX `i1` ON `t1`(`b`);
+CREATE UNIQUE INDEX `i2` ON `t1`(`a`);
+ALTER TABLE `t1` ADD PRIMARY KEY (`a`);
+--error ER_PARTITION_MGMT_ON_NONPARTITIONED
+ALTER TABLE `t1` REMOVE PARTITIONING;
+CHECK TABLE `t1` EXTENDED;
+DROP TABLE t1;
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 1c8a4d254a8..e7e764ce138 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -622,7 +622,6 @@ insert into t3 values (5),(15);
explain partitions select * from t3 where a=11;
explain partitions select * from t3 where a=10;
explain partitions select * from t3 where a=20;
-
explain partitions select * from t3 where a=30;
# LIST(expr) partitioning
diff --git a/mysql-test/t/partition_truncate.test b/mysql-test/t/partition_truncate.test
index 165213d204c..62ed548808f 100644
--- a/mysql-test/t/partition_truncate.test
+++ b/mysql-test/t/partition_truncate.test
@@ -11,7 +11,7 @@ partition by list (a)
(partition p1 values in (0));
--error ER_WRONG_PARTITION_NAME
alter table t1 truncate partition p1,p1;
---error ER_WRONG_PARTITION_NAME
+--error ER_UNKNOWN_PARTITION
alter table t1 truncate partition p0;
drop table t1;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 6e68b57bb3c..a8a71dcf8b3 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -1628,6 +1628,28 @@ DROP TABLE t1;
SET GLOBAL query_cache_size= @qc;
--echo #
+--echo End of 5.5 tests
+
+--echo #
+--echo # MDEV-617 LP:671189 - Query cache is not used for tables or
+--echo # databases with dots in their names
+--echo #
+CREATE DATABASE `foo.bar`;
+use `foo.bar`;
+flush status;
+CREATE TABLE moocow (a int);
+INSERT INTO moocow VALUES (1), (2), (3);
+SHOW STATUS LIKE 'Qcache_inserts';
+SELECT * FROM moocow;
+SHOW STATUS LIKE 'Qcache_inserts';
+SHOW STATUS LIKE 'Qcache_hits';
+SELECT * FROM moocow;
+SHOW STATUS LIKE 'Qcache_hits';
+use test;
+drop database `foo.bar`;
+
+--echo End of 10.0 tests
+
--echo restore defaults
SET GLOBAL query_cache_type= default;
SET GLOBAL query_cache_size= default;
diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test
index 13a0db2029b..31bc7bc9633 100644
--- a/mysql-test/t/signal.test
+++ b/mysql-test/t/signal.test
@@ -1551,15 +1551,24 @@ drop procedure test_signal $$
--echo # Test where SIGNAL can be used
--echo #
+--echo
+--echo # RETURN statement clears Diagnostics Area, thus
+--echo # the warnings raised in a stored function are not
+--echo # visible outsidef the stored function. So, we're using
+--echo # @@warning_count variable to check that SIGNAL succeeded.
+--echo
+
create function test_signal_func() returns integer
begin
+ DECLARE v INT;
DECLARE warn CONDITION FOR SQLSTATE "01XXX";
SIGNAL warn SET
MESSAGE_TEXT = "This function SIGNAL a warning",
MYSQL_ERRNO = 1012;
- return 5;
+ SELECT @@warning_count INTO v;
+ return v;
end $$
select test_signal_func() $$
diff --git a/mysql-test/t/sp-bugs.test b/mysql-test/t/sp-bugs.test
index 3ab1689e8b2..1ec154f1c69 100644
--- a/mysql-test/t/sp-bugs.test
+++ b/mysql-test/t/sp-bugs.test
@@ -167,6 +167,15 @@ USE test;
--echo End of 5.1 tests
--echo #
+--echo # BUG#13489996 valgrind:conditional jump or move depends on
+--echo # uninitialised values-field_blob
+--echo #
+
+CREATE FUNCTION sf() RETURNS BLOB RETURN "";
+SELECT sf();
+DROP FUNCTION sf;
+
+--echo #
--echo # Bug#11763507 - 56224: FUNCTION NAME IS CASE-SENSITIVE
--echo #
SET @@SQL_MODE = '';
@@ -228,3 +237,4 @@ DROP PROCEDURE testp_bug11763507;
DROP FUNCTION testf_bug11763507;
--echo #END OF BUG#11763507 test.
+
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 063b30c01cb..711e639191e 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -2881,3 +2881,973 @@ SHOW WARNINGS;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
+
+--echo
+--echo ###################################################################
+--echo # Tests for the following bugs:
+--echo # - Bug#11763171: 55852 - Possibly inappropriate handler activation.
+--echo # - Bug#11749343: 38806 - Wrong scope for SQL HANDLERS in SP.
+--echo ###################################################################
+--echo
+
+#
+# Structure of SQL-block:
+# BEGIN
+# <Handler declaration block>
+# <Statement block>
+# END
+#
+# Scope of Handler-decl-block is Statement-block.
+# I.e. SQL-conditions thrown in the Handler-decl-block can not be handled by
+# the same block, only by outer SQL-blocks.
+#
+# This rule is recursive, i.e. if a Handler-decl-block has nested SQL-blocks,
+# the SQL-conditions from those nested blocks can not be handled by the this
+# Handler-decl-block, only by outer SQL-blocks.
+#
+
+delimiter |;
+
+--echo
+--echo # -- Check that SQL-conditions thrown by Statement-blocks are
+--echo # -- handled by Handler-decl blocks properly.
+--echo
+
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H2' AS HandlerId;
+
+ SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+END|
+
+--echo
+CALL p1()|
+
+--echo
+--echo # -- Check that SQL-conditions thrown by Statement-blocks are
+--echo # -- handled by Handler-decl blocks properly in case of nested
+--echo # -- SQL-blocks.
+--echo
+
+CREATE PROCEDURE p2()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H2' AS HandlerId;
+
+ BEGIN
+
+ SELECT 'B1' AS BlockId;
+ BEGIN
+
+ SELECT 'B2' AS BlockId;
+ BEGIN
+ SELECT 'B3' AS BlockId;
+ SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+ END;
+
+ END;
+
+ END;
+
+END|
+
+--echo
+CALL p2()|
+
+--echo
+--echo # -- Check SQL-handler resolution rules.
+--echo
+
+CREATE PROCEDURE p3()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H3' AS HandlerId;
+
+ SIGNAL SQLSTATE '01000'; # Should be handled by H3.
+END|
+
+--echo
+CALL p3()|
+--echo
+
+CREATE PROCEDURE p4()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H3' AS HandlerId;
+
+ SIGNAL SQLSTATE '01000'; # Should be handled by H2.
+END|
+
+--echo
+CALL p4()|
+--echo
+
+CREATE PROCEDURE p5()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H2' AS HandlerId;
+
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H3' AS HandlerId;
+
+ SIGNAL SQLSTATE '01000'; # Should be handled by H3.
+ END;
+END|
+
+--echo
+CALL p5()|
+
+--echo
+--echo # -- Check that handlers don't handle its own exceptions.
+--echo
+
+CREATE PROCEDURE p6()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ SELECT 'H1' AS HandlerId;
+ SIGNAL SQLSTATE 'HY000'; # Should *not* be handled by H1.
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # Should be handled by H1.
+END|
+
+--echo
+--error ER_SIGNAL_EXCEPTION
+CALL p6()|
+
+--echo
+--echo # -- Check that handlers don't handle its own warnings.
+--echo
+
+CREATE PROCEDURE p7()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ SELECT 'H1' AS HandlerId;
+ SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE '01000'; # Should be handled by H1.
+END|
+
+--echo
+CALL p7()|
+
+--echo
+--echo # -- Check that conditions for handlers are not handled by the handlers
+--echo # -- from the same block.
+--echo
+
+CREATE PROCEDURE p8()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ SELECT 'H2' AS HandlerId;
+ SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+END|
+
+--echo
+CALL p8()|
+
+--echo
+--echo # -- Check that conditions for handlers are not handled by the handlers
+--echo # -- from the same block even if they are thrown deep down the stack.
+--echo
+
+CREATE PROCEDURE p9()
+BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H1:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H1:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H2:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H2:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H3:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H3:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H4:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H4:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H5:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H5:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H6:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H6:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ SELECT 'H2' AS HandlerId;
+ SIGNAL SQLSTATE '01000'; # Should *not* be handled by H1.
+ END;
+
+ SELECT 'S6' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+ END;
+
+ SELECT 'S5' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S4' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S3' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S2' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+
+END|
+
+--echo
+CALL p9()|
+
+--echo
+--echo # -- Check that handlers are choosen properly in case of deep stack and
+--echo # -- nested SQL-blocks.
+--echo
+
+CREATE PROCEDURE p10()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H2' AS HandlerId;
+
+ BEGIN
+ BEGIN
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H1:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H1:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H2:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H2:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H3:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H3:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H4:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H4:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H5:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H5:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000'
+ SELECT 'Wrong:H6:1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'Wrong:H6:2' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ SELECT 'H2' AS HandlerId;
+ SIGNAL SQLSTATE '01000'; # Should be handled by H1.
+ END;
+
+ SELECT 'S6' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+ END;
+
+ SELECT 'S5' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S4' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S3' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S2' AS SignalId;
+ SIGNAL SQLSTATE 'HY000';
+
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # Should be handled by H2.
+
+ END;
+ END;
+ END;
+END|
+
+--echo
+CALL p10()|
+
+--echo
+--echo # -- Test stored procedure from Peter's mail.
+--echo
+
+CREATE PROCEDURE p11()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H1' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H2' AS HandlerId;
+
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01000', 1249
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ SELECT 'H3' AS HandlerId;
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ SELECT 'H4' AS HandlerId;
+
+ BEGIN
+ SELECT 'H5' AS HandlerId;
+
+ SELECT 'S3' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # H3
+
+ SELECT 'S4' AS SignalId;
+ SIGNAL SQLSTATE '22003'; # H3
+
+ SELECT 'S5' AS SignalId;
+ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H4
+ END;
+ END;
+
+ SELECT 'S6' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # H1
+
+ SELECT 'S7' AS SignalId;
+ SIGNAL SQLSTATE '22003'; # H1
+
+ SELECT 'S8' AS SignalId;
+ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H5
+ END;
+
+ SELECT 'S1' AS SignalId;
+ SIGNAL SQLSTATE 'HY000'; # H1
+
+ SELECT 'S2' AS SignalId;
+ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1249; # H2
+END|
+
+--echo
+CALL p11()|
+
+--echo
+--echo # -- Check that runtime stack-trace can be deeper than parsing-time one.
+--echo
+
+CREATE PROCEDURE p12()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01001'
+ BEGIN
+ SELECT 'H1:5' AS HandlerId;
+ SIGNAL SQLSTATE '01002';
+ END;
+ SELECT 'H1:4' AS HandlerId;
+ SIGNAL SQLSTATE '01001';
+ END;
+ SELECT 'H1:3' AS HandlerId;
+ SIGNAL SQLSTATE '01001';
+ END;
+ SELECT 'H1:2' AS HandlerId;
+ SIGNAL SQLSTATE '01001';
+ END;
+ SELECT 'H1:1' AS HandlerId;
+ SIGNAL SQLSTATE '01001';
+ END;
+
+ #########################################################
+
+ DECLARE CONTINUE HANDLER FOR SQLSTATE '01002'
+ SELECT 'OK' AS Msg;
+
+ #########################################################
+
+ BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ SELECT 'H2:5' AS HandlerId;
+ SIGNAL SQLSTATE '01001';
+ END;
+ SELECT 'H2:4' AS HandlerId;
+ SIGNAL SQLSTATE '01000';
+ END;
+ SELECT 'H2:3' AS HandlerId;
+ SIGNAL SQLSTATE '01000';
+ END;
+ SELECT 'H2:2' AS HandlerId;
+ SIGNAL SQLSTATE '01000';
+ END;
+ SELECT 'H2:1' AS HandlerId;
+ SIGNAL SQLSTATE '01000';
+ END;
+
+ #######################################################
+
+ SELECT 'Throw 01000' AS Msg;
+ SIGNAL SQLSTATE '01000';
+ END;
+
+END|
+
+--echo
+CALL p12()|
+
+--echo
+--echo # -- Check that handler-call-frames are removed properly for EXIT
+--echo # -- handlers.
+--echo
+
+CREATE PROCEDURE p13()
+BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING
+ BEGIN
+ DECLARE EXIT HANDLER FOR SQLWARNING
+ BEGIN
+ SELECT 'EXIT handler 3' AS Msg;
+ END;
+
+ SELECT 'CONTINUE handler 2: 1' AS Msg;
+ SIGNAL SQLSTATE '01000';
+ SELECT 'CONTINUE handler 2: 2' AS Msg;
+ END;
+
+ SELECT 'CONTINUE handler 1: 1' AS Msg;
+ SIGNAL SQLSTATE '01000';
+ SELECT 'CONTINUE handler 1: 2' AS Msg;
+ END;
+
+ SELECT 'Throw 01000' AS Msg;
+ SIGNAL SQLSTATE '01000';
+END|
+
+--echo
+CALL p13()|
+
+delimiter ;|
+
+--echo
+--echo # That's it. Cleanup.
+--echo
+
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP PROCEDURE p6;
+DROP PROCEDURE p7;
+DROP PROCEDURE p8;
+DROP PROCEDURE p9;
+DROP PROCEDURE p10;
+DROP PROCEDURE p11;
+DROP PROCEDURE p12;
+DROP PROCEDURE p13;
+
+--echo
+--echo # Bug#12731619: NESTED SP HANDLERS CAN TRIGGER ASSERTION
+--echo
+
+--disable_warnings
+DROP FUNCTION IF EXISTS f1;
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(msg VARCHAR(255));
+
+delimiter |;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 1
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION # handler 2
+ BEGIN
+ INSERT INTO t1 VALUE('WRONG: Inside H2');
+ RETURN 2;
+ END;
+
+ INSERT INTO t1 VALUE('CORRECT: Inside H1');
+ RETURN 1;
+ END;
+
+ BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING # handler 3
+ BEGIN
+ INSERT INTO t1 VALUE('WRONG: Inside H3');
+ RETURN 3;
+ END;
+
+ INSERT INTO t1 VALUE('CORRECT: Calling f1()');
+ RETURN f1(); # -- exception here
+ END;
+
+ INSERT INTO t1 VALUE('WRONG: Returning 10');
+ RETURN 10;
+
+END|
+
+delimiter ;|
+
+--echo
+SELECT f1();
+--echo
+SELECT * FROM t1;
+--echo
+
+DROP FUNCTION f1;
+DROP TABLE t1;
+
+
+--echo
+--echo # Check that handled SQL-conditions are properly cleared from DA.
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+DROP PROCEDURE IF EXISTS p3;
+DROP PROCEDURE IF EXISTS p4;
+DROP PROCEDURE IF EXISTS p5;
+--enable_warnings
+
+CREATE TABLE t1(a CHAR, b CHAR, c CHAR);
+CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT);
+
+delimiter |;
+
+--echo
+--echo # Check that SQL-conditions for which SQL-handler has been invoked,
+--echo # are cleared from the Diagnostics Area. Note, there might be several
+--echo # SQL-conditions, but SQL-handler must be invoked only once.
+--echo
+
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE EXIT HANDLER FOR SQLWARNING
+ SELECT 'Warning caught' AS msg;
+
+ # The INSERT below raises 3 SQL-conditions (warnings). The EXIT HANDLER
+ # above must be invoked once (for one condition), but all three conditions
+ # must be cleared from the Diagnostics Area.
+
+ INSERT INTO t1 VALUES('qqqq', 'ww', 'eee');
+
+ # The following INSERT will not be executed, because of the EXIT HANDLER.
+
+ INSERT INTO t1 VALUES('zzz', 'xx', 'yyyy');
+END|
+
+--echo
+CALL p1()|
+--echo
+SELECT * FROM t1|
+
+--echo
+--echo # Check that SQL-conditions for which SQL-handler has *not* been
+--echo # invoked, are *still* cleared from the Diagnostics Area.
+--echo
+
+CREATE PROCEDURE p2()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR 1292
+ SELECT 'Warning 1292 caught' AS msg;
+
+ # The following INSERT raises 6 SQL-warnings with code 1292,
+ # and 3 SQL-warnings with code 1264. The CONTINUE HANDLER above must be
+ # invoked once, and all nine SQL-warnings must be cleared from
+ # the Diagnostics Area.
+
+ INSERT INTO t2
+ SELECT
+ CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+--echo
+CALL p2()|
+
+--echo
+--echo # Check that if there are two equally ranked SQL-handlers to handle
+--echo # SQL-conditions from SQL-statement, only one of them will be invoked.
+--echo
+
+CREATE PROCEDURE p3()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR 1292
+ SELECT 'Warning 1292 caught' AS msg;
+
+ DECLARE CONTINUE HANDLER FOR 1264
+ SELECT 'Warning 1264 caught' AS msg;
+
+ # The following INSERT raises 6 SQL-warnings with code 1292,
+ # and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above
+ # must be called, and only once. The SQL Standard does not define, which one
+ # should be invoked.
+
+ INSERT INTO t2
+ SELECT
+ CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+--echo
+CALL p3()|
+
+--echo
+--echo # The same as p3, but 1264 comes first.
+--echo
+
+CREATE PROCEDURE p4()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR 1292
+ SELECT 'Warning 1292 caught' AS msg;
+
+ DECLARE CONTINUE HANDLER FOR 1264
+ SELECT 'Warning 1264 caught' AS msg;
+
+ # The following INSERT raises 4 SQL-warnings with code 1292,
+ # and 3 SQL-warnings with code 1264. Only one of the CONTINUE HANDLERs above
+ # must be called, and only once. The SQL Standard does not define, which one
+ # should be invoked.
+
+ INSERT INTO t2
+ SELECT
+ CAST(999999 AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+--echo
+CALL p4()|
+
+--echo
+--echo # Check that if a SQL-handler raised its own SQL-conditions, there are
+--echo # preserved after handler exit.
+--echo
+
+CREATE PROCEDURE p5()
+BEGIN
+ DECLARE EXIT HANDLER FOR 1292
+ BEGIN
+ SELECT 'Handler for 1292 (1)' AS Msg;
+ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1234;
+ SHOW WARNINGS;
+ SELECT 'Handler for 1292 (2)' AS Msg;
+ END;
+
+ INSERT INTO t2
+ SELECT
+ CAST(999999 AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+--echo
+CALL p5()|
+
+--echo
+--echo # Check that SQL-conditions are available inside the handler, but
+--echo # cleared after the handler exits.
+--echo
+
+CREATE PROCEDURE p6()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR 1292
+ BEGIN
+ SHOW WARNINGS;
+ SELECT 'Handler for 1292' Msg;
+ END;
+
+ INSERT INTO t2
+ SELECT
+ CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
+ CAST(CONCAT(CAST('3 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER);
+END|
+
+--echo
+CALL p6()|
+
+delimiter ;|
+
+--echo
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+DROP PROCEDURE p3;
+DROP PROCEDURE p4;
+DROP PROCEDURE p5;
+DROP PROCEDURE p6;
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo
+--echo # Bug#13059316: ASSERTION FAILURE IN SP_RCONTEXT.CC
+--echo # Check DECLARE statements that raise conditions before handlers
+--echo # are declared.
+--echo
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+--enable_warnings
+
+delimiter |;
+
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE var1 INTEGER DEFAULT 'string';
+ DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H1';
+END|
+
+--echo
+CALL p1()|
+--echo
+
+CREATE PROCEDURE p2()
+BEGIN
+ DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H2';
+ CALL p1();
+END|
+
+--echo
+CALL p2()|
+
+delimiter ;|
+
+--echo
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+
+
+--echo #
+--echo # Bug#13113222 RQG_SIGNAL_RESIGNAL FAILED WITH ASSERTION.
+--echo #
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS p1;
+DROP PROCEDURE IF EXISTS p2;
+--enable_warnings
+
+delimiter |;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SELECT 'triggered p1';
+ # This will trigger an error.
+ SIGNAL SQLSTATE 'HY000';
+END|
+
+CREATE PROCEDURE p2()
+BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLWARNING SELECT 'triggered p2';
+ # This will trigger a warning.
+ SIGNAL SQLSTATE '01000';
+END|
+delimiter ;|
+
+SET @old_max_error_count= @@session.max_error_count;
+SET SESSION max_error_count= 0;
+CALL p1();
+CALL p2();
+SET SESSION max_error_count= @old_max_error_count;
+
+DROP PROCEDURE p1;
+DROP PROCEDURE p2;
+
+--echo
+--echo # Bug#12652873: 61392: Continue handler for NOT FOUND being triggered
+--echo # from internal stored function.
+--echo
+
+--disable_warnings
+DROP FUNCTION IF EXISTS f1;
+DROP FUNCTION IF EXISTS f2;
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--echo
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1, 2);
+
+delimiter |;
+
+--echo
+--echo # f1() raises NOT_FOUND condition.
+--echo # Raising NOT_FOUND can not be simulated by SIGNAL,
+--echo # because SIGNAL would raise SQL-error in that case.
+--echo
+
+CREATE FUNCTION f1() RETURNS INTEGER
+BEGIN
+ DECLARE v VARCHAR(5) DEFAULT -1;
+ SELECT b FROM t1 WHERE a = 2 INTO v;
+ RETURN v;
+END|
+
+--echo
+--echo # Here we check that the NOT_FOUND condition raised in f1()
+--echo # is not visible in the outer function (f2), i.e. the continue
+--echo # handler in f2() will not be called.
+--echo
+
+CREATE FUNCTION f2() RETURNS INTEGER
+BEGIN
+ DECLARE v INTEGER;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND
+ SET @msg = 'Handler activated.';
+
+ SELECT f1() INTO v;
+
+ RETURN v;
+END|
+
+delimiter ;|
+
+SET @msg = '';
+
+--echo
+SELECT f2();
+--echo
+SELECT @msg;
+--echo
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP TABLE t1;
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index c429e9cfe5b..71b625e0843 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1350,3 +1350,23 @@ select count(*) from t1 where a is null;
drop table t1;
--echo End of 5.0 tests
+
+--echo #
+--echo # Start of 5.6 tests
+--echo #
+
+--echo #
+--echo # WL#946 TIME/TIMESTAMP/DATETIME with fractional seconds: CAST to DATETIME
+--echo #
+
+--echo #
+--echo # STR_TO_DATE with NO_ZERO_DATE did not return NULL (with warning)
+--echo # in get_date(). Only did in val_str() and val_int().
+SET sql_mode='NO_ZERO_DATE';
+SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0','%Y')+1, STR_TO_DATE('0000','%Y')+1;
+SET sql_mode='NO_ZERO_IN_DATE';
+SELECT STR_TO_DATE('2001','%Y'),CONCAT(STR_TO_DATE('2001','%Y')), STR_TO_DATE('2001','%Y')+1, STR_TO_DATE('0000','%Y')+1;
+
+--echo #
+--echo # End of 5.6 tests
+--echo #
diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test
index 1b89ea2001b..18df3adb8b1 100644
--- a/mysql-test/t/system_mysql_db_fix40123.test
+++ b/mysql-test/t/system_mysql_db_fix40123.test
@@ -78,7 +78,7 @@ CREATE TABLE index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) N
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, gtid_slave_pos, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, slave_master_info, slave_relay_log_info, innodb_index_stats, innodb_table_stats, slave_worker_info, table_stats, column_stats, index_stats;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats;
-- enable_query_log
diff --git a/mysql-test/t/system_mysql_db_fix50030.test b/mysql-test/t/system_mysql_db_fix50030.test
index 454711a93e6..36fa6285060 100644
--- a/mysql-test/t/system_mysql_db_fix50030.test
+++ b/mysql-test/t/system_mysql_db_fix50030.test
@@ -85,7 +85,7 @@ CREATE TABLE index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) N
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, gtid_slave_pos, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, slave_master_info, slave_relay_log_info, innodb_index_stats, innodb_table_stats, slave_worker_info, table_stats, column_stats, index_stats;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats;
-- enable_query_log
diff --git a/mysql-test/t/system_mysql_db_fix50117.test b/mysql-test/t/system_mysql_db_fix50117.test
index af1bcf2a6e0..6ee7d0fe989 100644
--- a/mysql-test/t/system_mysql_db_fix50117.test
+++ b/mysql-test/t/system_mysql_db_fix50117.test
@@ -84,7 +84,8 @@ CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL
CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 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, modified TIMESTAMP NOT NULL, last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','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','NOT_USED','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') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', time_zone char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', PRIMARY KEY (db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
-CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
+# MariaDB: don't:
+# CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
CREATE TABLE table_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, cardinality bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (db_name,table_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Tables';
@@ -104,7 +105,7 @@ CREATE TABLE index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) N
-- disable_query_log
# Drop all tables created by this test
-DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, gtid_slave_pos, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, slave_master_info, slave_relay_log_info, innodb_index_stats, innodb_table_stats, slave_worker_info, table_stats, column_stats, index_stats;
+DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, proxies_priv, innodb_index_stats, innodb_table_stats, table_stats, column_stats, index_stats;
-- enable_query_log
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 92c22242cdb..dd4ee2f6676 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -1,5 +1,6 @@
# mysqltest should be fixed
-- source include/not_embedded.inc
+
#
# Test of temporary tables
#
@@ -9,6 +10,30 @@ 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 #
+
+create table t1 (a int);
+create temporary table t1 AS SELECT 1;
+--error 1050
+create temporary table t1 AS SELECT 1;
+--error 1050
+create temporary table t1 (a int);
+drop temporary table t1;
+drop table t1;
+
+create temporary table t1 AS SELECT 1;
+--error 1050
+create temporary table t1 AS SELECT 1;
+--error 1050
+create temporary table t1 (a int);
+drop temporary table t1;
+
+--echo #
+--echo # Test with rename
+--echo #
+
CREATE TABLE t1 (c int not null, d char (10) not null);
insert into t1 values(1,""),(2,"a"),(3,"b");
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
diff --git a/mysql-test/t/truncate_coverage.test b/mysql-test/t/truncate_coverage.test
index 135935b53b3..6f5c773ac6a 100644
--- a/mysql-test/t/truncate_coverage.test
+++ b/mysql-test/t/truncate_coverage.test
@@ -40,7 +40,7 @@ HANDLER t1 OPEN;
--connection default
let $ID= `SELECT @id := CONNECTION_ID()`;
LOCK TABLE t1 WRITE;
-SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting';
+SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting';
send TRUNCATE TABLE t1;
#
# Get the default connection ID into a variable in an invisible statement.
@@ -92,7 +92,7 @@ HANDLER t1 OPEN;
--echo # connection default
--connection default
LOCK TABLE t1 WRITE;
-SET DEBUG_SYNC='mdl_upgrade_shared_lock_to_exclusive SIGNAL waiting';
+SET DEBUG_SYNC='mdl_upgrade_lock SIGNAL waiting';
send TRUNCATE TABLE t1;
#
# Remove datafile.
diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test
index c6d01a16f49..6025fc31415 100644
--- a/mysql-test/t/upgrade.test
+++ b/mysql-test/t/upgrade.test
@@ -39,6 +39,8 @@ insert into `txu#p#p1` values (1);
select * from `txu@0023p@0023p1`;
create table `txu@0023p@0023p1` (s1 int);
show tables;
+insert into `txu@0023p@0023p1` values (2);
+select * from `txu@0023p@0023p1`;
select * from `txu#p#p1`;
drop table `txu#p#p1`;
drop table `txu@0023p@0023p1`;