summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/disabled.def4
-rw-r--r--mysql-test/include/expect_crash.inc5
-rw-r--r--mysql-test/include/have_innodb_16k.inc2
-rw-r--r--mysql-test/include/have_innodb_32k.inc6
-rw-r--r--mysql-test/include/have_innodb_4k.inc6
-rw-r--r--mysql-test/include/have_innodb_64k.inc2
-rw-r--r--mysql-test/include/have_innodb_8k.inc6
-rw-r--r--mysql-test/include/have_innodb_max_16k.inc4
-rw-r--r--mysql-test/include/have_innodb_zip.inc4
-rw-r--r--mysql-test/include/have_numa.inc18
-rw-r--r--mysql-test/include/have_xtradb.combinations10
-rw-r--r--mysql-test/include/mtr_check.sql1
-rwxr-xr-xmysql-test/mysql-test-run.pl9
-rw-r--r--mysql-test/r/alter_table.result4
-rw-r--r--mysql-test/r/group_min_max_innodb.result4
-rw-r--r--mysql-test/r/innodb_icp.result2
-rw-r--r--mysql-test/r/mysqlbinlog_row_minimal.result16
-rw-r--r--mysql-test/r/mysqld--help.result4
-rw-r--r--mysql-test/r/order_by_optimizer_innodb.result4
-rw-r--r--mysql-test/r/partition_innodb.result12
-rw-r--r--mysql-test/r/partition_innodb_plugin.result8
-rw-r--r--mysql-test/r/range_vs_index_merge_innodb.result68
-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/selectivity_innodb.result20
-rw-r--r--mysql-test/r/stat_tables_innodb.result4
-rw-r--r--mysql-test/r/type_bit_innodb.result2
-rw-r--r--mysql-test/suite/encryption/disabled.def1
-rw-r--r--mysql-test/suite/encryption/r/debug_key_management.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result7
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change3.result9
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change5.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-discard-import.result11
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-alter.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result16
-rw-r--r--mysql-test/suite/encryption/r/innodb-log-encrypt.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_compression.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result8
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_discard_import.result11
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_filekeys.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_is.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result159
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_tables.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test2
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change3.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import.test3
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_discard_import.test4
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_row_compressed.opt4
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test125
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_innodb.result10
-rw-r--r--mysql-test/suite/funcs_1/r/is_tables_mysql.result4
-rw-r--r--mysql-test/suite/handler/disabled.def13
-rw-r--r--mysql-test/suite/innodb/disabled.def4
-rw-r--r--mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc10
-rw-r--r--mysql-test/suite/innodb/r/group_commit_crash.result2
-rw-r--r--mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result2
-rw-r--r--mysql-test/suite/innodb/r/help_url.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-16k.result26
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-discard.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb-blob.result42
-rw-r--r--mysql-test/suite/innodb/r/innodb-bug-14068765.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-bug-14084530.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk-warnings.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result14
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev-7408.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-mdev-7513.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lz4.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzma.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzo.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_snappy.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_tables.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_zip.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns.result118
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-1.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result29
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-zip.result18
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result25
-rw-r--r--mysql-test/suite/innodb/r/innodb.result114
-rw-r--r--mysql-test/suite/innodb/r/innodb_blob_truncate.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result24
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12400341.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12902967.result3
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug14147491.result24
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug30423.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug34053.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug34300.result19
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug46000.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug47167.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug54044.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug60049.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_corrupt_bit.result84
-rw-r--r--mysql-test/suite/innodb/r/innodb_file_format.result26
-rw-r--r--mysql-test/suite/innodb/r/innodb_gis.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb_information_schema_buffer.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb_monitor.result29
-rw-r--r--mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result12
-rw-r--r--mysql-test/suite/innodb/r/innodb_simulate_comp_failures_small.result13
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result4
-rw-r--r--mysql-test/suite/innodb/r/strict_mode.result3
-rw-r--r--mysql-test/suite/innodb/t/auto_increment_dup.opt1
-rw-r--r--mysql-test/suite/innodb/t/create_isl_with_direct.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-16k.test21
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-discard.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb-blob.test54
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7408.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev-7513.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-mdev7046.test1
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns.test6
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-1.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test3
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-zip.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb.test128
-rw-r--r--mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test52
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12902967.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491-master.opt5
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug14147491.test56
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug30423.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34053.test20
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug34300.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug60049.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb_corrupt_bit.test22
-rw-r--r--mysql-test/suite/innodb/t/innodb_gis.test5
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test4
-rw-r--r--mysql-test/suite/innodb/t/strict_mode.test2
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb-wl6045.inc20
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc16
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_dml_ops.inc82
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_fetch_records.inc7
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_load_data.inc19
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc26
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_stats_restart.inc12
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc40
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc144
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc234
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc113
-rw-r--r--mysql-test/suite/innodb_zip/r/16k.result745
-rw-r--r--mysql-test/suite/innodb_zip/r/4k.result442
-rw-r--r--mysql-test/suite/innodb_zip/r/8k.result473
-rw-r--r--mysql-test/suite/innodb_zip/r/bug36169.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/bug36172.result1
-rw-r--r--mysql-test/suite/innodb_zip/r/bug52745.result129
-rw-r--r--mysql-test/suite/innodb_zip/r/bug53591.result13
-rw-r--r--mysql-test/suite/innodb_zip/r/bug56680.result120
-rw-r--r--mysql-test/suite/innodb_zip/r/cmp_drop_table.result13
-rw-r--r--mysql-test/suite/innodb_zip/r/cmp_per_index.result94
-rw-r--r--mysql-test/suite/innodb_zip/r/create_options.result839
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix.result534
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result404
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result442
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum.result82
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_2.result140
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result184
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-create-options.result67
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result53
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug36169.result3
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug52745.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug53591.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug56680.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result43
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result1396
-rw-r--r--mysql-test/suite/innodb_zip/r/large_blob.result83
-rw-r--r--mysql-test/suite/innodb_zip/r/restart.result1236
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6344_compress_level.result135
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result8084
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6470_1.result598
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6470_2.result667
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_1.result1150
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_3.result489
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_4.result553
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_5.result489
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_scale_1.result354
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6560.result418
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6915_1.result2060
-rw-r--r--mysql-test/suite/innodb_zip/t/16k.test715
-rw-r--r--mysql-test/suite/innodb_zip/t/4k.test440
-rw-r--r--mysql-test/suite/innodb_zip/t/8k.test468
-rw-r--r--mysql-test/suite/innodb_zip/t/bug36169.test1162
-rw-r--r--mysql-test/suite/innodb_zip/t/bug36172.test30
-rw-r--r--mysql-test/suite/innodb_zip/t/bug52745.test105
-rw-r--r--mysql-test/suite/innodb_zip/t/bug53591.test22
-rw-r--r--mysql-test/suite/innodb_zip/t/bug56680.test140
-rw-r--r--mysql-test/suite/innodb_zip/t/cmp_drop_table-master.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/cmp_drop_table.test57
-rw-r--r--mysql-test/suite/innodb_zip/t/cmp_per_index.test118
-rw-r--r--mysql-test/suite/innodb_zip/t/create_options.test528
-rw-r--r--mysql-test/suite/innodb_zip/t/disabled.def17
-rw-r--r--mysql-test/suite/innodb_zip/t/index_large_prefix.test441
-rw-r--r--mysql-test/suite/innodb_zip/t/index_large_prefix_4k.test400
-rw-r--r--mysql-test/suite/innodb_zip/t/index_large_prefix_8k.test429
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.test240
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_2.test114
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_3.test378
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36169.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36169.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug53591.test3
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test8
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test1371
-rw-r--r--mysql-test/suite/innodb_zip/t/large_blob-master.opt3
-rw-r--r--mysql-test/suite/innodb_zip/t/large_blob.test122
-rw-r--r--mysql-test/suite/innodb_zip/t/restart.test602
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6344_compress_level.test135
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6347_comp_indx_stat.test1337
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6470_1.test60
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6470_2.test468
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_1.test451
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_3.test26
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_4.test29
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_5.test26
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_scale_1.test41
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6560.test423
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6915_1.test650
-rw-r--r--mysql-test/suite/rpl/disabled.def3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_parts_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_additional_mem_pool_size_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_api_bk_commit_interval_basic.result36
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_autoextend_increment_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_chunk_size_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result3
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result7
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_cmp_per_index_enabled_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result20
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_compression_failure_threshold_pct_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_compression_pad_pct_max_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_concurrency_tickets_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_default_row_format_basic.result48
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_disable_resize_buffer_pool_debug_basic.result60
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_file_format_basic.result20
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result20
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_fill_factor_basic.result42
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_log_at_timeout_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result92
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result24
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result98
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_checkpoint_now_basic.result81
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result42
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result88
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result108
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result7
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_lwm_basic.result32
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result50
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_max_undo_log_size_basic.result54
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result28
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_mirrored_log_groups_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result29
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result29
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result29
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result29
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result41
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_page_size_basic.result9
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result25
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result113
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result38
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result14
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result44
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result2
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result26
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_sync_debug_basic.result11
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result56
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_table_locks_func.result7
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_temp_data_file_path_basic.result53
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result15
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result16
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_undo_log_truncate_basic.result69
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result22
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result318
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test75
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test18
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_bk_commit_interval_basic.test27
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_disable_rowlock_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_enable_binlog_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_enable_mdl_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_api_trx_level_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_autoextend_increment_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_chunk_size_basic.test75
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test67
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test32
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test34
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_checksums_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_cmp_per_index_enabled_basic.test3
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_failure_threshold_pct_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_compression_pad_pct_max_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_concurrency_tickets_basic.test48
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_default_row_format_basic.test41
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test72
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test7
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_per_table_basic-master.opt1
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_fill_factor_basic.test41
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_log_at_timeout_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_neighbors_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test77
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_flushing_avg_loops_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test71
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test80
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_checksums_basic.test36
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test9
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test93
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test93
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test7
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_lwm_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test52
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_max_undo_log_size_basic.test (renamed from mysql-test/suite/sys_vars/t/innodb_mirrored_log_groups_basic.test)63
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_merge_threshold_set_all_debug_basic.test30
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_disable_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_enable_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_reset_all_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_monitor_reset_basic.test5
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test22
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_online_alter_log_max_size_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_open_files_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_page_cleaners_basic.test53
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_page_size_basic.test17
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test17
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_rseg_truncate_frequency_basic.test161
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test89
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_read_only_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test52
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test51
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test34
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test28
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_status_output_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_status_output_locks_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test10
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test8
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_debug_basic.test16
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test50
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_table_locks_func.test7
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_temp_data_file_path_basic.test (renamed from mysql-test/suite/sys_vars/t/innodb_additional_mem_pool_size_basic.test)56
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test15
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test6
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test12
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_log_truncate_basic.test113
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test4
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test31
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_version_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test2
-rw-r--r--mysql-test/t/ctype_utf8mb4_innodb-master.opt1
-rw-r--r--mysql-test/t/mysqlbinlog_row_minimal.test2
-rw-r--r--mysql-test/t/partition_exchange-master.opt1
-rw-r--r--mysql-test/t/partition_innodb-master.opt1
-rw-r--r--mysql-test/t/row-checksum-master.opt1
-rw-r--r--mysql-test/t/row-checksum-old-master.opt1
-rwxr-xr-xmysql-test/thou_shalt_not_kill.pm26
444 files changed, 37896 insertions, 4103 deletions
diff --git a/mysql-test/disabled.def b/mysql-test/disabled.def
index e82ddcf92d1..75704c7571e 100644
--- a/mysql-test/disabled.def
+++ b/mysql-test/disabled.def
@@ -22,3 +22,7 @@ innodb-wl5522-debug-zip : broken upstream
innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
+implicit_commit : MDEV-10549
+lock_sync : MDEV-10548
+innodb_mysql_sync : MDEV-10548
+partition_debug_sync : MDEV-10548
diff --git a/mysql-test/include/expect_crash.inc b/mysql-test/include/expect_crash.inc
new file mode 100644
index 00000000000..af8b0908104
--- /dev/null
+++ b/mysql-test/include/expect_crash.inc
@@ -0,0 +1,5 @@
+--let $_server_id= `SELECT @@server_id`
+--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
+
+# There should be a debug crash after using this .inc file
+--exec echo "wait" > $_expect_file_name
diff --git a/mysql-test/include/have_innodb_16k.inc b/mysql-test/include/have_innodb_16k.inc
index f0198ca5ee7..0d5f021c606 100644
--- a/mysql-test/include/have_innodb_16k.inc
+++ b/mysql-test/include/have_innodb_16k.inc
@@ -1,4 +1,6 @@
+--disable_warnings
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 16384`)
{
--skip Test requires InnoDB with 16k Page size.
}
+--enable_warnings
diff --git a/mysql-test/include/have_innodb_32k.inc b/mysql-test/include/have_innodb_32k.inc
index 76a8d2d59a3..4f7f5454e87 100644
--- a/mysql-test/include/have_innodb_32k.inc
+++ b/mysql-test/include/have_innodb_32k.inc
@@ -1,6 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 32768`)
{
-
- --skip Test requires InnoDB with 32k Page size.
-
-} \ No newline at end of file
+ --skip Test requires InnoDB with 32k page size.
+}
diff --git a/mysql-test/include/have_innodb_4k.inc b/mysql-test/include/have_innodb_4k.inc
new file mode 100644
index 00000000000..f51b8bf66b9
--- /dev/null
+++ b/mysql-test/include/have_innodb_4k.inc
@@ -0,0 +1,6 @@
+--disable_warnings
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 4096`)
+{
+ --skip Test requires InnoDB with 4k Page size.
+}
+--enable_warnings
diff --git a/mysql-test/include/have_innodb_64k.inc b/mysql-test/include/have_innodb_64k.inc
index bcb76c4f54e..6f0fadc25ac 100644
--- a/mysql-test/include/have_innodb_64k.inc
+++ b/mysql-test/include/have_innodb_64k.inc
@@ -1,4 +1,4 @@
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 65536`)
{
- --skip Test requires InnoDB with 64k Page size.
+ --skip Test requires InnoDB with 64k page size.
}
diff --git a/mysql-test/include/have_innodb_8k.inc b/mysql-test/include/have_innodb_8k.inc
new file mode 100644
index 00000000000..125a4e4d6af
--- /dev/null
+++ b/mysql-test/include/have_innodb_8k.inc
@@ -0,0 +1,6 @@
+--disable_warnings
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 8192`)
+{
+ --skip Test requires InnoDB with 8k Page size.
+}
+--enable_warnings
diff --git a/mysql-test/include/have_innodb_max_16k.inc b/mysql-test/include/have_innodb_max_16k.inc
new file mode 100644
index 00000000000..f8346666299
--- /dev/null
+++ b/mysql-test/include/have_innodb_max_16k.inc
@@ -0,0 +1,4 @@
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value <= 16384`)
+{
+ --skip Test requires InnoDB with page size not greater than 16k.
+}
diff --git a/mysql-test/include/have_innodb_zip.inc b/mysql-test/include/have_innodb_zip.inc
new file mode 100644
index 00000000000..6af83d51304
--- /dev/null
+++ b/mysql-test/include/have_innodb_zip.inc
@@ -0,0 +1,4 @@
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value <= 16384`)
+{
+ --skip Test with InnoDB zip requires page size not greater than 16k.
+}
diff --git a/mysql-test/include/have_numa.inc b/mysql-test/include/have_numa.inc
new file mode 100644
index 00000000000..bd1c7d7a085
--- /dev/null
+++ b/mysql-test/include/have_numa.inc
@@ -0,0 +1,18 @@
+let $numa_support = `SELECT COUNT(VARIABLE_VALUE) = 1 FROM
+ INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_numa_interleave'`;
+
+if ( $numa_support == 0 )
+{
+ --skip Test requires: NUMA must be enabled
+}
+
+if ( $numa_support == 1 )
+{
+ let $numa = `SELECT @@GLOBAL.innodb_numa_interleave = 'OFF'`;
+ if ( $numa == 1 )
+ {
+ --skip Test requires: NUMA must be enabled
+ }
+}
+
diff --git a/mysql-test/include/have_xtradb.combinations b/mysql-test/include/have_xtradb.combinations
index 0419dc91171..3454f83cb4d 100644
--- a/mysql-test/include/have_xtradb.combinations
+++ b/mysql-test/include/have_xtradb.combinations
@@ -6,8 +6,8 @@ innodb-cmpmem
innodb-trx
innodb-sys-indexes
-[xtradb]
-innodb
-innodb-cmpmem
-innodb-trx
-innodb-sys-indexes
+#[xtradb]
+#innodb
+#innodb-cmpmem
+#innodb-trx
+#innodb-sys-indexes
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index 6b25c75276c..d47e7d322b5 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -32,6 +32,7 @@ BEGIN
AND variable_name not like "Last_IO_Err*"
AND variable_name != 'INNODB_IBUF_MAX_SIZE'
AND variable_name != 'INNODB_USE_NATIVE_AIO'
+ AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP'
AND variable_name not like 'GTID%POS'
AND variable_name != 'GTID_BINLOG_STATE'
ORDER BY variable_name;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 0cddff81960..afad786358b 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -4456,7 +4456,14 @@ sub extract_warning_lines ($$) {
qr|nnoDB: fix the corruption by dumping, dropping, and reimporting|,
qr|InnoDB: the corrupt table. You can use CHECK|,
qr|InnoDB: TABLE to scan your table for corruption|,
- qr/InnoDB: See also */
+ qr/InnoDB: See also */,
+ qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/,
+ qr/InnoDB: Upgrading redo log:*/,
+ qr|InnoDB: Starting to delete and rewrite log files.|,
+ qr/InnoDB: New log files created, LSN=*/,
+ qr|InnoDB: Creating foreign key constraint system tables.|,
+ qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./,
+ qr/InnoDB: User stopword table .* does not exist./
);
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 3461038f85e..d8e17419342 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -1860,8 +1860,8 @@ 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
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE tm1 MODIFY COLUMN h VARCHAR(30);
affected rows: 2
info: Records: 2 Duplicates: 0 Warnings: 0
diff --git a/mysql-test/r/group_min_max_innodb.result b/mysql-test/r/group_min_max_innodb.result
index 77c74fbc041..9d8f8e7a26c 100644
--- a/mysql-test/r/group_min_max_innodb.result
+++ b/mysql-test/r/group_min_max_innodb.result
@@ -194,7 +194,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range k2 k2 5 NULL 59 Using where; Using index
+1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
SELECT c1, i1, max(i2) FROM t2
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
GROUP BY c1,i1;
@@ -205,7 +205,7 @@ EXPLAIN SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range k2 k2 5 NULL 58 Using where; Using index
+1 SIMPLE t2 range k2 k2 5 NULL 60 Using where; Using index
SELECT c1, i1, max(i2) FROM t2
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
GROUP BY c1,i1;
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index bc1c24276ed..8a519d6415d 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -409,7 +409,7 @@ WHERE (pk BETWEEN 4 AND 5 OR pk < 2) AND c1 < 240
ORDER BY c1
LIMIT 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 3 Using where; Using index
+1 SIMPLE t1 range PRIMARY,k1 k1 5 NULL 4 Using where; Using index
DROP TABLE t1;
#
#
diff --git a/mysql-test/r/mysqlbinlog_row_minimal.result b/mysql-test/r/mysqlbinlog_row_minimal.result
index 84c0e668981..2737d61eca4 100644
--- a/mysql-test/r/mysqlbinlog_row_minimal.result
+++ b/mysql-test/r/mysqlbinlog_row_minimal.result
@@ -54,7 +54,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN
BEGIN
/*!*/;
# at 809
-#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
+#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 865
#<date> server id 1 end_log_pos 934 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@@ -79,7 +79,7 @@ COMMIT
BEGIN
/*!*/;
# at 1049
-#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
+#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1105
#<date> server id 1 end_log_pos 1173 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@@ -104,7 +104,7 @@ COMMIT
BEGIN
/*!*/;
# at 1288
-#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
+#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1344
#<date> server id 1 end_log_pos 1411 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@@ -129,7 +129,7 @@ COMMIT
BEGIN
/*!*/;
# at 1526
-#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
+#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 1582
#<date> server id 1 end_log_pos 1652 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
@@ -154,7 +154,7 @@ COMMIT
BEGIN
/*!*/;
# at 1767
-#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
+#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 1823
#<date> server id 1 end_log_pos 1990 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t2`
@@ -212,7 +212,7 @@ COMMIT
BEGIN
/*!*/;
# at 2105
-#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
+#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2161
#<date> server id 1 end_log_pos 2235 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
### UPDATE `test`.`t2`
@@ -244,7 +244,7 @@ COMMIT
BEGIN
/*!*/;
# at 2350
-#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
+#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number num
# at 2406
#<date> server id 1 end_log_pos 2460 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
### DELETE FROM `test`.`t1`
@@ -270,7 +270,7 @@ COMMIT
BEGIN
/*!*/;
# at 2575
-#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
+#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number num
# at 2631
#<date> server id 1 end_log_pos 2685 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t2`
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index b0e89b7f02d..818316fb45c 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -108,9 +108,6 @@ The following options may be given as the first argument:
--bulk-insert-buffer-size=#
Size of tree cache used in bulk insert optimisation. Note
that this is a limit per thread!
- --changed-page-bitmaps[=name]
- Enable or disable CHANGED_PAGE_BITMAPS plugin. One of:
- ON, OFF, FORCE (don't start if the plugin fails to load).
--character-set-client-handshake
Don't ignore client side character set value sent during
handshake.
@@ -1153,7 +1150,6 @@ binlog-row-event-max-size 1024
binlog-row-image FULL
binlog-stmt-cache-size 32768
bulk-insert-buffer-size 8388608
-changed-page-bitmaps ON
character-set-client-handshake TRUE
character-set-filesystem binary
character-sets-dir MYSQL_CHARSETSDIR/
diff --git a/mysql-test/r/order_by_optimizer_innodb.result b/mysql-test/r/order_by_optimizer_innodb.result
index f3167db4b9a..0b62ba997d8 100644
--- a/mysql-test/r/order_by_optimizer_innodb.result
+++ b/mysql-test/r/order_by_optimizer_innodb.result
@@ -40,11 +40,11 @@ pk1 count(*)
# The following should use range(ux_pk1_fd5), two key parts (key_len=5+8=13)
EXPLAIN SELECT * FROM t2 USE INDEX(ux_pk1_fd5) WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range ux_pk1_fd5 ux_pk1_fd5 13 NULL 137 Using where
+1 SIMPLE t2 range ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using where
# This also must use range, not ref. key_len must be 13
EXPLAIN SELECT * FROM t2 WHERE pk1=9 AND fd5 < 500 ORDER BY fd5 DESC LIMIT 10;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 137 Using where
+1 SIMPLE t2 range PRIMARY,ux_pk1_fd5 ux_pk1_fd5 13 NULL 138 Using where
drop table t0,t1, t2;
#
# MDEV-6814: Server crashes in calculate_key_len on query with ORDER BY
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index c9568f7b07f..d1ec12efe31 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -385,33 +385,33 @@ DROP TABLE t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (0), (1), (2), (3);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int auto_increment primary key)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Dynamic 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
partition by key (a)
diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result
index d53d2edb581..35b1e3142b4 100644
--- a/mysql-test/r/partition_innodb_plugin.result
+++ b/mysql-test/r/partition_innodb_plugin.result
@@ -42,6 +42,8 @@ SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
SET @@global.innodb_file_format = Barracuda,
@@global.innodb_file_per_table = ON,
@@global.innodb_strict_mode = ON;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
connect con1,localhost,root,,;
CREATE TABLE t1 (id INT NOT NULL
PRIMARY KEY,
@@ -104,6 +106,8 @@ disconnect con2;
connection default;
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
SET @@global.innodb_file_format = @old_innodb_file_format;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
SET NAMES utf8;
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
@@ -143,12 +147,12 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
# First table reported in 'SHOW ENGINE InnoDB STATUS'
SHOW ENGINE InnoDB STATUS;
Type Name Status
-InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
+InnoDB index PRIMARY of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @old_sql_mode = @@sql_mode;
set sql_mode = 'ANSI_QUOTES';
SHOW ENGINE InnoDB STATUS;
Type Name Status
-InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
+InnoDB index PRIMARY of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @@sql_mode = @old_sql_mode;
connection con1;
ROLLBACK;
diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result
index 8428936d25f..19feae46575 100644
--- a/mysql-test/r/range_vs_index_merge_innodb.result
+++ b/mysql-test/r/range_vs_index_merge_innodb.result
@@ -57,7 +57,7 @@ WHERE Population < 200000 AND Name LIKE 'P%' AND
(Population > 300000 OR Name LIKE 'T%') AND
(Population < 100000 OR Name LIKE 'Pa%');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Name Name 35 NULL 235 Using index condition; Using where
+1 SIMPLE City range Population,Name Name 35 NULL 236 Using index condition; Using where
EXPLAIN
SELECT * FROM City
WHERE Population > 100000 AND Name LIKE 'Aba%' OR
@@ -65,34 +65,34 @@ Country IN ('CAN', 'ARG') AND ID < 3800 OR
Country < 'U' AND Name LIKE 'Zhu%' OR
ID BETWEEN 3800 AND 3810;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 123 Using sort_union(Name,Country,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 35,7,4 NULL 125 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 115000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 458 Using index condition
+1 SIMPLE City range Population Population 4 NULL 459 Using index condition
EXPLAIN
SELECT * FROM City
WHERE (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 38 Using index condition
+1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Country,Name Name,Country 35,3 NULL 213 Using sort_union(Name,Country); Using where
+1 SIMPLE City index_merge Country,Name Name,Country 35,3 NULL 215 Using sort_union(Name,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 115000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Name,Country 35,3 NULL 213 Using sort_union(Name,Country); Using where
+1 SIMPLE City index_merge Population,Country,Name Name,Country 35,3 NULL 215 Using sort_union(Name,Country); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population,Country,Name Population 4 NULL 38 Using index condition; Using where
+1 SIMPLE City range Population,Country,Name Population 4 NULL 39 Using index condition; Using where
SELECT * FROM City USE INDEX ()
WHERE ((Name > 'Ca' AND Name < 'Cf') OR (Country > 'E' AND Country < 'F'))
AND (Population > 101000 AND Population < 115000);
@@ -176,11 +176,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Name < 'Bb');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 373 Using index condition
+1 SIMPLE City range Name Name 35 NULL 374 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Country > 'A' AND Country < 'B');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country Country 3 NULL 106 Using index condition
+1 SIMPLE City range Country Country 3 NULL 107 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'Pb');
id select_type table type possible_keys key key_len ref rows Extra
@@ -188,15 +188,15 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Name BETWEEN 'P' AND 'S');
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 384 Using index condition
+1 SIMPLE City range Name Name 35 NULL 385 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 110000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 327 Using index condition
+1 SIMPLE City range Population Population 4 NULL 328 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 103000 AND Population < 104000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 36 Using index condition
+1 SIMPLE City range Population Population 4 NULL 37 Using index condition
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
@@ -208,19 +208,19 @@ SELECT * FROM City
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'S' AND (Population > 103000 AND Population < 104000));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL 59 Using sort_union(Name,Population); Using where
+1 SIMPLE City index_merge Population,Country,Name Name,Population 35,4 NULL 60 Using sort_union(Name,Population); Using where
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Bb' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'Pb' AND (Population > 101000 AND Population < 110000));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Country,Name 3,35 NULL 177 Using sort_union(Country,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name Country,Name 3,35 NULL 178 Using sort_union(Country,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE (Name < 'Bb' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'S' AND (Population > 103000 AND Population < 104000));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name Country,Population 3,4 NULL 142 Using sort_union(Country,Population); Using where
+1 SIMPLE City index_merge Population,Country,Name Country,Population 3,4 NULL 144 Using sort_union(Country,Population); Using where
SELECT * FROM City USE INDEX ()
WHERE (Name < 'Ac' AND (Country > 'A' AND Country < 'B')) OR
(Name BETWEEN 'P' AND 'Pb' AND (Population > 101000 AND Population < 110000));
@@ -336,15 +336,15 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (ID < 600) OR (ID BETWEEN 900 AND 1500);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY PRIMARY 4 NULL 1198 Using where
+1 SIMPLE City range PRIMARY PRIMARY 4 NULL 1200 Using where
EXPLAIN
SELECT * FROM City WHERE Country > 'A' AND Country < 'ARG';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Country Country 3 NULL 19 Using index condition
+1 SIMPLE City range Country Country 3 NULL 20 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'H%' OR Name LIKE 'P%' ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 394 Using index condition; Using where
+1 SIMPLE City range Name Name 35 NULL 395 Using index condition; Using where
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Ha%' OR Name LIKE 'Pa%' ;
id select_type table type possible_keys key key_len ref rows Extra
@@ -362,7 +362,7 @@ WHERE ((ID < 800) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
OR ((ID BETWEEN 900 AND 1500) AND
(Name LIKE 'Pa%' OR (Population > 103000 AND Population < 104000)));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 680 Using sort_union(Name,Country,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Name,Country,PRIMARY 39,3,4 NULL 683 Using sort_union(Name,Country,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((ID < 200) AND (Name LIKE 'Ha%' OR (Country > 'A' AND Country < 'ARG')))
@@ -577,11 +577,11 @@ ID Name Country Population
EXPLAIN
SELECT * FROM City WHERE Population > 101000 AND Population < 102000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 38 Using index condition
+1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City WHERE Population > 101000 AND Population < 110000;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 327 Using index condition
+1 SIMPLE City range Population Population 4 NULL 328 Using index condition
EXPLAIN
SELECT * FROM City WHERE Country < 'C';
id select_type table type possible_keys key key_len ref rows Extra
@@ -593,7 +593,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name BETWEEN 'P' AND 'S';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 384 Using index condition
+1 SIMPLE City range Name Name 35 NULL 385 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name BETWEEN 'P' AND 'Pb';
id select_type table type possible_keys key key_len ref rows Extra
@@ -601,7 +601,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3400 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY PRIMARY 4 NULL 400 Using where
+1 SIMPLE City range PRIMARY PRIMARY 4 NULL 401 Using where
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3790 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
@@ -609,7 +609,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'P%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 235 Using index condition
+1 SIMPLE City range Name Name 35 NULL 236 Using index condition
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 102000) AND
@@ -617,7 +617,7 @@ WHERE ((Population > 101000 AND Population < 102000) AND
((ID BETWEEN 3400 AND 3800) AND
(Country < 'AGO' OR Name LIKE 'Pa%'));
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 438 Using sort_union(Population,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name Population,PRIMARY 4,4 NULL 440 Using sort_union(Population,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 110000) AND
@@ -684,11 +684,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'P%';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Name Name 35 NULL 235 Using index condition
+1 SIMPLE City range Name Name 35 NULL 236 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 103000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 80 Using index condition
+1 SIMPLE City range Population Population 4 NULL 81 Using index condition
EXPLAIN
SELECT * FROM City WHERE Country='USA';
id select_type table type possible_keys key key_len ref rows Extra
@@ -702,7 +702,7 @@ SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'Pas%')
AND Country='USA';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 17 Using sort_union(CountryPopulation,Name); Using where
+1 SIMPLE City index_merge Population,Country,Name,CountryPopulation CountryPopulation,Name 7,35 NULL 18 Using sort_union(CountryPopulation,Name); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR Name LIKE 'P%')
@@ -777,7 +777,7 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 3500 AND 3800;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range PRIMARY PRIMARY 4 NULL 300 Using where
+1 SIMPLE City range PRIMARY PRIMARY 4 NULL 301 Using where
EXPLAIN
SELECT * FROM City WHERE ID BETWEEN 4000 AND 4300;
id select_type table type possible_keys key key_len ref rows Extra
@@ -789,11 +789,11 @@ id select_type table type possible_keys key key_len ref rows Extra
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 102000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 38 Using index condition
+1 SIMPLE City range Population Population 4 NULL 39 Using index condition
EXPLAIN
SELECT * FROM City WHERE (Population > 101000 AND Population < 103000);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City range Population Population 4 NULL 80 Using index condition
+1 SIMPLE City range Population Population 4 NULL 81 Using index condition
EXPLAIN
SELECT * FROM City WHERE Name LIKE 'Pa%';
id select_type table type possible_keys key key_len ref rows Extra
@@ -806,7 +806,7 @@ WHERE ((Population > 101000 AND Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
AND (Name LIKE 'Pa%' OR ID BETWEEN 4025 AND 4035);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,PRIMARY 7,4 NULL 13 Using sort_union(CountryPopulation,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,PRIMARY 7,4 NULL 14 Using sort_union(CountryPopulation,PRIMARY); Using where
EXPLAIN
SELECT * FROM City
WHERE ((Population > 101000 AND Population < 103000) OR
@@ -869,7 +869,7 @@ WHERE ((Population > 101000 and Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
OR (Name LIKE 'Pa%' OR ID BETWEEN 250 AND 260) AND Country='BRA';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,CountryName,PRIMARY 7,38,4 NULL 35 Using sort_union(CountryPopulation,CountryName,PRIMARY); Using where
+1 SIMPLE City index_merge PRIMARY,Population,Country,Name,CountryPopulation,CountryName CountryPopulation,CountryName,PRIMARY 7,38,4 NULL 36 Using sort_union(CountryPopulation,CountryName,PRIMARY); Using where
SELECT * FROM City USE INDEX ()
WHERE ((Population > 101000 and Population < 102000) OR
ID BETWEEN 3790 AND 3800) AND Country='USA'
@@ -1445,7 +1445,7 @@ explain
select * from t1
where (home_state = 'ia' or work_state='ia') and account_id = 1;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index_merge account_id,user_home_state_indx,user_work_state_indx user_home_state_indx,user_work_state_indx 3,3 NULL 10 Using union(user_home_state_indx,user_work_state_indx); Using where
+1 SIMPLE t1 index_merge account_id,user_home_state_indx,user_work_state_indx user_home_state_indx,user_work_state_indx 3,3 NULL 12 Using union(user_home_state_indx,user_work_state_indx); Using where
drop table t1;
CREATE TABLE t1 (
c1 int(11) NOT NULL auto_increment,
diff --git a/mysql-test/r/row-checksum-old.result b/mysql-test/r/row-checksum-old.result
index ef523463860..5789fc64c68 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 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
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 fb8a1260a1d..0fbebba073b 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 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
insert into t1 values(null, null), (1, "hello");
checksum table t1;
Table Checksum
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result
index daf28073cf1..2c1913f0929 100644
--- a/mysql-test/r/selectivity_innodb.result
+++ b/mysql-test/r/selectivity_innodb.result
@@ -144,9 +144,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
-3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
-2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 228 100.00
-4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
+3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
+2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 229 100.00
+4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@@ -165,9 +165,9 @@ order by s_suppkey;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY supplier index PRIMARY PRIMARY 4 NULL 10 100.00
1 PRIMARY <derived3> ref key0 key0 5 dbt3_s001.supplier.s_suppkey 10 100.00 Using where
-3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
-2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 227 100.00
-4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 228 100.00 Using where; Using temporary; Using filesort
+3 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
+2 SUBQUERY <derived4> ALL NULL NULL NULL NULL 228 100.00
+4 DERIVED lineitem range i_l_shipdate i_l_shipdate 4 NULL 229 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `dbt3_s001`.`supplier`.`s_suppkey` AS `s_suppkey`,`dbt3_s001`.`supplier`.`s_name` AS `s_name`,`dbt3_s001`.`supplier`.`s_address` AS `s_address`,`dbt3_s001`.`supplier`.`s_phone` AS `s_phone`,`revenue0`.`total_revenue` AS `total_revenue` from `dbt3_s001`.`supplier` join `dbt3_s001`.`revenue0` where ((`revenue0`.`supplier_no` = `dbt3_s001`.`supplier`.`s_suppkey`) and (`revenue0`.`total_revenue` = (select max(`revenue0`.`total_revenue`) from `dbt3_s001`.`revenue0`))) order by `dbt3_s001`.`supplier`.`s_suppkey`
select s_suppkey, s_name, s_address, s_phone, total_revenue
@@ -544,7 +544,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 4.17 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
-4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
+4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@@ -600,7 +600,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.03 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
-4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
+4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@@ -656,7 +656,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
-4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
+4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
@@ -712,7 +712,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED part ALL PRIMARY NULL NULL NULL 200 7.81 Using where
2 MATERIALIZED partsupp ref PRIMARY,i_ps_partkey,i_ps_suppkey PRIMARY 4 dbt3_s001.part.p_partkey 3 100.00 Using where
-4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.37 Using where
+4 DEPENDENT SUBQUERY lineitem ref i_l_shipdate,i_l_suppkey_partkey,i_l_partkey,i_l_suppkey i_l_suppkey_partkey 10 dbt3_s001.partsupp.ps_partkey,dbt3_s001.partsupp.ps_suppkey 8 14.40 Using where
Warnings:
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_partkey' of SELECT #4 was resolved in SELECT #2
Note 1276 Field or reference 'dbt3_s001.partsupp.ps_suppkey' of SELECT #4 was resolved in SELECT #2
diff --git a/mysql-test/r/stat_tables_innodb.result b/mysql-test/r/stat_tables_innodb.result
index 0e866755532..42443bfcb72 100644
--- a/mysql-test/r/stat_tables_innodb.result
+++ b/mysql-test/r/stat_tables_innodb.result
@@ -67,7 +67,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
@@ -198,7 +198,7 @@ and r_name = 'AMERICA' and o_orderdate >= date '1995-01-01'
group by n_name
order by revenue desc;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 211 Using where; Using temporary; Using filesort
+1 SIMPLE orders range PRIMARY,i_o_orderdate,i_o_custkey i_o_orderdate 4 NULL 213 Using where; Using temporary; Using filesort
1 SIMPLE customer eq_ref PRIMARY,i_c_nationkey PRIMARY 4 dbt3_s001.orders.o_custkey 1 Using where
1 SIMPLE nation eq_ref PRIMARY,i_n_regionkey PRIMARY 4 dbt3_s001.customer.c_nationkey 1
1 SIMPLE supplier ref PRIMARY,i_s_nationkey i_s_nationkey 5 dbt3_s001.customer.c_nationkey 1 Using index
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 80fc942e77c..acb3c311cf5 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -256,7 +256,7 @@ a+0 b+0
127 403
explain select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a a 2 NULL 8 Using where; Using index; Using filesort
+1 SIMPLE t1 range a a 2 NULL 9 Using where; Using index; Using filesort
select a+0, b+0 from t1 where a > 40 and a < 70 order by 2;
a+0 b+0
57 135
diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def
index 8c0d47983fd..ae9359f4a1b 100644
--- a/mysql-test/suite/encryption/disabled.def
+++ b/mysql-test/suite/encryption/disabled.def
@@ -14,4 +14,5 @@ innodb_scrub : MDEV-8139
innodb_scrub_compressed : MDEV-8139
innodb_scrub_background : MDEV-8139
innodb_encryption-page-compression : Fails with lost connection at line 156
+innochecksum : Waiting for merge
diff --git a/mysql-test/suite/encryption/r/debug_key_management.result b/mysql-test/suite/encryption/r/debug_key_management.result
index 8793e6ba363..e185740aa25 100644
--- a/mysql-test/suite/encryption/r/debug_key_management.result
+++ b/mysql-test/suite/encryption/r/debug_key_management.result
@@ -9,13 +9,13 @@ innodb_encryption_threads 4
select space,name,current_key_version from information_schema.innodb_tablespaces_encryption order by space;
space name current_key_version
0 NULL 1
-1 mysql/innodb_table_stats 1
-2 mysql/innodb_index_stats 1
+2 mysql/innodb_table_stats 1
+3 mysql/innodb_index_stats 1
set global debug_key_management_version=10;
select space,name,current_key_version from information_schema.innodb_tablespaces_encryption order by space;
space name current_key_version
0 NULL 10
-1 mysql/innodb_table_stats 10
-2 mysql/innodb_index_stats 10
+2 mysql/innodb_table_stats 10
+3 mysql/innodb_index_stats 10
set global innodb_encrypt_tables=OFF;
set global debug_key_management_version=1;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index cf9791887cc..84c8c2f6773 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -8,9 +8,12 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("mysqld: File .*");
call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
+call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
# Start server with keys2.txt
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
@@ -36,10 +39,12 @@ SELECT * FROM t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW WARNINGS;
Level Code Message
-Warning 1812 Tablespace is missing for table 'test/t1'
+Warning 192 Table test/t1 in tablespace 8 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Warning 192 Table test/t1 is encrypted but encryption service or used key_id 2 is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
+Warnings:
+Warning 192 Table in tablespace 8 encrypted.However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match. Can't continue opening the table.
# Start server with keys.txt
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
INSERT INTO t2 VALUES ('foobar',1,2);
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
index 68d8552a0a3..3449e63acb9 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
@@ -1,5 +1,8 @@
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@@ -24,6 +27,8 @@ UNLOCK TABLES;
NOT FOUND /foobar/ in t1.ibd
ALTER TABLE t1 DISCARD TABLESPACE;
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
# List after t1 DISCARD
t1.frm
@@ -42,3 +47,5 @@ ERROR HY000: Tablespace has been discarded for table 't1'
# t1 yes on expecting NOT FOUND
NOT FOUND /foobar/ in t1.ibd
DROP TABLE t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index 531ba4063a4..3ced393f38b 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -5,16 +5,22 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CHECK TABLE t1;
Table Op Msg_type Msg_text
-test.t1 check Warning Table test/t1 in tablespace 4 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
+test.t1 check Warning Table test/t1 in tablespace 7 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
test.t1 check Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
DROP TABLE t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
index 11130a7a20b..9d8b1ddd23b 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
@@ -5,10 +5,14 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
@@ -26,3 +30,5 @@ Level Code Message
Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-discard-import.result b/mysql-test/suite/encryption/r/innodb-discard-import.result
index 195b82f7488..dc55c0a77a6 100644
--- a/mysql-test/suite/encryption/r/innodb-discard-import.result
+++ b/mysql-test/suite/encryption/r/innodb-discard-import.result
@@ -1,5 +1,8 @@
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
@@ -72,6 +75,8 @@ ALTER TABLE t2 DISCARD TABLESPACE;
ALTER TABLE t3 DISCARD TABLESPACE;
ALTER TABLE t4 DISCARD TABLESPACE;
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
# List after t1 DISCARD
@@ -129,6 +134,8 @@ COUNT(*)
2000
flush data to disk
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
# tables should be still either encrypted and/or compressed
@@ -142,3 +149,5 @@ NOT FOUND /tmpres/ in t3.ibd
NOT FOUND /mysql/ in t4.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1,t2,t3,t4;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 5869c5d7000..2003df0f4f4 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
@@ -51,3 +53,5 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
set innodb_default_encryption_key_id = 1;
drop table t1,t2;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index 63ff1dcda71..62b233c1c93 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted");
call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match.");
@@ -23,10 +25,24 @@ CREATE TABLE `t1` (
`charcol3` varchar(128) DEFAULT NULL
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
+select * from t1;
+intcol1 intcol2 charcol1 charcol2 charcol3
+1 2 maria db encryption
+select * from t5;
+intcol1 intcol2 charcol1 charcol2 charcol3
+1 2 maria db encryption
alter table t1 encrypted='yes' `encryption_key_id`=1;
select * from t1;
+intcol1 intcol2 charcol1 charcol2 charcol3
+1 2 maria db encryption
+select * from t5;
+intcol1 intcol2 charcol1 charcol2 charcol3
+1 2 maria db encryption
+select * from t1;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
select * from t5;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
drop table t1;
drop table t5;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-log-encrypt.result b/mysql-test/suite/encryption/r/innodb-log-encrypt.result
index 655e3023f7a..fb62292e1f3 100644
--- a/mysql-test/suite/encryption/r/innodb-log-encrypt.result
+++ b/mysql-test/suite/encryption/r/innodb-log-encrypt.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table t1(c1 bigint not null, b char(200), c varchar(200)) engine=innodb encrypted=yes encryption_key_id=1;
show warnings;
@@ -53,3 +55,5 @@ FOUND /publicmessage/ in ib_logfile0
NOT FOUND /publicmessage/ in ib_logfile1
drop procedure innodb_insert_proc;
drop table t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption.result
index c4814983af4..051fd602db5 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@@ -121,6 +123,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
@@ -198,6 +202,8 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
@@ -275,3 +281,5 @@ drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
drop table innodb_defkey;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
index f7ffc77fd66..6efefb23b87 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1;
@@ -75,6 +77,8 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
variable_value >= 0
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
update innodb_normal set c1 = c1 + 1;
@@ -129,6 +133,8 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_normal;
Table Create Table
@@ -182,3 +188,5 @@ drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
index 92130da19e9..672202de774 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
@@ -2,6 +2,8 @@ call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the
call mtr.add_suppression("Disabling redo log encryp*");
call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@@ -100,6 +102,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
@@ -169,6 +173,8 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
@@ -247,3 +253,5 @@ pk
1
2
DROP TABLE t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
index f8c59b7bcc3..5bb3b2bc41e 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
@@ -1,5 +1,8 @@
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded.");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
@@ -50,6 +53,8 @@ t2.ibd
t3.frm
t3.ibd
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 DISCARD TABLESPACE;
ALTER TABLE t2 DISCARD TABLESPACE;
@@ -61,6 +66,8 @@ t3.frm
# Restarting server
# Done restarting server
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
# Tablespaces should be still encrypted
# t1 yes on expecting NOT FOUND
@@ -147,3 +154,5 @@ NOT FOUND /temp/ in t2.ibd
NOT FOUND /barfoo/ in t3.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
index ab958004eab..576b44fe897 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
@@ -1,5 +1,7 @@
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
@@ -63,5 +65,7 @@ COUNT(1)
SELECT COUNT(1) FROM t5;
COUNT(1)
400
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1,t2,t3,t4, t5;
set GLOBAL innodb_default_encryption_key_id=1;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_is.result b/mysql-test/suite/encryption/r/innodb_encryption_is.result
index 5bbcbbe6bb6..591c5a84ccc 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_is.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_is.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
@@ -12,3 +14,5 @@ NAME ENCRYPTION_SCHEME MIN_KEY_VERSION CURRENT_KEY_VERSION CURRENT_KEY_ID
test/t1 1 1 1 1
test/t2 1 1 1 2
DROP TABLE t1, t2;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
new file mode 100644
index 00000000000..e49e38a8f3f
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
@@ -0,0 +1,159 @@
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET GLOBAL innodb_file_per_table = ON;
+create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
+create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
+create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
+create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes;
+insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed2 select * from innodb_compressed1;
+insert into innodb_compressed3 select * from innodb_compressed1;
+insert into innodb_compressed4 select * from innodb_compressed1;
+# t1 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed1.ibd
+# t2 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed2.ibd
+# t3 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed3.ibd
+# t4 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed4.ibd
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET GLOBAL innodb_file_per_table = ON;
+select * from innodb_compressed1 where d = 20;
+c1 d a b
+1 20 private evenmoreprivate
+2 20 private evenmoreprivate
+8 20 private evenmoreprivate
+9 20 private evenmoreprivate
+10 20 private evenmoreprivate
+select * from innodb_compressed1 where d = 30;
+c1 d a b
+3 30 private evenmoreprivate
+4 30 private evenmoreprivate
+5 30 private evenmoreprivate
+6 30 private evenmoreprivate
+7 30 private evenmoreprivate
+select * from innodb_compressed2 where d = 20;
+c1 d a b
+1 20 private evenmoreprivate
+2 20 private evenmoreprivate
+8 20 private evenmoreprivate
+9 20 private evenmoreprivate
+10 20 private evenmoreprivate
+select * from innodb_compressed2 where d = 30;
+c1 d a b
+3 30 private evenmoreprivate
+4 30 private evenmoreprivate
+5 30 private evenmoreprivate
+6 30 private evenmoreprivate
+7 30 private evenmoreprivate
+select * from innodb_compressed3 where d = 20;
+c1 d a b
+1 20 private evenmoreprivate
+2 20 private evenmoreprivate
+8 20 private evenmoreprivate
+9 20 private evenmoreprivate
+10 20 private evenmoreprivate
+select * from innodb_compressed3 where d = 30;
+c1 d a b
+3 30 private evenmoreprivate
+4 30 private evenmoreprivate
+5 30 private evenmoreprivate
+6 30 private evenmoreprivate
+7 30 private evenmoreprivate
+select * from innodb_compressed4 where d = 20;
+c1 d a b
+1 20 private evenmoreprivate
+2 20 private evenmoreprivate
+8 20 private evenmoreprivate
+9 20 private evenmoreprivate
+10 20 private evenmoreprivate
+select * from innodb_compressed4 where d = 30;
+c1 d a b
+3 30 private evenmoreprivate
+4 30 private evenmoreprivate
+5 30 private evenmoreprivate
+6 30 private evenmoreprivate
+7 30 private evenmoreprivate
+update innodb_compressed1 set d = d + 10 where d = 30;
+update innodb_compressed2 set d = d + 10 where d = 30;
+update innodb_compressed3 set d = d + 10 where d = 30;
+update innodb_compressed4 set d = d + 10 where d = 30;
+insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate');
+# t1 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed1.ibd
+# t2 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed2.ibd
+# t3 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed3.ibd
+# t4 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed4.ibd
+select * from innodb_compressed1 where d = 40;
+c1 d a b
+3 40 private evenmoreprivate
+4 40 private evenmoreprivate
+5 40 private evenmoreprivate
+6 40 private evenmoreprivate
+7 40 private evenmoreprivate
+select * from innodb_compressed1 where d = 60;
+c1 d a b
+20 60 newprivate newevenmoreprivate
+select * from innodb_compressed2 where d = 40;
+c1 d a b
+3 40 private evenmoreprivate
+4 40 private evenmoreprivate
+5 40 private evenmoreprivate
+6 40 private evenmoreprivate
+7 40 private evenmoreprivate
+select * from innodb_compressed2 where d = 60;
+c1 d a b
+20 60 newprivate newevenmoreprivate
+select * from innodb_compressed3 where d = 40;
+c1 d a b
+3 40 private evenmoreprivate
+4 40 private evenmoreprivate
+5 40 private evenmoreprivate
+6 40 private evenmoreprivate
+7 40 private evenmoreprivate
+select * from innodb_compressed3 where d = 60;
+c1 d a b
+20 60 newprivate newevenmoreprivate
+select * from innodb_compressed4 where d = 40;
+c1 d a b
+3 40 private evenmoreprivate
+4 40 private evenmoreprivate
+5 40 private evenmoreprivate
+6 40 private evenmoreprivate
+7 40 private evenmoreprivate
+select * from innodb_compressed4 where d = 60;
+c1 d a b
+20 60 newprivate newevenmoreprivate
+# t1 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed1.ibd
+# t2 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed2.ibd
+# t3 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed3.ibd
+# t4 yes on expecting NOT FOUND
+NOT FOUND /private/ in innodb_compressed4.ibd
+drop table innodb_compressed1;
+drop table innodb_compressed2;
+drop table innodb_compressed3;
+drop table innodb_compressed4;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_tables.result b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
index 640e2be87a2..da62c0a2f0e 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_tables.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
@@ -104,6 +106,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
@@ -159,3 +163,5 @@ drop table innodb_compact;
drop table innodb_dynamic;
drop table innodb_compressed;
drop table innodb_redundant;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
index f5dba1548df..69ab0d0bca4 100644
--- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
@@ -174,3 +176,5 @@ NOT FOUND /mangled/ in t6.ibd
NOT FOUND /mysql/ in t7.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
index 43fb7368654..22038c0e933 100644
--- a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
+++ b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
@@ -1,5 +1,7 @@
# Restart mysqld --loose-file-key-management-filename=keys2.txt
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
@@ -105,6 +107,8 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
alter table innodb_compact engine=innodb encryption_key_id = 2;
alter table innodb_compressed engine=innodb encryption_key_id = 3;
@@ -151,3 +155,5 @@ drop table innodb_compact;
drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 9180fb12085..9fd6ac3a011 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -22,6 +22,8 @@ call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("mysqld: File .*");
call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace.");
+call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
+
--echo
--echo # Start server with keys2.txt
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
index 20d63b10649..d0480a6b424 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
@@ -8,7 +8,9 @@
#
# MDEV-8772: Assertion failure in file ha_innodb.cc line 20027 when importing page compressed and encrypted tablespace using incorrect keys
#
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
+
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.test b/mysql-test/suite/encryption/t/innodb-discard-import.test
index 6d9f6c5dbb3..3bcb8d39862 100644
--- a/mysql-test/suite/encryption/t/innodb-discard-import.test
+++ b/mysql-test/suite/encryption/t/innodb-discard-import.test
@@ -10,7 +10,8 @@
# MDEV-8770: Incorrect error message when importing page compressed tablespace
#
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--disable_query_log
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index 42d8008d1aa..e8e2ba02402 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -30,12 +30,14 @@ call mtr.add_suppression("InnoDB: Tablespace id.* is encrypted but encryption se
--shutdown_server
--source include/wait_until_disconnected.inc
---write_file $MYSQLTEST_VARDIR/keys1.txt
+--error 0,1,2
+--remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
+--write_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
1;770A8A65DA156D24EE2A093277530142
4;770A8A65DA156D24EE2A093277530143
EOF
---exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/encryption-disable-keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -58,8 +60,15 @@ CREATE TABLE `t1` (
) ENGINE=InnoDB;
insert into t1 values (1,2,'maria','db','encryption');
+
+select * from t1;
+select * from t5;
+
alter table t1 encrypted='yes' `encryption_key_id`=1;
+select * from t1;
+select * from t5;
+
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server
--source include/wait_until_disconnected.inc
@@ -77,7 +86,7 @@ select * from t5;
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--exec echo "restart:--innodb-encrypt-tables --plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/encryption-disable-keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -89,4 +98,4 @@ EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
---remove_file $MYSQLTEST_VARDIR/keys1.txt
+--remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
index def3665eeff..0361fddecff 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
@@ -4,7 +4,8 @@
-- source include/not_embedded.inc
-- source include/not_windows.inc
-call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded.");
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
@@ -107,6 +108,7 @@ ALTER TABLE t3 DISCARD TABLESPACE;
--echo # List after t1 DISCARD
--list_files $MYSQLD_DATADIR/test
+--disable_result_log
--error 0,1,2
--remove_file $MYSQLD_DATADIR/test/t1.cfg
--error 0,1,2
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.opt b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.opt
new file mode 100644
index 00000000000..7ebf81a07f3
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.opt
@@ -0,0 +1,4 @@
+--innodb-encrypt-tables=ON
+--innodb-encryption-rotate-key-age=15
+--innodb-encryption-threads=4
+--innodb-tablespaces-encryption
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
new file mode 100644
index 00000000000..0a28c1690a2
--- /dev/null
+++ b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
@@ -0,0 +1,125 @@
+-- source include/have_innodb.inc
+-- source include/have_file_key_management_plugin.inc
+-- source include/not_embedded.inc
+
+--disable_query_log
+let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
+let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
+--enable_query_log
+
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+
+create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
+create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
+create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
+create table innodb_compressed4(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=4 encrypted=yes;
+
+insert into innodb_compressed1 values (1, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (2, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (3, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (4, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (5, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (6, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (7, 30, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (8, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (9, 20, 'private', 'evenmoreprivate');
+insert into innodb_compressed1 values (10, 20, 'private', 'evenmoreprivate');
+
+insert into innodb_compressed2 select * from innodb_compressed1;
+insert into innodb_compressed3 select * from innodb_compressed1;
+insert into innodb_compressed4 select * from innodb_compressed1;
+
+--source include/restart_mysqld.inc
+
+--let $MYSQLD_DATADIR=`select @@datadir`
+--let t1_IBD = $MYSQLD_DATADIR/test/innodb_compressed1.ibd
+--let t2_IBD = $MYSQLD_DATADIR/test/innodb_compressed2.ibd
+--let t3_IBD = $MYSQLD_DATADIR/test/innodb_compressed3.ibd
+--let t4_IBD = $MYSQLD_DATADIR/test/innodb_compressed4.ibd
+--let SEARCH_RANGE = 10000000
+--let SEARCH_PATTERN=private
+--echo # t1 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t1_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t2 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t2_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t3 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t3_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t4 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t4_IBD
+-- source include/search_pattern_in_file.inc
+
+SET GLOBAL innodb_file_format = `Barracuda`;
+SET GLOBAL innodb_file_per_table = ON;
+
+select * from innodb_compressed1 where d = 20;
+select * from innodb_compressed1 where d = 30;
+select * from innodb_compressed2 where d = 20;
+select * from innodb_compressed2 where d = 30;
+select * from innodb_compressed3 where d = 20;
+select * from innodb_compressed3 where d = 30;
+select * from innodb_compressed4 where d = 20;
+select * from innodb_compressed4 where d = 30;
+
+update innodb_compressed1 set d = d + 10 where d = 30;
+update innodb_compressed2 set d = d + 10 where d = 30;
+update innodb_compressed3 set d = d + 10 where d = 30;
+update innodb_compressed4 set d = d + 10 where d = 30;
+
+insert into innodb_compressed1 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed2 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed3 values (20, 60, 'newprivate', 'newevenmoreprivate');
+insert into innodb_compressed4 values (20, 60, 'newprivate', 'newevenmoreprivate');
+
+--let SEARCH_PATTERN=private
+--echo # t1 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t1_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t2 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t2_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t3 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t3_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t4 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t4_IBD
+-- source include/search_pattern_in_file.inc
+
+--source include/restart_mysqld.inc
+
+select * from innodb_compressed1 where d = 40;
+select * from innodb_compressed1 where d = 60;
+select * from innodb_compressed2 where d = 40;
+select * from innodb_compressed2 where d = 60;
+select * from innodb_compressed3 where d = 40;
+select * from innodb_compressed3 where d = 60;
+select * from innodb_compressed4 where d = 40;
+select * from innodb_compressed4 where d = 60;
+
+--let SEARCH_PATTERN=private
+--echo # t1 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t1_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t2 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t2_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t3 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t3_IBD
+-- source include/search_pattern_in_file.inc
+--echo # t4 yes on expecting NOT FOUND
+-- let SEARCH_FILE=$t4_IBD
+-- source include/search_pattern_in_file.inc
+
+drop table innodb_compressed1;
+drop table innodb_compressed2;
+drop table innodb_compressed3;
+drop table innodb_compressed4;
+
+# reset system
+--disable_query_log
+EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
+EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
+--enable_query_log
diff --git a/mysql-test/suite/funcs_1/r/is_tables_innodb.result b/mysql-test/suite/funcs_1/r/is_tables_innodb.result
index 23e6ad77309..0e2389771b2 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_innodb.result
@@ -21,7 +21,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -44,7 +44,7 @@ TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -67,7 +67,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -111,7 +111,7 @@ TABLE_NAME t1
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -134,7 +134,7 @@ TABLE_NAME t2
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
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 c9c86b4e96e..8e0c9b64dab 100644
--- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result
@@ -315,7 +315,7 @@ TABLE_NAME innodb_index_stats
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
@@ -338,7 +338,7 @@ TABLE_NAME innodb_table_stats
TABLE_TYPE BASE TABLE
ENGINE InnoDB
VERSION 10
-ROW_FORMAT Compact
+ROW_FORMAT DYNAMIC_OR_PAGE
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
diff --git a/mysql-test/suite/handler/disabled.def b/mysql-test/suite/handler/disabled.def
new file mode 100644
index 00000000000..ef63577b0cb
--- /dev/null
+++ b/mysql-test/suite/handler/disabled.def
@@ -0,0 +1,13 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+innodb : MDEV-10549 \ No newline at end of file
diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def
index 8cae44a3607..778ce482db5 100644
--- a/mysql-test/suite/innodb/disabled.def
+++ b/mysql-test/suite/innodb/disabled.def
@@ -10,3 +10,7 @@
#
##############################################################################
+innodb.auto_increment_dup : MDEV-10548
+innodb_skip_innodb_is_tables : MDEV-10200
+innodb.innodb_bug13510739: MDEV-10549
+innodb.defrag_mdl-9155 : MDEV-10551
diff --git a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
index bc64937669a..75cab775528 100644
--- a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
+++ b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
@@ -23,6 +23,8 @@ call mtr.add_suppression(".*");
# create the table with compressed pages of size 8K.
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW CREATE TABLE t1;
+
# percentage of compressions that will be forced to fail
SET GLOBAL innodb_simulate_comp_failures = 25;
@@ -35,16 +37,16 @@ let $commit_iterations=50;
while ($num_inserts_ind)
{
let $repeat = `select floor(rand() * 10)`;
- eval
-INSERT INTO t1(id, msg)
-VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
+ eval INSERT INTO t1(id, msg)
+ VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
dec $num_inserts_ind;
}
--enable_query_log
--enable_result_log
-SELECT COUNT(*) FROM t1;
+COMMIT;
+SELECT COUNT(id) FROM t1;
--disable_query_log
--disable_result_log
diff --git a/mysql-test/suite/innodb/r/group_commit_crash.result b/mysql-test/suite/innodb/r/group_commit_crash.result
index 5d5dffab33e..80a780ba2c5 100644
--- a/mysql-test/suite/innodb/r/group_commit_crash.result
+++ b/mysql-test/suite/innodb/r/group_commit_crash.result
@@ -124,3 +124,5 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
index 542ce9d496e..06fdeaef6a7 100644
--- a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
+++ b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
@@ -124,3 +124,5 @@ delete from t1;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE setcrash;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/help_url.result b/mysql-test/suite/innodb/r/help_url.result
index 10affe78f0c..87530bc2f7d 100644
--- a/mysql-test/suite/innodb/r/help_url.result
+++ b/mysql-test/suite/innodb/r/help_url.result
@@ -1,4 +1,2 @@
create table innodb_table_monitor (a int) engine=InnoDB;
-Warnings:
-Warning 131 Using the table name innodb_table_monitor to enable diagnostic output is deprecated and may be removed in future releases. Use INFORMATION_SCHEMA or PERFORMANCE_SCHEMA tables or SET GLOBAL innodb_status_output=ON.
drop table innodb_table_monitor;
diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result
index 0537315122c..adfbc97ea66 100644
--- a/mysql-test/suite/innodb/r/innodb-16k.result
+++ b/mysql-test/suite/innodb/r/innodb-16k.result
@@ -1,5 +1,11 @@
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_large_prefix = OFF;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
@@ -224,6 +230,8 @@ table_name row_format create_options
t1 Compressed row_format=COMPRESSED
DROP TABLE t1;
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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);
@@ -368,11 +376,6 @@ UPDATE t1 SET s=@e;
CREATE INDEX t1t ON t1 (t(767));
UPDATE t1 SET t=@e;
ERROR HY000: Undo log record is too big.
-CREATE INDEX t1u ON t1 (u(767));
-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
-CREATE INDEX t1ut ON t1 (u(767), t(767));
-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
-CREATE INDEX t1st ON t1 (s(767), t(767));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -416,11 +419,12 @@ t1 CREATE TABLE `t1` (
KEY `t1q` (`q`(767)),
KEY `t1r` (`r`(767)),
KEY `t1s` (`s`(767)),
- KEY `t1t` (`t`(767)),
- KEY `t1st` (`s`(767),`t`(767))
+ KEY `t1t` (`t`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
DROP TABLE t1;
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
Test an assertion failure on purge.
CREATE TABLE t1_purge (
@@ -464,6 +468,8 @@ DELETE FROM t3_purge;
DELETE FROM t4_purge;
SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
v1 varchar(500), v2 varchar(500), v3 varchar(500),
@@ -552,7 +558,7 @@ SHOW WARNINGS;
Level Code Message
Error 1713 Undo log record is too big.
DROP TABLE bug12547647;
-SET SESSION innodb_strict_mode = off;
+SET SESSION innodb_strict_mode = on;
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
PRIMARY KEY (c(767),d(767)))
@@ -977,3 +983,7 @@ COL196 TEXT,
COL197 TEXT)
row_format=compact,ENGINE=INNODB;
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.
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-alter-discard.result b/mysql-test/suite/innodb/r/innodb-alter-discard.result
index 29712868239..bd60d2d0099 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-discard.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-discard.result
@@ -1,5 +1,11 @@
SET GLOBAL innodb_file_per_table=1;
CREATE TABLE t(a INT)ENGINE=InnoDB;
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
+call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
call mtr.add_suppression("InnoDB: Table 'test/t'$");
@@ -17,5 +23,5 @@ ERROR 42S02: Table 'test.t1' doesn't exist
ALTER TABLE t DISCARD TABLESPACE;
Warnings:
Warning 1812 Tablespace is missing for table 'test/t'
-Warning 1812 Tablespace is missing for table 't'
+Warning 1812 Tablespace is missing for table 'test/t'
DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-blob.result b/mysql-test/suite/innodb/r/innodb-blob.result
index ec5a4a8b0ac..fe4b1908fcb 100644
--- a/mysql-test/suite/innodb/r/innodb-blob.result
+++ b/mysql-test/suite/innodb/r/innodb-blob.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY, b TEXT, c TEXT) ENGINE=InnoDB;
@@ -18,7 +19,9 @@ a RIGHT(b,20)
1 aaaaaaaaaaaaaaaaaaaa
2 bbbbbbbbbbbbbbbbbbbb
connection default;
-SET DEBUG_DBUG='+d,row_ins_extern_checkpoint';
+SET DEBUG='+d,row_ins_extern_checkpoint';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
ROLLBACK;
BEGIN;
@@ -38,7 +41,9 @@ a
1
2
3
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
INSERT INTO t2 VALUES (42);
ERROR HY000: Lost connection to MySQL server during query
disconnect con1;
@@ -51,18 +56,25 @@ test.t1 check status OK
INSERT INTO t3 VALUES
(1,REPEAT('d',7000),REPEAT('e',100)),
(2,REPEAT('g',7000),REPEAT('h',100));
-SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR go';
+SET DEBUG_SYNC='blob_write_middle SIGNAL go_sel WAIT_FOR go_upd';
UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+# Connection con1:
connect con1,localhost,root,,;
-SET DEBUG_SYNC='now WAIT_FOR have_latch';
+SET DEBUG_SYNC='now WAIT_FOR go_sel';
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@tx_isolation;
@@tx_isolation
READ-UNCOMMITTED
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
-connect con2,localhost,root,,;
-SET DEBUG_SYNC='now SIGNAL go';
+a RIGHT(b,20) RIGHT(c,20)
+2 gggggggggggggggggggg hhhhhhhhhhhhhhhhhhhh
+set debug_sync='now SIGNAL go_upd';
+# Connection default:
+connection default;
+# reap UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+# Connection con1:
connection con1;
+SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
a RIGHT(b,20) RIGHT(c,20)
1 dddddddddddddddddddd ffffffffffffffffffff
2 gggggggggggggggggggg hhhhhhhhhhhhhhhhhhhh
@@ -73,11 +85,13 @@ Table Op Msg_type Msg_text
test.t1 check status OK
test.t2 check status OK
test.t3 check status OK
-connection con2;
+connect con2,localhost,root,,;
BEGIN;
INSERT INTO t2 VALUES (347);
connection default;
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2;
connection con2;
@@ -86,7 +100,9 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('i',3000) WHERE a=2
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
disconnect con2;
@@ -109,7 +125,9 @@ connect con2,localhost,root,,;
BEGIN;
INSERT INTO t2 VALUES (33101);
connection default;
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2;
connection con2;
@@ -118,7 +136,9 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
info
UPDATE t3 SET c=REPEAT('j',3000) WHERE a=2
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
COMMIT;
ERROR HY000: Lost connection to MySQL server during query
disconnect con2;
diff --git a/mysql-test/suite/innodb/r/innodb-bug-14068765.result b/mysql-test/suite/innodb/r/innodb-bug-14068765.result
index 7a8f959b995..f6d37b23114 100644
--- a/mysql-test/suite/innodb/r/innodb-bug-14068765.result
+++ b/mysql-test/suite/innodb/r/innodb-bug-14068765.result
@@ -38,5 +38,7 @@ COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-bug-14084530.result b/mysql-test/suite/innodb/r/innodb-bug-14084530.result
index 4b4f201300c..3ba8e0e8440 100644
--- a/mysql-test/suite/innodb/r/innodb-bug-14084530.result
+++ b/mysql-test/suite/innodb/r/innodb-bug-14084530.result
@@ -27,5 +27,7 @@ c1
SET AUTOCOMMIT = 1;
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
index 508d578193f..5abfb8cffa7 100644
--- a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
+++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result
@@ -2,13 +2,13 @@
# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
# OPERATION IF IT IS DONE IN-PLACE
#
-SET GLOBAL innodb_change_buffering_debug = 1;
CREATE TABLE t1(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
c INT,
INDEX(b))
-ENGINE=InnoDB;
+ENGINE=InnoDB STATS_PERSISTENT=0;
+SET GLOBAL innodb_change_buffering_debug = 1;
INSERT INTO t1 VALUES(0,'x',1);
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
@@ -23,7 +23,6 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
b
@@ -35,7 +34,9 @@ connection con1;
BEGIN;
DELETE FROM t1 WHERE a=1;
INSERT INTO t1 VALUES(1,'X',1);
-SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
+SET DEBUG='+d,crash_after_log_ibuf_upd_inplace';
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SELECT b FROM t1 LIMIT 3;
ERROR HY000: Lost connection to MySQL server during query
FOUND /Wrote log record for ibuf update in place operation/ in my_restart.err
diff --git a/mysql-test/suite/innodb/r/innodb-fk-warnings.result b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
index eddedfc3620..6c203cca207 100644
--- a/mysql-test/suite/innodb/r/innodb-fk-warnings.result
+++ b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
@@ -16,7 +16,7 @@ CONSTRAINT test FOREIGN KEY (b) REFERENCES t2 (id)
ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
show warnings;
Level Code Message
-Warning 121 Create or Alter table `test`.`t2` with foreign key constraint failed. Foreign key constraint `test/test` already exists on data dictionary. Foreign key constraint names need to be unique in database. Error in foreign key definition: CONSTRAINT `test` FOREIGN KEY (`b`) REFERENCES `test`.`t2` (`id`).
+Warning 121 Create or Alter table `test`.`t2` with foreign key constraint failed. Foreign key constraint `test`.`test` already exists on data dictionary. Foreign key constraint names need to be unique in database. Error in foreign key definition: CONSTRAINT `test` FOREIGN KEY (`b`) REFERENCES `test`.`t2` (`id`).
Error 1005 Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
Warning 1022 Can't write; duplicate key in table 't2'
drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index e6ee836ae13..fa490274652 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -1,5 +1,7 @@
set global innodb_file_per_table=on;
set global innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
create table t1(a varchar(2) primary key) engine=innodb;
insert into t1 values('');
@@ -857,8 +859,12 @@ 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;
set global innodb_file_per_table=1;
-set global innodb_file_format=Antelope;
-set global innodb_file_format_max=Antelope;
+set global innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_format_max=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
@@ -1189,3 +1195,7 @@ t2c CREATE TABLE `t2c` (
KEY `t2a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t2c,t2i;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-mdev-7408.result b/mysql-test/suite/innodb/r/innodb-mdev-7408.result
index 8f6ad139192..80b46d3425c 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev-7408.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev-7408.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("InnoDB: User stopword table .* does not exist.");
select @@global.innodb_ft_server_stopword_table;
@@global.innodb_ft_server_stopword_table
NULL
diff --git a/mysql-test/suite/innodb/r/innodb-mdev-7513.result b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
index bb3531e3f90..55b4d3462b0 100644
--- a/mysql-test/suite/innodb/r/innodb-mdev-7513.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
call mtr.add_suppression("Row size too large (> 8126)*");
CREATE TABLE t1 ( text1 TEXT,
text2 TEXT,
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
index 8d3bc063a71..a566c94bd3b 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
@@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 5;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -435,3 +437,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
index eeab2622cb6..76cd5b16f28 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
@@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 2;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -436,3 +438,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
index d340801b656..cceff820ee0 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
@@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 4;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -435,3 +437,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
index fdbc99f60d9..1a9235fab62 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
@@ -1,4 +1,6 @@
set global innodb_file_format = `barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 3;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -349,3 +351,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
index a0b2f947fd3..e1d46b04a7f 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
@@ -1,5 +1,7 @@
call mtr.add_suppression("Compression failed for space*");
set global innodb_file_format = `barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 6;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -436,3 +438,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
index 98de5db3c12..a0ac8986b9e 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
@@ -91,6 +93,8 @@ select count(*) from innodb_dynamic where c1 < 1500000;
count(*)
5000
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 0;
alter table innodb_compact engine=innodb page_compressed=DEFAULT;
@@ -119,3 +123,5 @@ drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
index 4c3ab273b2e..a8078c02e13 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
@@ -349,3 +351,5 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
index e613f76d5bf..9837f567954 100644
--- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
@@ -23,6 +23,22 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+Table Create Table
+grad_degree CREATE TABLE `grad_degree` (
+ `student_id` int(8) unsigned NOT NULL,
+ `plan` varchar(10) NOT NULL,
+ `admit_term` char(4) NOT NULL,
+ `wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
+ `ofis_deg_status` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
+ ELSE 'Not Completed'
+ END) VIRTUAL,
+ `deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
+ `deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
+ PRIMARY KEY (`student_id`,`plan`,`admit_term`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
INSERT IGNORE grad_degree (
@@ -117,6 +133,57 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+Table Create Table
+grad_degree CREATE TABLE `grad_degree` (
+ `student_id` int(8) unsigned NOT NULL,
+ `plan` varchar(10) NOT NULL,
+ `admit_term` char(4) NOT NULL,
+ `wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
+ `ofis_deg_status` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
+ ELSE 'Not Completed'
+ END) VIRTUAL,
+ `ofis_deg_status2` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress2'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
+ ELSE 'Not Completed2'
+ END) VIRTUAL,
+ `ofis_deg_status3` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress3'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
+ ELSE 'Not Completed3'
+ END) VIRTUAL,
+ `ofis_deg_status4` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress4'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
+ ELSE 'Not Completed4'
+ END) VIRTUAL,
+ `ofis_deg_status5` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress5'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
+ ELSE 'Not Completed5'
+ END) VIRTUAL,
+ `ofis_deg_status6` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress6'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
+ ELSE 'Not Completed6'
+ END) VIRTUAL,
+ `ofis_deg_status7` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress7'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
+ ELSE 'Not Completed7'
+ END) VIRTUAL,
+ `ofis_deg_status8` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress8'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
+ ELSE 'Not Completed8'
+ END) VIRTUAL,
+ `deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
+ `deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
+ PRIMARY KEY (`student_id`,`plan`,`admit_term`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
INSERT IGNORE grad_degree (
@@ -264,6 +331,57 @@ deg_start_term char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginn
deg_as_of_term char(4) NOT NULL COMMENT 'In most cases also end term',
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+Table Create Table
+grad_degree CREATE TABLE `grad_degree` (
+ `student_id` int(8) unsigned NOT NULL,
+ `plan` varchar(10) NOT NULL,
+ `admit_term` char(4) NOT NULL,
+ `wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
+ `ofis_deg_status` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
+ ELSE 'Not Completed'
+ END) VIRTUAL,
+ `ofis_deg_status2` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress2'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
+ ELSE 'Not Completed2'
+ END) VIRTUAL,
+ `ofis_deg_status3` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress3'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
+ ELSE 'Not Completed3'
+ END) VIRTUAL,
+ `ofis_deg_status4` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress4'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
+ ELSE 'Not Completed4'
+ END) VIRTUAL,
+ `ofis_deg_status5` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress5'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
+ ELSE 'Not Completed5'
+ END) VIRTUAL,
+ `ofis_deg_status6` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress6'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
+ ELSE 'Not Completed6'
+ END) VIRTUAL,
+ `ofis_deg_status7` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress7'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
+ ELSE 'Not Completed7'
+ END) VIRTUAL,
+ `ofis_deg_status8` varchar(15) AS (CASE
+WHEN wdraw_rsn = '' THEN 'In progress8'
+ WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
+ ELSE 'Not Completed8'
+ END) VIRTUAL,
+ `deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
+ `deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
+ PRIMARY KEY (`student_id`,`plan`,`admit_term`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
ALTER TABLE grad_degree DROP COLUMN ofis_deg_status2, DROP COLUMN ofis_deg_status3,
DROP COLUMN ofis_deg_status4, DROP COLUMN ofis_deg_status5, DROP COLUMN ofis_deg_status6,
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
index 060840859a7..ec28ead12b7 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-1.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
@@ -1,9 +1,12 @@
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -126,6 +129,8 @@ COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE testdb_wl5522.t1 (
col_1_varbinary VARBINARY (4000) ,
col_2_varchar VARCHAR (4000),
@@ -410,7 +415,7 @@ ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
+ERROR HY000: Tablespace for table 'testdb_wl5522/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM testdb_wl5522.t1 ORDER BY i;
i
100
@@ -807,5 +812,7 @@ DROP DATABASE testdb_wl5522;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
index 0e863f5849e..ae4e96dcd48 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
@@ -1,8 +1,13 @@
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
+call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -49,6 +54,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -86,7 +93,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_internal_error";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: While updating the <space, root page number> of index "GEN_CLUST_INDEX" - Generic error
+ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
SET SESSION debug_dbug="-d,ib_import_internal_error";
restore: t1 .ibd and .cfg files
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
@@ -99,7 +106,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Too many concurrent transactions
+ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Too many concurrent transactions
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
@@ -442,7 +449,7 @@ t1 CREATE TABLE `t1` (
KEY `idx1` (`c2`),
KEY `idx2` (`c3`(512)),
KEY `idx3` (`c4`(512))
-) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
+) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
@@ -473,7 +480,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Data structure corruption
+ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Data structure corruption
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@@ -498,7 +505,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index "GEN_CLUST_INDEX"
+ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@@ -563,7 +570,7 @@ ERROR HY000: Tablespace has been discarded for table 't1'
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table '"test_wl5522"."t1"' : Unsupported
+ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Unsupported
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@@ -575,6 +582,12 @@ 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;
+Warnings:
+Error 145 Table './mtr/test_suppressions' is marked as crashed and should be repaired
+Error 1194 Table 'test_suppressions' is marked as crashed and should be repaired
+Error 1034 1 client is using or hasn't closed the table properly
SET GLOBAL INNODB_FILE_PER_TABLE=1;
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
-SET SESSION innodb_strict_mode=0;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET SESSION innodb_strict_mode=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
index 47413b18ce9..562e9f84cd4 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
@@ -1,9 +1,12 @@
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -74,9 +77,6 @@ ALTER TABLE t1 DISCARD TABLESPACE;
t1.frm
ALTER TABLE t1 IMPORT TABLESPACE;
ALTER TABLE t1 ENGINE InnoDB;
-Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
SELECT COUNT(*) FROM t1;
COUNT(*)
640
@@ -112,6 +112,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -124,7 +126,7 @@ c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
INSERT INTO t1(c2) VALUES(1);
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
+ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM t1;
c1 c2
1 1
@@ -459,7 +461,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
SELECT * FROM t1;
c1 c2
1 1
@@ -498,6 +500,8 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
-SET SESSION innodb_strict_mode=0;
+SET SESSION innodb_strict_mode=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index fb4ac37b9fd..84a67edab1a 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -1,9 +1,12 @@
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
DROP TABLE IF EXISTS t1;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -105,6 +108,8 @@ SELECT @@innodb_file_per_table;
@@innodb_file_per_table
1
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -113,7 +118,7 @@ c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;
INSERT INTO t1(c2) VALUES(1);
ALTER TABLE t1 IMPORT TABLESPACE;
-ERROR HY000: Tablespace for table 't1' exists. Please DISCARD the tablespace before IMPORT.
+ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT.
SELECT * FROM t1;
c1 c2
1 1
@@ -426,7 +431,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1
SELECT * FROM t1;
c1 c2
1 1
@@ -536,7 +541,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SELECT * FROM t1;
c1 c2
1 1
@@ -612,7 +617,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
SELECT * FROM t1;
c1 c2
1 1
@@ -722,7 +727,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SELECT * FROM t1;
c1 c2
1 1
@@ -801,7 +806,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
SELECT * FROM t1;
c1 c2
1 1
@@ -911,7 +916,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SELECT * FROM t1;
c1 c2
1 1
@@ -990,7 +995,7 @@ t1 CREATE TABLE `t1` (
`c2` int(11) DEFAULT NULL,
PRIMARY KEY (`c1`),
KEY `idx` (`c2`)
-) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
SELECT * FROM t1;
c1 c2
1 1
@@ -1029,5 +1034,7 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Antelope;
+SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 4c890ddf0c0..d278feeee11 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -947,6 +947,7 @@ desc t1;
Field Type Null Key Default Extra
t int(11) NO MUL 1
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -1009,6 +1010,7 @@ select * from t2;
number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
333 tubs 99 2 2002-01-09 11:34:53 501 2002-01-09 11:34:53 500 3 10 0
drop table t1,t2;
+SET sql_mode = default;
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
@@ -1316,16 +1318,80 @@ INSERT INTO t2 VALUES (10, 'old'), (20, 'other');
UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
ERROR 23000: Foreign key constraint for table 't1', record 'other-somevalu' would lead to a duplicate entry in table 't2', key 'c1'
DROP TABLE t2,t1;
+call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
create table t1(
id int primary key,
pid int,
index(pid),
foreign key(pid) references t1(id) on delete cascade) engine=innodb;
-insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
-(8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
+insert into t1 values
+( 0, 0), ( 1, 0), ( 2, 1), ( 3, 2),
+( 4, 3), ( 5, 4), ( 6, 5), ( 7, 6),
+( 8, 7), ( 9, 8), ( 10, 9), ( 11, 10),
+( 12, 11), ( 13, 12), ( 14, 13), ( 15, 14),
+( 16, 15), ( 17, 16), ( 18, 17), ( 19, 18),
+( 20, 19), ( 21, 20), ( 22, 21), ( 23, 22),
+( 24, 23), ( 25, 24), ( 26, 25), ( 27, 26),
+( 28, 27), ( 29, 28), ( 30, 29), ( 31, 30),
+( 32, 31), ( 33, 32), ( 34, 33), ( 35, 34),
+( 36, 35), ( 37, 36), ( 38, 37), ( 39, 38),
+( 40, 39), ( 41, 40), ( 42, 41), ( 43, 42),
+( 44, 43), ( 45, 44), ( 46, 45), ( 47, 46),
+( 48, 47), ( 49, 48), ( 50, 49), ( 51, 50),
+( 52, 51), ( 53, 52), ( 54, 53), ( 55, 54),
+( 56, 55), ( 57, 56), ( 58, 57), ( 59, 58),
+( 60, 59), ( 61, 60), ( 62, 61), ( 63, 62),
+( 64, 63), ( 65, 64), ( 66, 65), ( 67, 66),
+( 68, 67), ( 69, 68), ( 70, 69), ( 71, 70),
+( 72, 71), ( 73, 72), ( 74, 73), ( 75, 74),
+( 76, 75), ( 77, 76), ( 78, 77), ( 79, 78),
+( 80, 79), ( 81, 80), ( 82, 81), ( 83, 82),
+( 84, 83), ( 85, 84), ( 86, 85), ( 87, 86),
+( 88, 87), ( 89, 88), ( 90, 89), ( 91, 90),
+( 92, 91), ( 93, 92), ( 94, 93), ( 95, 94),
+( 96, 95), ( 97, 96), ( 98, 97), ( 99, 98),
+(100, 99), (101, 100), (102, 101), (103, 102),
+(104, 103), (105, 104), (106, 105), (107, 106),
+(108, 107), (109, 108), (110, 109), (111, 110),
+(112, 111), (113, 112), (114, 113), (115, 114),
+(116, 115), (117, 116), (118, 117), (119, 118),
+(120, 119), (121, 120), (122, 121), (123, 122),
+(124, 123), (125, 124), (126, 125), (127, 126),
+(128, 127), (129, 128), (130, 129), (131, 130),
+(132, 131), (133, 132), (134, 133), (135, 134),
+(136, 135), (137, 136), (138, 137), (139, 138),
+(140, 139), (141, 140), (142, 141), (143, 142),
+(144, 143), (145, 144), (146, 145), (147, 146),
+(148, 147), (149, 148), (150, 149), (151, 150),
+(152, 151), (153, 152), (154, 153), (155, 154),
+(156, 155), (157, 156), (158, 157), (159, 158),
+(160, 159), (161, 160), (162, 161), (163, 162),
+(164, 163), (165, 164), (166, 165), (167, 166),
+(168, 167), (169, 168), (170, 169), (171, 170),
+(172, 171), (173, 172), (174, 173), (175, 174),
+(176, 175), (177, 176), (178, 177), (179, 178),
+(180, 179), (181, 180), (182, 181), (183, 182),
+(184, 183), (185, 184), (186, 185), (187, 186),
+(188, 187), (189, 188), (190, 189), (191, 190),
+(192, 191), (193, 192), (194, 193), (195, 194),
+(196, 195), (197, 196), (198, 197), (199, 198),
+(200, 199), (201, 200), (202, 201), (203, 202),
+(204, 203), (205, 204), (206, 205), (207, 206),
+(208, 207), (209, 208), (210, 209), (211, 210),
+(212, 211), (213, 212), (214, 213), (215, 214),
+(216, 215), (217, 216), (218, 217), (219, 218),
+(220, 219), (221, 220), (222, 221), (223, 222),
+(224, 223), (225, 224), (226, 225), (227, 226),
+(228, 227), (229, 228), (230, 229), (231, 230),
+(232, 231), (233, 232), (234, 233), (235, 234),
+(236, 235), (237, 236), (238, 237), (239, 238),
+(240, 239), (241, 240), (242, 241), (243, 242),
+(244, 243), (245, 244), (246, 245), (247, 246),
+(248, 247), (249, 248), (250, 249), (251, 250),
+(252, 251), (253, 252), (254, 253), (255, 254);
delete from t1 where id=0;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE)
-delete from t1 where id=15;
+Got one of the listed errors
+delete from t1 where id=255;
delete from t1 where id=0;
drop table t1;
CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
@@ -1628,6 +1694,7 @@ a
drop table t1;
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+analyze table t1;
select * from t1 order by a,b,c,d;
a b c d e
1 1 a 1 1
@@ -1689,10 +1756,10 @@ variable_value
16384
SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
variable_value - @innodb_rows_deleted_orig
-71
+311
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
-964
+1204
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
@@ -2259,7 +2326,7 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (v varchar(10), c char(10)) row_format=fixed;
Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2287,9 +2354,16 @@ select * from t1 where a=20 and b is null;
a b
20 NULL
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET GLOBAL innodb_large_prefix=OFF;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
+SET GLOBAL innodb_large_prefix=default;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1;
create table t1 (v varchar(65536));
Warnings:
@@ -2309,7 +2383,8 @@ t1 CREATE TABLE `t1` (
`v` mediumtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
-set storage_engine=MyISAM;
+SET sql_mode = default;
+set default_storage_engine=MyISAM;
create table t1 (v varchar(16384)) engine=innodb;
drop table t1;
create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
@@ -2434,6 +2509,10 @@ t9 CREATE TABLE `t9` (
KEY `col1` (`col1`,`col2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET GLOBAL innodb_large_prefix=OFF;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
Warnings:
@@ -2450,6 +2529,9 @@ create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
+SET GLOBAL innodb_large_prefix=default;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2457,6 +2539,9 @@ t1 CREATE TABLE `t1` (
KEY `col1` (`col1`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2, t3, t4;
+set global innodb_large_prefix=OFF;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
@@ -2469,6 +2554,10 @@ ERROR 42000: Specified key was too long; max key length is 767 bytes
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
ERROR 42000: Specified key was too long; max key length is 767 bytes
+SET sql_mode = default;
+set global innodb_large_prefix=default;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t1
(
id INT PRIMARY KEY
@@ -2485,7 +2574,7 @@ INSERT INTO t2 VALUES(1);
DELETE FROM t1 WHERE id = 1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
DROP TABLE t1;
-ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
+Got one of the listed errors
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=1;
@@ -2608,6 +2697,7 @@ d varchar(255) character set utf8,
e varchar(255) character set utf8,
key (a,b,c,d,e)) engine=innodb;
ERROR 42000: Specified key was too long; max key length is 3072 bytes
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
@@ -2723,6 +2813,7 @@ t2 CREATE TABLE `t2` (
KEY `t2_ibfk_0` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t2,t1;
+SET sql_mode = default;
CREATE TABLE t1 (
field1 varchar(8) NOT NULL DEFAULT '',
field2 varchar(8) NOT NULL DEFAULT '',
@@ -3095,7 +3186,7 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
-set innodb_strict_mode=on;
+SET innodb_strict_mode=ON;
CREATE TABLE t1 (
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
@@ -3106,7 +3197,8 @@ c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
-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.
+ERROR 42000: Row size too large (> {checked_valid}). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+SET innodb_strict_mode=OFF;
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
diff --git a/mysql-test/suite/innodb/r/innodb_blob_truncate.result b/mysql-test/suite/innodb/r/innodb_blob_truncate.result
index 569e6b03452..a71dd7678c0 100644
--- a/mysql-test/suite/innodb/r/innodb_blob_truncate.result
+++ b/mysql-test/suite/innodb/r/innodb_blob_truncate.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table = ON;
create table t1(a blob) engine=innodb key_block_size=8;
create function generate_blob()
@@ -17,3 +19,5 @@ truncate t1;
insert into t1 select generate_blob();
drop table t1;
drop function generate_blob;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result b/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result
deleted file mode 100644
index c467193bca7..00000000000
--- a/mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result
+++ /dev/null
@@ -1,24 +0,0 @@
-call mtr.add_suppression("InnoDB: The total blob data length");
-SET GLOBAL max_allowed_packet = 100*1024*1024;
-connect big_packets,localhost,root,,;
-connection big_packets;
-CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
-INSERT INTO t1 (a, b) VALUES (1, '1');
-INSERT INTO t1 (a, b) VALUES (2, '2');
-INSERT INTO t1 (a, b) VALUES (3, '3');
-INSERT INTO t1 (a, b) VALUES (4, '4');
-INSERT INTO t1 (a, b) VALUES (5, '5');
-start transaction;
-INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
-ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
-connection default;
-# Quick shutdown and restart server
-connection default;
-SELECT a FROM t1;
-a
-1
-2
-3
-4
-5
-DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug12400341.result b/mysql-test/suite/innodb/r/innodb_bug12400341.result
index 31a064e624d..3bb786c4654 100644
--- a/mysql-test/suite/innodb/r/innodb_bug12400341.result
+++ b/mysql-test/suite/innodb/r/innodb_bug12400341.result
@@ -1,4 +1,5 @@
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*");
+call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot find a free slot for an undo log. Do you have too");
set @old_innodb_undo_logs = @@innodb_undo_logs;
set global innodb_undo_logs=1;
show variables like "max_connections";
diff --git a/mysql-test/suite/innodb/r/innodb_bug12902967.result b/mysql-test/suite/innodb/r/innodb_bug12902967.result
index 5958a8dce31..e784c6b306a 100644
--- a/mysql-test/suite/innodb/r/innodb_bug12902967.result
+++ b/mysql-test/suite/innodb/r/innodb_bug12902967.result
@@ -1,6 +1,5 @@
+call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
create table t1 (f1 integer primary key) engine innodb;
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
-InnoDB: has or is referenced in foreign key constraints
-InnoDB: which are not compatible with the new table definition.
drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug14147491.result b/mysql-test/suite/innodb/r/innodb_bug14147491.result
index bd3c388fae1..cf960e3a6ee 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result
@@ -1,31 +1,10 @@
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*");
-CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed");
-CALL mtr.add_suppression("InnoDB: Space .* file test/t1 read of page .*");
-CALL mtr.add_suppression("InnoDB: You may have to recover from a backup.");
-CALL mtr.add_suppression("InnoDB: It is also possible that your operatingsystem has corrupted its own file cache.");
-CALL mtr.add_suppression("InnoDB: and rebooting your computer removes the error.");
-CALL mtr.add_suppression("InnoDB: If the corrupt page is an index page you can also try to");
-CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and reimporting");
-CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
-CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
-CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
-# Create and populate the table to be corrupted
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
INSERT INTO t1 (b) VALUES ('corrupt me');
-# Write file to make mysql-test-run.pl expect the "crash", but don't
-# start it until it's told to
-# We give 30 seconds to do a clean shutdown because we do not want
-# to redo apply the pages of t1.ibd at the time of recovery.
-# We want SQL to initiate the first access to t1.ibd.
-# Wait until disconnected.
# Backup the t1.ibd before corrupting
# Corrupt the table
Munged a string.
Munged a string.
-# Write file to make mysql-test-run.pl start up the server again
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
# Write file to make mysql-test-run.pl expect the "crash", but don't
# start it until it's told to
@@ -34,6 +13,5 @@ SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
SELECT * FROM t1;
ERROR HY000: Lost connection to MySQL server during query
# Restore the original t1.ibd
-# Write file to make mysql-test-run.pl start up the server again
# Cleanup
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug30423.result b/mysql-test/suite/innodb/r/innodb_bug30423.result
index d7b72b1ec2a..c7f823a06ae 100644
--- a/mysql-test/suite/innodb/r/innodb_bug30423.result
+++ b/mysql-test/suite/innodb/r/innodb_bug30423.result
@@ -48,9 +48,9 @@ ON orgs.org_id=sa_opportunities.org_id
LEFT JOIN bug30243_2 contacts
ON orgs.org_id=contacts.org_id ;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orgs index NULL org_id 4 NULL 128 Using index
-1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id 1 Using index
-1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id 1 Using index
+1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index
+1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index
+1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index
select @@innodb_stats_method;
@@innodb_stats_method
nulls_ignored
@@ -74,9 +74,9 @@ ON orgs.org_id=sa_opportunities.org_id
LEFT JOIN bug30243_2 contacts
ON orgs.org_id=contacts.org_id;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE orgs index NULL org_id 4 NULL 128 Using index
-1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id 1 Using index
-1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id 1 Using index
+1 SIMPLE orgs index NULL org_id 4 NULL ROWS Using index
+1 SIMPLE sa_opportunities ref org_id org_id 5 test.orgs.org_id ROWS Using index
+1 SIMPLE contacts ref contacts$org_id contacts$org_id 5 test.orgs.org_id ROWS Using index
SELECT COUNT(*) FROM table_bug30423 WHERE org_id IS NULL;
COUNT(*)
1024
diff --git a/mysql-test/suite/innodb/r/innodb_bug34053.result b/mysql-test/suite/innodb/r/innodb_bug34053.result
index 195775f74c8..23c5b0cc2f7 100644
--- a/mysql-test/suite/innodb/r/innodb_bug34053.result
+++ b/mysql-test/suite/innodb/r/innodb_bug34053.result
@@ -1 +1 @@
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb/r/innodb_bug34300.result b/mysql-test/suite/innodb/r/innodb_bug34300.result
index 09fc0b44579..b168c7782bb 100644
--- a/mysql-test/suite/innodb/r/innodb_bug34300.result
+++ b/mysql-test/suite/innodb/r/innodb_bug34300.result
@@ -1,3 +1,20 @@
-ERROR 42000: The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
+#
+# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
+#
+SET @@global.max_allowed_packet=16777216;
+connect newconn, localhost, root,,;
+CREATE TABLE bug34300 (
+f4 TINYTEXT,
+f6 MEDIUMTEXT,
+f8 TINYBLOB
+) ENGINE=InnoDB;
+INSERT INTO bug34300 VALUES ('xxx', repeat('a', 8459264), 'zzz');
+SELECT f4, f8 FROM bug34300;
f4 f8
+xxx zzz
+ALTER TABLE bug34300 ADD COLUMN (f10 INT);
+SELECT f4, f8 FROM bug34300;
f4 f8
+xxx zzz
+# Cleanup
+DROP TABLE bug34300;
diff --git a/mysql-test/suite/innodb/r/innodb_bug46000.result b/mysql-test/suite/innodb/r/innodb_bug46000.result
index 0e3f0ef59ae..7c5ef13f3dc 100644
--- a/mysql-test/suite/innodb/r/innodb_bug46000.result
+++ b/mysql-test/suite/innodb/r/innodb_bug46000.result
@@ -6,7 +6,7 @@ show warnings;
Level Code Message
Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index.
Error 1280 Incorrect index name 'GEN_CLUST_INDEX'
-Warning 1030 Got error -1 "Internal error < 0 (Not system error)" from storage engine InnoDB
+Warning 1030 Got error 124 "Wrong index given to function" from storage engine InnoDB
create table bug46000(id int) engine=innodb;
create index GEN_CLUST_INDEX on bug46000(id);
ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX'
diff --git a/mysql-test/suite/innodb/r/innodb_bug47167.result b/mysql-test/suite/innodb/r/innodb_bug47167.result
index 656a4846a52..b678046e308 100644
--- a/mysql-test/suite/innodb/r/innodb_bug47167.result
+++ b/mysql-test/suite/innodb/r/innodb_bug47167.result
@@ -1,19 +1,25 @@
set @old_innodb_file_format_max=@@innodb_file_format_max;
select @old_innodb_file_format_max;
@old_innodb_file_format_max
-Antelope
+Barracuda
set global innodb_file_format_max = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max = DEFAULT;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
set global innodb_file_format_max = @old_innodb_file_format_max;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
-Antelope
+Barracuda
set global innodb_file_format_max = cheetah;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
set global innodb_file_format_max = Bear;
@@ -22,3 +28,5 @@ set global innodb_file_format_max = on;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'ON'
set global innodb_file_format_max = off;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'off'
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-test/suite/innodb/r/innodb_bug54044.result
index d80c451c841..1c34ea9de1d 100644
--- a/mysql-test/suite/innodb/r/innodb_bug54044.result
+++ b/mysql-test/suite/innodb/r/innodb_bug54044.result
@@ -19,5 +19,5 @@ CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('foo'),('bar');
FLUSH TABLES;
CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
-ERROR HY000: Can't create table `test`.`tmp` (errno: -1 "Internal error < 0 (Not system error)")
+ERROR HY000: Can't create table `test`.`tmp` (errno: 168 "Unknown (generic) error from engine")
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug60049.result b/mysql-test/suite/innodb/r/innodb_bug60049.result
index 8e3be130e48..f34ebc0a955 100644
--- a/mysql-test/suite/innodb/r/innodb_bug60049.result
+++ b/mysql-test/suite/innodb/r/innodb_bug60049.result
@@ -1,5 +1,3 @@
-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;
diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
index 0ef6f65d0ff..d68879d1c8e 100644
--- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
+++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
@@ -1,48 +1,74 @@
+set names utf8;
+CREATE TABLE corrupt_bit_test_Ä(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(100),
+c INT,
+z INT,
+INDEX idx(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+INSERT INTO corrupt_bit_test_Ä VALUES(0,'x',1, 1);
+CREATE UNIQUE INDEX idxÄ ON corrupt_bit_test_Ä(c, b);
+CREATE UNIQUE INDEX idxÄ“ ON corrupt_bit_test_Ä(z, b);
+SELECT * FROM corrupt_bit_test_Ä;
a b c z
1 x 1 1
+INSERT INTO corrupt_bit_test_Ä SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_Ä;
+select count(*) from corrupt_bit_test_Ä;
count(*)
2
+SET SESSION debug="+d,dict_set_index_corrupted";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+check table corrupt_bit_test_Ä;
Table Op Msg_type Msg_text
-test.corrupt_bit_test_Ä check Warning InnoDB: Index "idx" is marked as corrupted
-test.corrupt_bit_test_Ä check Warning InnoDB: Index "idxÄ" is marked as corrupted
-test.corrupt_bit_test_Ä check Warning InnoDB: Index "idxÄ“" is marked as corrupted
+test.corrupt_bit_test_Ä check Warning InnoDB: Index idx is marked as corrupted
+test.corrupt_bit_test_Ä check Warning InnoDB: Index idxÄ is marked as corrupted
+test.corrupt_bit_test_Ä check Warning InnoDB: Index idxÄ“ is marked as corrupted
test.corrupt_bit_test_Ä check error Corrupt
-ERROR HY000: Index "idx" is corrupted
-ERROR HY000: Index "idx" is corrupted
+SET SESSION debug="-d,dict_set_index_corrupted";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c);
+ERROR HY000: Index idx is corrupted
+CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z);
+ERROR HY000: Index idx is corrupted
+select c from corrupt_bit_test_Ä;
ERROR HY000: Index corrupt_bit_test_Ä is corrupted
+select z from corrupt_bit_test_Ä;
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 InnoDB: Index idxÄ“ for table "test"."corrupt_bit_test_Ä" is marked as corrupted
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;
a b c z
10001 a 20001 20001
+begin;
+insert into corrupt_bit_test_Ä values (10002, "a", 20002, 20002);
+delete from corrupt_bit_test_Ä where a = 10001;
+insert into corrupt_bit_test_Ä values (10001, "a", 20001, 20001);
+rollback;
+drop index idxÄ on corrupt_bit_test_Ä;
+check table corrupt_bit_test_Ä;
Table Op Msg_type Msg_text
-test.corrupt_bit_test_Ä check Warning InnoDB: Index "idx" is marked as corrupted
-test.corrupt_bit_test_Ä check Warning InnoDB: Index "idxÄ“" is marked as corrupted
+test.corrupt_bit_test_Ä check Warning InnoDB: Index idx is marked as corrupted
+test.corrupt_bit_test_Ä check Warning InnoDB: Index idxÄ“ is marked as corrupted
test.corrupt_bit_test_Ä check error Corrupt
+set names utf8;
+select z from corrupt_bit_test_Ä;
ERROR HY000: Index corrupt_bit_test_Ä is corrupted
-Table Create Table
-corrupt_bit_test_Ä CREATE TABLE `corrupt_bit_test_Ä` (
- `a` int(11) NOT NULL AUTO_INCREMENT,
- `b` char(100) DEFAULT NULL,
- `c` int(11) DEFAULT NULL,
- `z` int(11) DEFAULT NULL,
- PRIMARY KEY (`a`),
- UNIQUE KEY `idxē` (`z`,`b`),
- KEY `idx` (`b`)
-) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=latin1
-ERROR HY000: Index "idx" is corrupted
-ERROR HY000: Index "idx" is corrupted
-Table Create Table
-corrupt_bit_test_Ä CREATE TABLE `corrupt_bit_test_Ä` (
- `a` int(11) NOT NULL AUTO_INCREMENT,
- `b` char(100) DEFAULT NULL,
- `c` int(11) DEFAULT NULL,
- `z` int(11) DEFAULT NULL,
- PRIMARY KEY (`a`),
- KEY `idx` (`b`)
-) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=latin1
+drop index idxÄ“ on corrupt_bit_test_Ä;
+CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c);
+ERROR HY000: Index idx is corrupted
+CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z);
+ERROR HY000: Index idx is corrupted
+drop index idx on corrupt_bit_test_Ä;
+CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c);
+CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z);
+select z from corrupt_bit_test_Ä limit 10;
z
20001
1
2
+drop table corrupt_bit_test_Ä;
diff --git a/mysql-test/suite/innodb/r/innodb_file_format.result b/mysql-test/suite/innodb/r/innodb_file_format.result
index 77328a360a9..e489911afb5 100644
--- a/mysql-test/suite/innodb/r/innodb_file_format.result
+++ b/mysql-test/suite/innodb/r/innodb_file_format.result
@@ -1,38 +1,50 @@
select @@innodb_file_format;
@@innodb_file_format
-Antelope
+Barracuda
select @@innodb_file_format_check;
@@innodb_file_format_check
1
select @@innodb_file_format_max;
@@innodb_file_format_max
-Antelope
+Barracuda
set global innodb_file_format=antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=cheetah;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'cheetah'
select @@innodb_file_format;
@@innodb_file_format
Barracuda
set global innodb_file_format=default;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
-Antelope
+Barracuda
set global innodb_file_format=on;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format;
@@innodb_file_format
-Antelope
+Barracuda
set global innodb_file_format_max=antelope;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=barracuda;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=cheetah;
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'cheetah'
select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max=default;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
@@ -44,5 +56,11 @@ select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
set global innodb_file_format_max=antelope;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_check=off;
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_gis.result b/mysql-test/suite/innodb/r/innodb_gis.result
index fc13ba1ab2c..5a978ea303c 100644
--- a/mysql-test/suite/innodb/r/innodb_gis.result
+++ b/mysql-test/suite/innodb/r/innodb_gis.result
@@ -598,4 +598,4 @@ create table t1 (a int not null, b linestring not null, unique key b (b(12)));
create unique index a on t1(a);
drop table t1;
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
-ERROR HY000: The storage engine InnoDB doesn't support SPATIAL indexes
+drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb_information_schema.result b/mysql-test/suite/innodb/r/innodb_information_schema.result
index 1b83bc29493..33dc50df745 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema.result
@@ -7,10 +7,10 @@ X RECORD `test`.```t'\"_str` PRIMARY 4 '3', 'abc', '\\abc', 'abc\\', 'a\\bc', 'a
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_max` PRIMARY 2 127.000000, 140517642401116, 32767.000000, 140517642401147, 8388607.000000, 140517642401180, 2147483647.000000, 140517642401216, 9223372036854775808.000000, 140517642401261
+X RECORD `test`.`t_max` PRIMARY 2 127.000000, 140517642401116, 32767.000000, 140517642401147, 8388607.000000, 140517642401180, 2147483647.000000, 140517642401216, 9223372036854775808.000000, 140517642401261
+X RECORD `test`.`t_min` PRIMARY 2 18446744073709551616.000000, 140517642401133, 18446744073709518848.000000, 140517642401179, 18446744073701163008.000000, 140517642401225, 18446744071562067968.000000, 140517642401271, 9223372036854775808.000000, 140517642401316
+X RECORD `test`.`t_min` PRIMARY 2 18446744073709551616.000000, 140517642401133, 18446744073709518848.000000, 140517642401179, 18446744073701163008.000000, 140517642401225, 18446744071562067968.000000, 140517642401271, 9223372036854775808.000000, 140517642401316
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
X RECORD `test`.```t'\"_str` PRIMARY 1 supremum pseudo-record
lock_table COUNT(*)
@@ -47,7 +47,7 @@ trx_adaptive_hash_timeout bigint(21) unsigned NO 0
trx_is_read_only int(1) NO 0
trx_autocommit_non_locking int(1) NO 0
trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks
-RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1
+RUNNING 4 0 1 7 1 0 REPEATABLE READ 1 1
trx_isolation_level trx_unique_checks trx_foreign_key_checks
SERIALIZABLE 0 0
trx_state trx_isolation_level trx_last_foreign_key_error
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 dcdf3082067..6328458d46e 100644
--- a/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
+++ b/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result
@@ -24,6 +24,7 @@ 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
diff --git a/mysql-test/suite/innodb/r/innodb_monitor.result b/mysql-test/suite/innodb/r/innodb_monitor.result
index 8c580348e1a..bda1462ed33 100644
--- a/mysql-test/suite/innodb/r/innodb_monitor.result
+++ b/mysql-test/suite/innodb/r/innodb_monitor.result
@@ -4,7 +4,6 @@ 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
@@ -47,7 +46,6 @@ 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_rescan disabled
buffer_flush_batch_total_pages disabled
buffer_flush_batches disabled
buffer_flush_batch_pages disabled
@@ -55,6 +53,19 @@ buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
+buffer_flush_n_to_flush_by_age disabled
+buffer_flush_adaptive_avg_time_slot disabled
+buffer_LRU_batch_flush_avg_time_slot disabled
+buffer_flush_adaptive_avg_time_thread disabled
+buffer_LRU_batch_flush_avg_time_thread disabled
+buffer_flush_adaptive_avg_time_est disabled
+buffer_LRU_batch_flush_avg_time_est disabled
+buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_pass disabled
+buffer_LRU_batch_flush_avg_pass disabled
+buffer_flush_avg_pass disabled
+buffer_LRU_get_free_loops disabled
+buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -157,12 +168,13 @@ 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_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled
+log_padded disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
compression_pad_increments disabled
@@ -223,10 +235,13 @@ innodb_dblwr_pages_written disabled
innodb_page_size disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
dml_reads disabled
dml_inserts disabled
dml_deletes disabled
@@ -239,6 +254,8 @@ ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
ddl_online_create_index disabled
ddl_pending_alter_table disabled
+ddl_sort_file_alter_table disabled
+ddl_log_file_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
@@ -280,10 +297,13 @@ lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
@@ -408,7 +428,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
@@ -419,7 +438,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
@@ -429,7 +447,6 @@ 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
metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = module_trx;
begin;
insert into monitor_test values(9);
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 cf5d77a679c..5ae138477b9 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
@@ -1,6 +1,10 @@
set global innodb_file_format="Barracuda";
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE IF EXISTS worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
@@ -88,6 +92,10 @@ worklog5743;
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_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
-SET GLOBAL innodb_large_prefix=0;
+SET GLOBAL innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_simulate_comp_failures_small.result b/mysql-test/suite/innodb/r/innodb_simulate_comp_failures_small.result
index 92ae1637ad5..099c673bca7 100644
--- a/mysql-test/suite/innodb/r/innodb_simulate_comp_failures_small.result
+++ b/mysql-test/suite/innodb/r/innodb_simulate_comp_failures_small.result
@@ -2,7 +2,16 @@
# Testing robustness against random compression failures
#
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `msg` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `msg_i` (`msg`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
SET GLOBAL innodb_simulate_comp_failures = 25;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
+COMMIT;
+SELECT COUNT(id) FROM t1;
+COUNT(id)
1000
diff --git a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
index c351b222496..b9429046b36 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_create_on_corrupted.result
@@ -1,5 +1,5 @@
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table .*innodb_index_stats.* not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table .*");
ALTER TABLE mysql.innodb_index_stats RENAME TO mysql.innodb_index_stats_;
CREATE TABLE test_ps_create_on_corrupted
(a INT, PRIMARY KEY (a))
diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
index f6cce754527..42862fb0e3a 100644
--- a/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
+++ b/mysql-test/suite/innodb/r/innodb_stats_fetch_corrupted.result
@@ -1,5 +1,5 @@
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table \"mysql\".\"innodb_index_stats\" not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table.*");
CREATE TABLE test_ps_fetch_corrupted
(a INT, PRIMARY KEY (a))
ENGINE=INNODB STATS_PERSISTENT=1;
diff --git a/mysql-test/suite/innodb/r/strict_mode.result b/mysql-test/suite/innodb/r/strict_mode.result
index d6a621212c3..2f120afbc09 100644
--- a/mysql-test/suite/innodb/r/strict_mode.result
+++ b/mysql-test/suite/innodb/r/strict_mode.result
@@ -2,6 +2,7 @@
# Bug #17852083 PRINT A WARNING WHEN DDL HAS AN ERROR IN
# INNODB_STRICT_MODE = 1
#
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
set innodb_strict_mode = 0;
create table t1 (id int auto_increment primary key,
v varchar(32),
@@ -235,7 +236,7 @@ col227 text,
col228 text
) ENGINE=InnoDB;
Warnings:
-Warning 139 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.
+Warning 139 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.
set innodb_strict_mode = 1;
alter table t1 engine=InnoDB;
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
diff --git a/mysql-test/suite/innodb/t/auto_increment_dup.opt b/mysql-test/suite/innodb/t/auto_increment_dup.opt
new file mode 100644
index 00000000000..8235b0a811a
--- /dev/null
+++ b/mysql-test/suite/innodb/t/auto_increment_dup.opt
@@ -0,0 +1 @@
+--innodb_autoinc_lock_mode=1
diff --git a/mysql-test/suite/innodb/t/create_isl_with_direct.test b/mysql-test/suite/innodb/t/create_isl_with_direct.test
index 34ea9c77703..83c7507e025 100644
--- a/mysql-test/suite/innodb/t/create_isl_with_direct.test
+++ b/mysql-test/suite/innodb/t/create_isl_with_direct.test
@@ -3,7 +3,7 @@
--source include/not_windows.inc
--disable_query_log
-CALL mtr.add_suppression("\\[Warning\\] InnoDB: Failed to set O_DIRECT on file ./ibdata1: OPEN: Invalid argument, continuing anyway. O_DIRECT is known to result in 'Invalid argument' on Linux on tmpfs, see MySQL Bug#26662.");
+CALL mtr.add_suppression(".*Failed to set O_DIRECT on file.*");
# The below mtr suppression to avoid failure in solaris platform.
CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to set DIRECTIO_ON on file.*");
diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test
index 3cd90a00d55..ad09666442d 100644
--- a/mysql-test/suite/innodb/t/innodb-16k.test
+++ b/mysql-test/suite/innodb/t/innodb-16k.test
@@ -3,16 +3,20 @@
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
+
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
+let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`;
--enable_query_log
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_large_prefix = OFF;
--echo # Test 1) Show the page size from Information Schema
@@ -374,16 +378,6 @@ CREATE INDEX t1t ON t1 (t(767));
--error 1713
UPDATE t1 SET t=@e;
-# The function dict_index_too_big_for_undo() prevents us from adding
-# one more index. But it is too late. The record is already too big.
-
---error ER_TOO_BIG_ROWSIZE
-CREATE INDEX t1u ON t1 (u(767));
-
---error ER_TOO_BIG_ROWSIZE
-CREATE INDEX t1ut ON t1 (u(767), t(767));
-CREATE INDEX t1st ON t1 (s(767), t(767));
-
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -520,11 +514,7 @@ UPDATE bug12547647 SET c = REPEAT('b',16928);
SHOW WARNINGS;
DROP TABLE bug12547647;
-
-
-# The following should fail in non-strict mode too.
-
-SET SESSION innodb_strict_mode = off;
+SET SESSION innodb_strict_mode = on;
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1(
c text NOT NULL, d text NOT NULL,
@@ -974,4 +964,5 @@ row_format=compact,ENGINE=INNODB;
EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
+EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test
index 80678cef0a6..792882b51a5 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test
@@ -23,6 +23,12 @@ EOF
-- enable_reconnect
-- source include/wait_until_connected_again.inc
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
+call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
call mtr.add_suppression("InnoDB: Table 'test/t'$");
diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test
index 8aa113fc3ca..c1f9ee5992f 100644
--- a/mysql-test/suite/innodb/t/innodb-blob.test
+++ b/mysql-test/suite/innodb/t/innodb-blob.test
@@ -3,6 +3,7 @@
# columns are stored off-page.
--source include/have_innodb.inc
+# The 7000 in this test is a bit less than half the innodb_page_size.
--source include/have_innodb_16k.inc
# DEBUG_SYNC must be compiled in.
@@ -15,6 +16,8 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
+call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!");
+
CREATE TABLE t1 (a INT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t3 (a INT PRIMARY KEY, b TEXT, c TEXT) ENGINE=InnoDB;
@@ -41,7 +44,7 @@ connect (con2,localhost,root,,);
# Check that the above SELECT is blocked
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where state = 'Sending data' and
+ where state in ('Sending data', 'Opening tables') and
info = 'SELECT a, RIGHT(b,20) FROM t1';
--source include/wait_condition.inc
@@ -51,7 +54,7 @@ connection con1;
reap;
connection default;
reap;
-SET DEBUG_DBUG='+d,row_ins_extern_checkpoint';
+SET DEBUG='+d,row_ins_extern_checkpoint';
SET DEBUG_SYNC='before_row_ins_extern_latch SIGNAL rec_not_blob WAIT_FOR crash';
ROLLBACK;
BEGIN;
@@ -68,7 +71,8 @@ SELECT a, RIGHT(b,20) FROM t1;
SELECT a FROM t1;
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
INSERT INTO t2 VALUES (42);
@@ -80,7 +84,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
@@ -90,41 +93,34 @@ CHECK TABLE t1;
INSERT INTO t3 VALUES
(1,REPEAT('d',7000),REPEAT('e',100)),
(2,REPEAT('g',7000),REPEAT('h',100));
-SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR go';
+SET DEBUG_SYNC='blob_write_middle SIGNAL go_sel WAIT_FOR go_upd';
# This should move column b off-page.
--send
UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+--echo # Connection con1:
connect (con1,localhost,root,,);
-SET DEBUG_SYNC='now WAIT_FOR have_latch';
+SET DEBUG_SYNC='now WAIT_FOR go_sel';
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@tx_isolation;
-
-# this one should block
--- send
SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
+set debug_sync='now SIGNAL go_upd';
-connect (con2,localhost,root,,);
-
-# Check that the above SELECT is blocked
-let $wait_condition=
- select count(*) = 1 from information_schema.processlist
- where state = 'Sending data' and
- info = 'SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3';
---source include/wait_condition.inc
-
-SET DEBUG_SYNC='now SIGNAL go';
+--echo # Connection default:
+connection default;
+--echo # reap UPDATE t3 SET c=REPEAT('f',3000) WHERE a=1;
+reap;
+--echo # Connection con1:
connection con1;
-reap;
+SELECT a, RIGHT(b,20), RIGHT(c,20) FROM t3;
+
disconnect con1;
connection default;
-reap;
-
CHECK TABLE t1,t2,t3;
-connection con2;
+connect (con2,localhost,root,,);
BEGIN;
INSERT INTO t2 VALUES (347);
connection default;
@@ -134,7 +130,7 @@ connection default;
# remain open while we are writing the off-page columns and are
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
# would wait for the buffer-fix to cease.
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
SET DEBUG_SYNC='before_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
# This should move column b off-page.
--send
@@ -148,7 +144,8 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: before_row_upd_extern';
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
COMMIT;
@@ -159,7 +156,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
@@ -178,7 +174,7 @@ connection default;
# remain open while we are writing the off-page columns and are
# stuck in the DEBUG_SYNC. A checkpoint involves a flush, which
# would wait for the buffer-fix to cease.
-SET DEBUG_DBUG='+d,row_upd_extern_checkpoint';
+SET DEBUG='+d,row_upd_extern_checkpoint';
SET DEBUG_SYNC='after_row_upd_extern SIGNAL have_latch WAIT_FOR crash';
# This should move column b off-page.
--send
@@ -192,7 +188,8 @@ SELECT info FROM information_schema.processlist
WHERE state = 'debug sync point: after_row_upd_extern';
# Request a crash, and restart the server.
-SET DEBUG_DBUG='+d,crash_commit_before';
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
COMMIT;
@@ -203,7 +200,6 @@ connection default;
--error 2013
reap;
-# Write file to make mysql-test-run.pl restart the server
--enable_reconnect
--source include/wait_until_connected_again.inc
--disable_reconnect
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
index 33e2b863684..97b259ee047 100644
--- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt
@@ -1 +1,2 @@
--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err
+--innodb_buffer_pool_size=24M
diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
index 79f7999d115..cbf2d0c9805 100644
--- a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
+++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test
@@ -1,8 +1,3 @@
-if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB before 5.6.17
-}
-
--echo #
--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE
--echo # OPERATION IF IT IS DONE IN-PLACE
@@ -14,8 +9,13 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
--source include/not_embedded.inc
# DBUG_SUICIDE() hangs under valgrind
--source include/not_valgrind.inc
-# No windows, need perl
---source include/not_windows.inc
+
+CREATE TABLE t1(
+ a INT AUTO_INCREMENT PRIMARY KEY,
+ b CHAR(1),
+ c INT,
+ INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
# 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
@@ -24,13 +24,6 @@ if (`select plugin_auth_version < "5.6.17" from information_schema.plugins where
SET GLOBAL innodb_change_buffering_debug = 1;
let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err;
-CREATE TABLE t1(
- a INT AUTO_INCREMENT PRIMARY KEY,
- b CHAR(1),
- c INT,
- INDEX(b))
-ENGINE=InnoDB;
-
# Create enough rows for the table, so that the change buffer will be
# used for modifying the secondary index page. There must be multiple
# index pages, because changes to the root page are never buffered.
@@ -48,7 +41,6 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1;
-INSERT INTO t1 SELECT 0,b,c FROM t1;
BEGIN;
SELECT b FROM t1 LIMIT 3;
@@ -60,7 +52,7 @@ DELETE FROM t1 WHERE a=1;
# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
INSERT INTO t1 VALUES(1,'X',1);
-SET DEBUG_DBUG='+d,crash_after_log_ibuf_upd_inplace';
+SET DEBUG='+d,crash_after_log_ibuf_upd_inplace';
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
# This should force a change buffer merge
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7408.test b/mysql-test/suite/innodb/t/innodb-mdev-7408.test
index d1cd1879bb1..46f1afca27b 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7408.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7408.test
@@ -1,5 +1,7 @@
--source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: User stopword table .* does not exist.");
+
select @@global.innodb_ft_server_stopword_table;
CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
--error 1231
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt b/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt
new file mode 100644
index 00000000000..a2a7d5f6adf
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513-master.opt
@@ -0,0 +1 @@
+--innodb-strict-mode=0
diff --git a/mysql-test/suite/innodb/t/innodb-mdev-7513.test b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
index b929ea14781..88f941ef70d 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7513.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
@@ -3,6 +3,7 @@
# MDEV-7513: ib_warn_row_too_big dereferences null thd
+call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
call mtr.add_suppression("Row size too large (> 8126)*");
--disable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test
index b4085228e02..208dcd52f35 100644
--- a/mysql-test/suite/innodb/t/innodb-mdev7046.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test
@@ -12,6 +12,7 @@
call mtr.add_suppression("InnoDB: File ./test/t1*");
call mtr.add_suppression("InnoDB: Error number*");
call mtr.add_suppression("InnoDB: File ./test/t1#p#p1#sp#p1sp0.ibd: 'rename' returned OS error*");
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
# MDEV-7046: MySQL#74480 - Failing assertion: os_file_status(newpath, &exists, &type)
# after Operating system error number 36 in a file operation
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns.test b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
index 368c6fc8cb1..0e0d6dbb2f5 100644
--- a/mysql-test/suite/innodb/t/innodb-virtual-columns.test
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns.test
@@ -33,6 +33,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
@@ -137,6 +139,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
CREATE INDEX grad_degree_as_of_term_ndx ON grad_degree (deg_as_of_term);
@@ -251,6 +255,8 @@ CREATE TABLE IF NOT EXISTS grad_degree (
CONSTRAINT grad_degree_stu_plan_admit_pky PRIMARY KEY (student_id, plan, admit_term)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SHOW CREATE TABLE grad_degree;
+
CREATE INDEX grad_degree_wdraw_rsn_ndx ON grad_degree (wdraw_rsn);
ALTER TABLE grad_degree DROP COLUMN ofis_deg_status2, DROP COLUMN ofis_deg_status3,
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
index b1db34976a9..6c2607effe8 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
@@ -3,6 +3,8 @@
-- source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
index 4b03ac008d2..c61d10e8593 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
@@ -17,6 +17,9 @@
# allow test to run only when innodb-page-size=16
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
+call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
index d139e0b700d..395e4def85d 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
@@ -7,6 +7,8 @@
# allow test to run only when innodb-page-size=16
--source include/have_innodb_16k.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test
index c9e7748cb47..b04c726b74a 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522.test
@@ -3,6 +3,8 @@
-- source include/have_innodb.inc
+call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
+
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 2e7306c8e29..79a00c27686 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -31,8 +31,15 @@ set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
# the test to be run multiple times without restarting the mysqld server.
# See Bug#43309 Test main.innodb can't be run twice
-- disable_query_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`");
+
+SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay;
+
SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
+--disable_warnings
SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
@@ -41,6 +48,7 @@ SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM informatio
SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
+--enable_warnings
-- enable_query_log
--disable_warnings
@@ -677,6 +685,8 @@ drop table t1;
# Test of multi-table-delete
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -720,6 +730,7 @@ select * from t1;
select * from t2;
select * from t2;
drop table t1,t2;
+SET sql_mode = default;
#
# A simple test with some isolation levels
@@ -1056,18 +1067,84 @@ UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
DROP TABLE t2,t1;
#
-# test for recursion depth limit
+# test for FK cascade depth limit
#
+call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
+
create table t1(
id int primary key,
pid int,
index(pid),
foreign key(pid) references t1(id) on delete cascade) engine=innodb;
-insert into t1 values(0,0),(1,0),(2,1),(3,2),(4,3),(5,4),(6,5),(7,6),
- (8,7),(9,8),(10,9),(11,10),(12,11),(13,12),(14,13),(15,14);
--- error 1451
+insert into t1 values
+( 0, 0), ( 1, 0), ( 2, 1), ( 3, 2),
+( 4, 3), ( 5, 4), ( 6, 5), ( 7, 6),
+( 8, 7), ( 9, 8), ( 10, 9), ( 11, 10),
+( 12, 11), ( 13, 12), ( 14, 13), ( 15, 14),
+( 16, 15), ( 17, 16), ( 18, 17), ( 19, 18),
+( 20, 19), ( 21, 20), ( 22, 21), ( 23, 22),
+( 24, 23), ( 25, 24), ( 26, 25), ( 27, 26),
+( 28, 27), ( 29, 28), ( 30, 29), ( 31, 30),
+( 32, 31), ( 33, 32), ( 34, 33), ( 35, 34),
+( 36, 35), ( 37, 36), ( 38, 37), ( 39, 38),
+( 40, 39), ( 41, 40), ( 42, 41), ( 43, 42),
+( 44, 43), ( 45, 44), ( 46, 45), ( 47, 46),
+( 48, 47), ( 49, 48), ( 50, 49), ( 51, 50),
+( 52, 51), ( 53, 52), ( 54, 53), ( 55, 54),
+( 56, 55), ( 57, 56), ( 58, 57), ( 59, 58),
+( 60, 59), ( 61, 60), ( 62, 61), ( 63, 62),
+( 64, 63), ( 65, 64), ( 66, 65), ( 67, 66),
+( 68, 67), ( 69, 68), ( 70, 69), ( 71, 70),
+( 72, 71), ( 73, 72), ( 74, 73), ( 75, 74),
+( 76, 75), ( 77, 76), ( 78, 77), ( 79, 78),
+( 80, 79), ( 81, 80), ( 82, 81), ( 83, 82),
+( 84, 83), ( 85, 84), ( 86, 85), ( 87, 86),
+( 88, 87), ( 89, 88), ( 90, 89), ( 91, 90),
+( 92, 91), ( 93, 92), ( 94, 93), ( 95, 94),
+( 96, 95), ( 97, 96), ( 98, 97), ( 99, 98),
+(100, 99), (101, 100), (102, 101), (103, 102),
+(104, 103), (105, 104), (106, 105), (107, 106),
+(108, 107), (109, 108), (110, 109), (111, 110),
+(112, 111), (113, 112), (114, 113), (115, 114),
+(116, 115), (117, 116), (118, 117), (119, 118),
+(120, 119), (121, 120), (122, 121), (123, 122),
+(124, 123), (125, 124), (126, 125), (127, 126),
+(128, 127), (129, 128), (130, 129), (131, 130),
+(132, 131), (133, 132), (134, 133), (135, 134),
+(136, 135), (137, 136), (138, 137), (139, 138),
+(140, 139), (141, 140), (142, 141), (143, 142),
+(144, 143), (145, 144), (146, 145), (147, 146),
+(148, 147), (149, 148), (150, 149), (151, 150),
+(152, 151), (153, 152), (154, 153), (155, 154),
+(156, 155), (157, 156), (158, 157), (159, 158),
+(160, 159), (161, 160), (162, 161), (163, 162),
+(164, 163), (165, 164), (166, 165), (167, 166),
+(168, 167), (169, 168), (170, 169), (171, 170),
+(172, 171), (173, 172), (174, 173), (175, 174),
+(176, 175), (177, 176), (178, 177), (179, 178),
+(180, 179), (181, 180), (182, 181), (183, 182),
+(184, 183), (185, 184), (186, 185), (187, 186),
+(188, 187), (189, 188), (190, 189), (191, 190),
+(192, 191), (193, 192), (194, 193), (195, 194),
+(196, 195), (197, 196), (198, 197), (199, 198),
+(200, 199), (201, 200), (202, 201), (203, 202),
+(204, 203), (205, 204), (206, 205), (207, 206),
+(208, 207), (209, 208), (210, 209), (211, 210),
+(212, 211), (213, 212), (214, 213), (215, 214),
+(216, 215), (217, 216), (218, 217), (219, 218),
+(220, 219), (221, 220), (222, 221), (223, 222),
+(224, 223), (225, 224), (226, 225), (227, 226),
+(228, 227), (229, 228), (230, 229), (231, 230),
+(232, 231), (233, 232), (234, 233), (235, 234),
+(236, 235), (237, 236), (238, 237), (239, 238),
+(240, 239), (241, 240), (242, 241), (243, 242),
+(244, 243), (245, 244), (246, 245), (247, 246),
+(248, 247), (249, 248), (250, 249), (251, 250),
+(252, 251), (253, 252), (254, 253), (255, 254);
+--error 1296,1451
delete from t1 where id=0;
-delete from t1 where id=15;
+delete from t1 where id=255;
+--error 0,1451
delete from t1 where id=0;
drop table t1;
@@ -1279,6 +1356,9 @@ drop table t1;
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
+-- disable_result_log
+analyze table t1;
+-- enable_result_log
select * from t1 order by a,b,c,d;
explain select * from t1 order by a,b,c,d;
drop table t1;
@@ -1342,10 +1422,12 @@ source include/varchar.inc;
#
# Some errors/warnings on create
#
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# Embedded server doesn't chdir to data directory
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
+SET GLOBAL innodb_large_prefix=OFF;
create table t1 (v varchar(65530), key(v));
+SET GLOBAL innodb_large_prefix=default;
drop table t1;
create table t1 (v varchar(65536));
show create table t1;
@@ -1353,8 +1435,8 @@ drop table t1;
create table t1 (v varchar(65530) character set utf8);
show create table t1;
drop table t1;
-
-eval set storage_engine=$default;
+SET sql_mode = default;
+eval set default_storage_engine=$default;
# InnoDB specific varchar tests
create table t1 (v varchar(16384)) engine=innodb;
@@ -1459,7 +1541,7 @@ CREATE TABLE t1
id INT PRIMARY KEY
) ENGINE=InnoDB;
---error 1005,1005
+--error ER_CANNOT_ADD_FOREIGN,1005
CREATE TEMPORARY TABLE t2
(
id INT NOT NULL PRIMARY KEY,
@@ -1500,6 +1582,8 @@ show create table t9;
drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+SET GLOBAL innodb_large_prefix=OFF;
# these should have their index length trimmed
create table t1 (col1 varchar(768), index(col1))
character set = latin1 engine = innodb;
@@ -1509,25 +1593,28 @@ create table t3 (col1 text, index(col1(768)))
character set = latin1 engine = innodb;
create table t4 (col1 blob, index(col1(768)))
character set = latin1 engine = innodb;
+SET GLOBAL innodb_large_prefix=default;
show create table t1;
drop table t1, t2, t3, t4;
# these should be refused
---error 1071
+set global innodb_large_prefix=OFF;
+--error ER_TOO_LONG_KEY
create table t1 (col1 varchar(768) primary key)
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t2 (col1 varbinary(768) primary key)
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t3 (col1 text, primary key(col1(768)))
character set = latin1 engine = innodb;
---error 1071
+--error ER_TOO_LONG_KEY
create table t4 (col1 blob, primary key(col1(768)))
character set = latin1 engine = innodb;
-
+SET sql_mode = default;
+set global innodb_large_prefix=default;
#
# Test improved foreign key error messages (bug #3443)
#
@@ -1552,7 +1639,7 @@ INSERT INTO t2 VALUES(1);
--error 1451
DELETE FROM t1 WHERE id = 1;
---error 1451
+--error 1451, 1217
DROP TABLE t1;
SET FOREIGN_KEY_CHECKS=0;
@@ -1719,7 +1806,7 @@ create table t1 (a varchar(255) character set utf8,
# test the padding of BINARY types and collations (Bug #14189)
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
@@ -1803,7 +1890,7 @@ ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
SHOW CREATE TABLE t2;
DROP TABLE t2,t1;
-
+SET sql_mode = default;
#
# Test case for bug #16229: MySQL/InnoDB uses full explicit table locks in trigger processing
#
@@ -2344,8 +2431,9 @@ DROP TABLE t1,t2;
#
# Bug #21101 (Prints wrong error message if max row size is too large)
#
-set innodb_strict_mode=on;
---error 1118
+SET innodb_strict_mode=ON;
+--replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
+--error ER_TOO_BIG_ROWSIZE
CREATE TABLE t1 (
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
@@ -2356,6 +2444,7 @@ CREATE TABLE t1 (
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
+SET innodb_strict_mode=OFF;
#
# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
@@ -2512,6 +2601,7 @@ DROP TABLE bug35537;
DISCONNECT c1;
CONNECTION default;
+SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig;
SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
-- enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test b/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test
deleted file mode 100644
index 8553d97bd9e..00000000000
--- a/mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test
+++ /dev/null
@@ -1,52 +0,0 @@
---source include/not_embedded.inc
---source include/not_crashrep.inc
---source include/have_innodb.inc
-
-call mtr.add_suppression("InnoDB: The total blob data length");
-
-let $old_max_allowed_packet = `select @@max_allowed_packet`;
-SET GLOBAL max_allowed_packet = 100*1024*1024;
-
-connect(big_packets,localhost,root,,);
-connection big_packets;
-
-CREATE TABLE t1 (a BIGINT PRIMARY KEY, b LONGBLOB) ENGINE=InnoDB;
-
-# Insert a few rows (it doesn't really matter how many). These transactions
-# are committed once they are acked, so they should not be lost.
-INSERT INTO t1 (a, b) VALUES (1, '1');
-INSERT INTO t1 (a, b) VALUES (2, '2');
-INSERT INTO t1 (a, b) VALUES (3, '3');
-INSERT INTO t1 (a, b) VALUES (4, '4');
-INSERT INTO t1 (a, b) VALUES (5, '5');
-
-# The BLOB insert will fail, and should disappear. However all data committed
-# up to this point should not be lost.
-start transaction;
---replace_regex /\(> [0-9]*\)/(> ####)/
---error ER_TOO_BIG_ROWSIZE
-INSERT INTO t1 (a, b) VALUES (6, REPEAT('a', 20*1024*1024));
-
-connection default;
-
-# We expect a restart.
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
---echo # Quick shutdown and restart server
---shutdown_server 0
-
-# Wait for the server to come back up, and reconnect.
---enable_reconnect
---source include/wait_until_connected_again.inc
-
-connection default;
-
-# We should see (1,2,3,4,5) here.
-SELECT a FROM t1;
-
-# Clean up.
-DROP TABLE t1;
-
---disable_query_log
-eval set global max_allowed_packet = $old_max_allowed_packet;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test
index 235ece04a8c..9a96f29fc3b 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12400341.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test
@@ -14,10 +14,8 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n
# undo slots of the previous test might exist still
--source include/not_windows.inc
-# Previous undo slots cause unnecessary failures
---source include/not_windows.inc
-
call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too*");
+call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot find a free slot for an undo log. Do you have too");
--disable_query_log
set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug;
diff --git a/mysql-test/suite/innodb/t/innodb_bug12902967.test b/mysql-test/suite/innodb/t/innodb_bug12902967.test
index 8e1b8199524..1b5df7fa165 100644
--- a/mysql-test/suite/innodb/t/innodb_bug12902967.test
+++ b/mysql-test/suite/innodb/t/innodb_bug12902967.test
@@ -9,6 +9,8 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
+call mtr.add_suppression("In ALTER TABLE .* has or is referenced in foreign key constraints which are not compatible with the new table definition.");
+
let error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err;
--source include/restart_mysqld.inc
@@ -20,11 +22,4 @@ create table t1 (f1 integer primary key) engine innodb;
--replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
--error ER_ERROR_ON_RENAME
alter table t1 add constraint c1 foreign key (f1) references t1(f1);
---source include/restart_mysqld.inc
-perl;
-$file = $ENV{error_log};
-open (FILE, '<', $file) or die "can't open(< $file): $!\n";
-print ((grep { /^InnoDB:/ and not /aio/i and not /io_setup\(\) attempt [0-9]+ failed/ } <FILE>)[-2..-1]);
-EOF
-
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
index 6b82baca147..410738202bd 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
@@ -1 +1,4 @@
---innodb_file_per_table=1 --skip-stack-trace --skip-core-file
+--innodb_file_per_table=1
+--skip-stack-trace
+--skip-core-file
+--loose-innodb_buffer_pool_load_at_startup=OFF
diff --git a/mysql-test/suite/innodb/t/innodb_bug14147491.test b/mysql-test/suite/innodb/t/innodb_bug14147491.test
index 16e88826c85..c73571af6dd 100644
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test
@@ -1,41 +1,29 @@
#
# Test opening a corrupted table.
#
-
--- source include/not_encrypted.inc
-
-call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*");
-
-# Don't test under valgrind, memory leaks will occur
+# Valgrind can hang or return spurious messages on DBUG_SUICIDE
source include/not_valgrind.inc;
# Avoid CrashReporter popup on Mac
source include/not_crashrep.inc;
-# Don't test under embedded
+# Restarting is not supported under embedded
source include/not_embedded.inc;
# Require InnoDB
source include/have_innodb.inc;
# Require Debug for SET DEBUG
source include/have_debug.inc;
+# Not encrypted tables
+source include/not_encrypted.inc;
# Test could open crash reporter on Windows
# if compiler set up
source include/not_windows.inc;
-CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed");
-CALL mtr.add_suppression("InnoDB: Space .* file test/t1 read of page .*");
-CALL mtr.add_suppression("InnoDB: You may have to recover from a backup.");
-CALL mtr.add_suppression("InnoDB: It is also possible that your operatingsystem has corrupted its own file cache.");
-CALL mtr.add_suppression("InnoDB: and rebooting your computer removes the error.");
-CALL mtr.add_suppression("InnoDB: If the corrupt page is an index page you can also try to");
-CALL mtr.add_suppression("InnoDB: fix the corruption by dumping, dropping, and reimporting");
-CALL mtr.add_suppression("InnoDB: the corrupt table. You can use CHECK");
-CALL mtr.add_suppression("InnoDB: TABLE to scan your table for corruption.");
-CALL mtr.add_suppression("InnoDB: See also .* about forcing recovery.");
-
-
---echo # Create and populate the table to be corrupted
-CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
+--disable_query_log
+CALL mtr.add_suppression("\\[ERROR\\] \\[FATAL\\] InnoDB: Unable to read page \\[page id: space=.*, page number=.*\\] into the buffer pool after 100 attempts");
+CALL mtr.add_suppression("\\[ERROR\\] InnoDB: Database page corruption on disk or a failed");
+--enable_query_log
+
+
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
INSERT INTO t1 (b) VALUES ('corrupt me');
--disable_query_log
--let $i = 10
@@ -50,17 +38,7 @@ INSERT INTO t1 (b) VALUES ('corrupt me');
let $MYSQLD_DATADIR=`select @@datadir`;
let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
---echo # Write file to make mysql-test-run.pl expect the "crash", but don't
---echo # start it until it's told to
---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
-
---echo # We give 30 seconds to do a clean shutdown because we do not want
---echo # to redo apply the pages of t1.ibd at the time of recovery.
---echo # We want SQL to initiate the first access to t1.ibd.
-shutdown_server 30;
-
---echo # Wait until disconnected.
---source include/wait_until_disconnected.inc
+--source include/shutdown_mysqld.inc
--echo # Backup the t1.ibd before corrupting
--copy_file $t1_IBD $MYSQLD_DATADIR/test/t1.ibd.backup
@@ -92,10 +70,7 @@ while ($len = sysread IBD_FILE, $chunk, 1024)
close IBD_FILE;
EOF
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
SET DEBUG_DBUG = '+d,innodb_page_corruption_retries';
@@ -117,10 +92,7 @@ SLEEP 1;
--remove_file $MYSQLD_DATADIR/test/t1.ibd
--move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
---echo # Write file to make mysql-test-run.pl start up the server again
---exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
---enable_reconnect
---source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
# because the session information is lost after server restart
diff --git a/mysql-test/suite/innodb/t/innodb_bug30423.test b/mysql-test/suite/innodb/t/innodb_bug30423.test
index bbb6f1155ff..de53a935156 100644
--- a/mysql-test/suite/innodb/t/innodb_bug30423.test
+++ b/mysql-test/suite/innodb/t/innodb_bug30423.test
@@ -139,6 +139,7 @@ analyze table bug30243_3;
# Following query plan shows that we get the correct rows per
# unique value (should be approximately 1 row per value)
+-- replace_column 9 ROWS
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
LEFT JOIN bug30243_3 sa_opportunities
@@ -159,6 +160,7 @@ analyze table bug30243_3;
# Following query plan shows that we get the correct rows per
# unique value (~1)
+-- replace_column 9 ROWS
explain SELECT COUNT(*), 0
FROM bug30243_1 orgs
LEFT JOIN bug30243_3 sa_opportunities
diff --git a/mysql-test/suite/innodb/t/innodb_bug34053.test b/mysql-test/suite/innodb/t/innodb_bug34053.test
index 56c26acb632..d93d5100d81 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34053.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34053.test
@@ -5,7 +5,7 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-SET storage_engine=InnoDB;
+SET default_storage_engine=InnoDB;
# we do not really care about what gets printed, we are only
# interested in getting success or failure according to our
@@ -20,8 +20,12 @@ FLUSH PRIVILEGES;
-- connection con1
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output=ON;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output_locks=ON;
+
CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
-# this should only fail with UNIV_MEM_DEBUG
+DROP TABLE innodb_monitor;
CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
DROP TABLE innodb_mem_validate;
CREATE TABLE innodb_sql (a INT) ENGINE=INNODB;
@@ -36,16 +40,18 @@ CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB;
DROP TABLE nnodb_monitor;
-- connection default
-CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB;
-CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB;
+SET GLOBAL innodb_status_output=ON;
+SET GLOBAL innodb_status_output_locks=ON;
-- connection con1
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
-DROP TABLE innodb_monitor;
-DROP TABLE innodb_mem_validate;
+SET GLOBAL innodb_status_output=OFF;
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SET GLOBAL innodb_status_output_locks=OFF;
-- connection default
-DROP TABLE innodb_monitor;
+SET GLOBAL innodb_status_output=OFF;
+SET GLOBAL innodb_status_output_locks=OFF;
DROP USER 'shane'@'localhost';
-- disconnect con1
diff --git a/mysql-test/suite/innodb/t/innodb_bug34300.test b/mysql-test/suite/innodb/t/innodb_bug34300.test
index 13c708b48d6..8c73af13bc1 100644
--- a/mysql-test/suite/innodb/t/innodb_bug34300.test
+++ b/mysql-test/suite/innodb/t/innodb_bug34300.test
@@ -1,35 +1,26 @@
-#
-# Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
-# http://bugs.mysql.com/34300
-#
+--echo #
+--echo # Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1
+--echo #
-- source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.22-MariaDB-72.0" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in XtraDB as of 5.6.22-MariaDB-72.0 or earlier
-}
-
-- disable_query_log
--- disable_result_log
-
-call mtr.add_suppression("InnoDB: The total blob data length");
+call mtr.add_suppression("InnoDB: Warning: a long semaphore wait:");
+call mtr.add_suppression("The age of the last checkpoint is");
# set packet size and reconnect
let $max_packet=`select @@global.max_allowed_packet`;
+-- enable_query_log
+
SET @@global.max_allowed_packet=16777216;
--connect (newconn, localhost, root,,)
---enable_result_log
-
CREATE TABLE bug34300 (
f4 TINYTEXT,
f6 MEDIUMTEXT,
f8 TINYBLOB
) ENGINE=InnoDB;
---replace_regex /\(> [0-9]*\)/(> ####)/
---error ER_TOO_BIG_ROWSIZE
INSERT INTO bug34300 VALUES ('xxx', repeat('a', 8459264), 'zzz');
SELECT f4, f8 FROM bug34300;
@@ -38,5 +29,10 @@ ALTER TABLE bug34300 ADD COLUMN (f10 INT);
SELECT f4, f8 FROM bug34300;
+--echo # Cleanup
DROP TABLE bug34300;
+
+-- disable_query_log
EVAL SET @@global.max_allowed_packet=$max_packet;
+-- enable_query_log
+
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049-master.opt b/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
index 741d8685459..22a5d4ed221 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_bug60049-master.opt
@@ -1 +1 @@
---loose-innodb-fast-shutdown=0
+--innodb_fast_shutdown=0
diff --git a/mysql-test/suite/innodb/t/innodb_bug60049.test b/mysql-test/suite/innodb/t/innodb_bug60049.test
index b1d56d16a5e..cb05ca297ea 100644
--- a/mysql-test/suite/innodb/t/innodb_bug60049.test
+++ b/mysql-test/suite/innodb/t/innodb_bug60049.test
@@ -5,12 +5,11 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
-- source include/have_innodb_16k.inc
--- source include/not_encrypted.inc
-
-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
+call mtr.add_suppression('\\[ERROR\\] InnoDB: Table `mysql`.`innodb_(table|index)_stats` not found');
+call mtr.add_suppression('\\[ERROR\\] InnoDB: Fetch of persistent statistics requested for table `mysql`.`gtid_executed`');
+
let $create1 = query_get_value(SHOW CREATE TABLE mysql.innodb_table_stats, Create Table, 1);
let $create2 = query_get_value(SHOW CREATE TABLE mysql.innodb_index_stats, Create Table, 1);
DROP TABLE mysql.innodb_index_stats;
@@ -23,10 +22,7 @@ DROP TABLE u;
SELECT @@innodb_fast_shutdown;
let $MYSQLD_DATADIR=`select @@datadir`;
-# Shut down the server
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server 30
--- source include/wait_until_disconnected.inc
+--source include/shutdown_mysqld.inc
# Check the tail of ID_IND (SYS_TABLES.ID)
let IBDATA1=$MYSQLD_DATADIR/ibdata1;
@@ -45,10 +41,7 @@ close(FILE);
print unpack("H*", $_), "\n";
EOF
-# Restart the server.
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
+--source include/start_mysqld.inc
-- disable_query_log
USE mysql;
diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
index ee04e8d66fc..52a318f0fa8 100644
--- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
+++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
@@ -2,32 +2,28 @@
# Test for persistent corrupt bit for corrupted index and table
#
-- source include/have_innodb.inc
-#-- source include/have_innodb_16k.inc
--- source include/not_embedded.inc
+--source include/not_embedded.inc
# This test needs debug server
-- source include/have_debug.inc
--- disable_query_log
-call mtr.add_suppression("Flagged corruption of idx.*in");
+--disable_query_log
+call mtr.add_suppression("Flagged corruption of.* in table .* in .*");
+--enable_query_log
set names utf8;
-SET UNIQUE_CHECKS=0;
-
CREATE TABLE corrupt_bit_test_Ä(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(100),
c INT,
z INT,
INDEX idx(b))
-ENGINE=InnoDB;
+ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO corrupt_bit_test_Ä VALUES(0,'x',1, 1);
-# This is the first unique index we intend to corrupt
CREATE UNIQUE INDEX idxÄ ON corrupt_bit_test_Ä(c, b);
-# This is the second unique index we intend to corrupt
CREATE UNIQUE INDEX idxÄ“ ON corrupt_bit_test_Ä(z, b);
SELECT * FROM corrupt_bit_test_Ä;
@@ -37,9 +33,9 @@ INSERT INTO corrupt_bit_test_Ä SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_Ä;
select count(*) from corrupt_bit_test_Ä;
# This will flag all secondary indexes corrupted
-SET SESSION debug_dbug="+d,dict_set_index_corrupted";
+SET SESSION debug="+d,dict_set_index_corrupted";
check table corrupt_bit_test_Ä;
-SET SESSION debug_dbug="";
+SET SESSION debug="-d,dict_set_index_corrupted";
# Cannot create new indexes while corrupted indexes exist
--error ER_INDEX_CORRUPT
@@ -79,8 +75,6 @@ set names utf8;
-- error ER_INDEX_CORRUPT
select z from corrupt_bit_test_Ä;
-show create table corrupt_bit_test_Ä;
-
# Drop the corrupted index
drop index idxÄ“ on corrupt_bit_test_Ä;
@@ -90,13 +84,13 @@ CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c);
--error ER_INDEX_CORRUPT
CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z);
-show create table corrupt_bit_test_Ä;
drop index idx on corrupt_bit_test_Ä;
# Now that there exist no corrupted indexes, we can create new indexes.
CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c);
CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z);
+
# Now select back to normal
select z from corrupt_bit_test_Ä limit 10;
diff --git a/mysql-test/suite/innodb/t/innodb_gis.test b/mysql-test/suite/innodb/t/innodb_gis.test
index 1adb14ea482..45d66d95002 100644
--- a/mysql-test/suite/innodb/t/innodb_gis.test
+++ b/mysql-test/suite/innodb/t/innodb_gis.test
@@ -6,5 +6,8 @@ SET storage_engine=innodb;
#
# Bug #15680 (SPATIAL key in innodb)
#
---error ER_TABLE_CANT_HANDLE_SPKEYS
+# MySQL 5.7 Introduces SPATIAL keys for InnoDB
+#--error ER_TABLE_CANT_HANDLE_SPKEYS
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
+drop table t1;
+
diff --git a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
index c932e45591d..5d36cfdcbb9 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_create_on_corrupted.test
@@ -10,8 +10,8 @@
-- source include/have_innodb_16k.inc
-- source include/not_embedded.inc
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table .*innodb_index_stats.* not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table .*");
-- vertical_results
diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test b/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
index 4a3f7527c09..81fd52c72f8 100644
--- a/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
+++ b/mysql-test/suite/innodb/t/innodb_stats_fetch_corrupted.test
@@ -8,8 +8,8 @@
# test with 16k page size.
-- source include/have_innodb_16k.inc
-call mtr.add_suppression("InnoDB: Error: Table \"mysql\".\"innodb_index_stats\" not found");
-call mtr.add_suppression("InnoDB: Error: Fetch of persistent statistics requested for table");
+call mtr.add_suppression("InnoDB: Table \"mysql\".\"innodb_index_stats\" not found");
+call mtr.add_suppression("InnoDB: Fetch of persistent statistics requested for table.*");
-- vertical_results
diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test
index 86b56a09c0e..48fc1ef7881 100644
--- a/mysql-test/suite/innodb/t/strict_mode.test
+++ b/mysql-test/suite/innodb/t/strict_mode.test
@@ -5,6 +5,8 @@
--echo # INNODB_STRICT_MODE = 1
--echo #
+call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
+
set innodb_strict_mode = 0;
create table t1 (id int auto_increment primary key,
diff --git a/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc b/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc
new file mode 100644
index 00000000000..26ce7e72983
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc
@@ -0,0 +1,20 @@
+--echo ===> Testing size=$size
+--disable_warnings
+--eval CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$size
+--enable_warnings
+
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+
+--source include/shutdown_mysqld.inc
+
+--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd
+--exec $INNOCHECKSUM --write=crc32 $MYSQLD_DATADIR/test/t1.ibd
+--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd
+--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/t1.ibd
+--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
+
+--source include/start_mysqld.inc
+select * from t1;
+drop table t1;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc b/mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc
new file mode 100644
index 00000000000..413a026265e
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_create_tab_indx.inc
@@ -0,0 +1,16 @@
+--echo # Create table & Index
+
+eval CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$block_size;
+
+
+let $i = 9;
+while ($i) {
+
+eval CREATE INDEX idx$i ON tab5(col_$i(10));
+dec $i;
+}
+
+
diff --git a/mysql-test/suite/innodb_zip/include/innodb_dml_ops.inc b/mysql-test/suite/innodb_zip/include/innodb_dml_ops.inc
new file mode 100644
index 00000000000..4908dfb6bee
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_dml_ops.inc
@@ -0,0 +1,82 @@
+delimiter |;
+create procedure populate_t1()
+begin
+ declare i int default 1;
+ while (i <= 200) do
+ insert into t1 values (i, 'a', 'b');
+ set i = i + 1;
+ end while;
+end|
+create procedure populate_t1_small()
+begin
+ declare i int default 1;
+ while (i <= 20) do
+ insert into t1 values (i, 'c', 'd');
+ set i = i + 1;
+ end while;
+end|
+create procedure populate_t1_small2()
+begin
+ declare i int default 30;
+ while (i <= 50) do
+ insert into t1 values (i, 'e', 'f');
+ set i = i + 1;
+ end while;
+end|
+delimiter ;|
+#
+begin;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+select * from t1 limit 10;
+rollback;
+select count(*) from t1;
+#
+begin;
+call populate_t1();
+select count(*) from t1;
+commit;
+select count(*) from t1;
+#
+truncate table t1;
+select count(*) from t1;
+#
+call populate_t1_small();
+select count(*) from t1;
+rollback;
+select count(*) from t1;
+truncate table t1;
+#
+call populate_t1();
+select count(*) from t1;
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+call populate_t1_small();
+select count(*) from t1;
+select * from t1 limit 10;
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+select * from t1 where keyc > 30 limit 10;
+rollback;
+select count(*) from t1;
+select * from t1 where keyc > 30 limit 10;
+#
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+rollback;
+select * from t1 limit 10;
+commit;
+select * from t1 limit 10;
+#
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+#
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_fetch_records.inc b/mysql-test/suite/innodb_zip/include/innodb_fetch_records.inc
new file mode 100644
index 00000000000..5e55293c18c
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_fetch_records.inc
@@ -0,0 +1,7 @@
+--echo ===============
+--echo Fetch Records
+--echo ===============
+
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_load_data.inc b/mysql-test/suite/innodb_zip/include/innodb_load_data.inc
new file mode 100644
index 00000000000..1bcb30131ac
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_load_data.inc
@@ -0,0 +1,19 @@
+--echo # Load the data
+
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+
+while ($i) {
+
+eval INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+dec $i;
+}
+commit;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc b/mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc
new file mode 100644
index 00000000000..d2fe05e5d13
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_stats_comp_index.inc
@@ -0,0 +1,26 @@
+--echo # Check the stats of the table
+--echo # Check the size of the ibd file
+
+-- echo # testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+
+perl;
+ my $dir = $ENV{'MYSQLD_DATADIR'}."test";
+ my $size;
+ opendir(DIR, $dir) or die $!;
+ while (my $file = readdir(DIR))
+ {
+
+ next unless ($file =~ m/\.ibd$/);
+ $size = -s "$dir/$file";
+ print "The size of the tab5.ibd file: $size\n";
+ }
+ close(DIR);
+ exit(0)
+EOF
diff --git a/mysql-test/suite/innodb_zip/include/innodb_stats_restart.inc b/mysql-test/suite/innodb_zip/include/innodb_stats_restart.inc
new file mode 100644
index 00000000000..13952459847
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_stats_restart.inc
@@ -0,0 +1,12 @@
+--echo ===============
+--echo After Restart Chekc the stats of the table
+--echo ===============
+
+-- echo # testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc b/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc
new file mode 100644
index 00000000000..42e0908f810
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc
@@ -0,0 +1,40 @@
+# insert test
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+select * from t1 where i = 98;
+select * from t1 where i < 100;
+#
+# add index using alter table table
+explain select * from t1 where f > 1.29999;
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+select * from t1 where f > 1.29999;
+#
+explain select * from t1 where i = 100;
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+select * from t1 where i = 100;
+#
+# delete test
+delete from t1 where i < 97;
+select * from t1;
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+#
+# update test
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+#
+# truncate table
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc
new file mode 100644
index 00000000000..fcefd0cdf7e
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc
@@ -0,0 +1,144 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+# suppress expected warnings.
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+
+################################################################################
+#
+# Will test following scenarios:
+# 1. Hit crash point on completing drop of all indexes before creation of index
+# is commenced.
+# 2. Hit crash point after data is updated to system-table and in-memory dict.
+# 3. Post truncate recovery, abruptly shutdown the server.
+# On restart ensure table state is maintained.
+#
+################################################################################
+
+#-----------------------------------------------------------------------------
+#
+# create test-bed
+#
+
+let $WL6501_TMP_DIR = `select @@tmpdir`;
+let $WL6501_DATA_DIR = `select @@datadir`;
+let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
+
+#-----------------------------------------------------------------------------
+#
+# 1. Hit crash point on completing drop of all indexes before creation of index
+# is commenced.
+#
+--echo "1. Hit crash point on completing drop of all indexes before creation"
+--echo " of index is commenced."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+set innodb_strict_mode=off;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+check table t;
+#
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+--source include/expect_crash.inc
+--error 2013
+truncate table t;
+#
+--source include/start_mysqld.inc
+
+check table t;
+select * from t;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+select * from t where f < 2.5;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 2. Hit crash point after data is updated to system-table and in-memory dict.
+#
+--echo "2. Hit crash point after data is updated to system-table and"
+--echo " in-memory dict."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+set innodb_strict_mode=off;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+check table t;
+#
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+--source include/expect_crash.inc
+--error 2013
+truncate table t;
+#
+--source include/start_mysqld.inc
+check table t;
+select * from t;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+select * from t where f < 2.5;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 3. Post truncate recovery, abruptly shutdown the server.
+# On restart ensure table state is maintained.
+#
+--echo "3. Post truncate recovery, abruptly shutdown the server."
+--echo " On restart ensure table state is maintained."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+set innodb_strict_mode=off;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+check table t;
+#
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+--source include/expect_crash.inc
+--error 2013
+truncate table t;
+#
+--source include/start_mysqld.inc
+check table t;
+select * from t;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+#
+--source include/kill_and_restart_mysqld.inc
+#
+check table t;
+select * from t;
+select * from t where f < 2.5;
+drop table t;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc
new file mode 100644
index 00000000000..0939d452dae
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc
@@ -0,0 +1,234 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+--disable_query_log
+# suppress expected warnings
+call mtr.add_suppression("Unable to truncate FTS index for table");
+call mtr.add_suppression("Unable to assign a new identifier to table "
+ "`.*`\.`.*` after truncating it");
+call mtr.add_suppression("Flagged corruption of .* in table "
+ "`.*`\.`.*` in TRUNCATE TABLE");
+call mtr.add_suppression("Parent table of FTS auxiliary table "
+ ".*\/.* not found");
+--enable_query_log
+################################################################################
+#
+# Will test following scenarios:
+# 1. Error in assigning undo logs for truncate action.
+# 2. Error while preparing for truncate.
+# 3. Error while dropping/creating indexes.
+# 4. Error while completing truncate of table involving FTS.
+# 5. Error while updating sys-tables.
+#
+################################################################################
+
+#-----------------------------------------------------------------------------
+#
+# create test-bed
+#
+let $per_table = `select @@innodb_file_per_table`;
+let $format = `select @@innodb_file_format`;
+
+eval set global innodb_file_per_table = on;
+let $WL6501_TMP_DIR = `select @@tmpdir`;
+let $WL6501_DATA_DIR = `select @@datadir`;
+set innodb_strict_mode=off;
+
+#-----------------------------------------------------------------------------
+#
+# 1. Error in assigning undo logs for truncate action.
+#
+--echo "1. Error in assigning undo logs for truncate action."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_assigning_undo_log";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_assigning_undo_log";
+#
+#check table t;
+select * from t;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 2. Error while preparing for truncate.
+#
+--echo "2. Error while preparing for truncate."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_preparing_for_truncate";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_preparing_for_truncate";
+#
+#check table t;
+select * from t;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 3. Error while dropping/creating indexes
+#
+--echo "3. Error while dropping/creating indexes"
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_drop_index";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_drop_index";
+#
+#check table t;
+--error ER_TABLE_CORRUPT, 1030
+select * from t;
+drop table t;
+#
+#
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_create_index";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_create_index";
+#
+#check table t;
+--error ER_TABLE_CORRUPT, 1030
+select * from t;
+drop table t;
+#
+#
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create temporary table t (
+ i int, f float, c char,
+ primary key pk(i), unique findex(f), index ck(c))
+ engine = innodb row_format = $wl6501_row_fmt
+ key_block_size = $wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_temp_recreate_index";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_temp_recreate_index";
+#
+#check table t;
+--error ER_TABLE_CORRUPT, 1030
+select * from t;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 4. Error while completing truncate of table involving FTS.
+#
+--echo "4. Error while completing truncate of table involving FTS."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (i int, f float, c char(100),
+ primary key pk(i), index fk(f), fulltext index ck(c))
+ engine=innodb row_format=$wl6501_row_fmt
+ key_block_size=$wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'mysql is now oracle company'),
+ (2, 2.2, 'innodb is part of mysql'),
+ (3, 3.3, 'innodb is default storage engine of mysql');
+select * from t;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_during_fts_trunc";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_during_fts_trunc";
+#
+#check table t;
+--error ER_TABLE_CORRUPT, 1030
+select * from t;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# 5. Error while updating sys-tables.
+#
+--echo "5. Error while updating sys-tables."
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--disable_warnings
+eval create $wl6501_temp table t (i int, f float, c char(100),
+ primary key pk(i), index fk(f), fulltext index ck(c))
+ engine=innodb row_format=$wl6501_row_fmt
+ key_block_size=$wl6501_kbs;
+--enable_warnings
+insert into t values (1, 1.1, 'mysql is now oracle company'),
+ (2, 2.2, 'innodb is part of mysql'),
+ (3, 3.3, 'innodb is default storage engine of mysql');
+select * from t order by i;
+#check table t;
+#
+set session debug = "+d,ib_err_trunc_during_sys_table_update";
+--error ER_GET_ERRNO
+truncate table t;
+set session debug = "-d,ib_err_trunc_during_sys_table_update";
+#
+#check table t;
+--error ER_TABLE_CORRUPT, 1030
+select * from t order by i;
+drop table t;
+
+#-----------------------------------------------------------------------------
+#
+# remove test-bed
+#
+eval set global innodb_file_format = $format;
+eval set global innodb_file_per_table = $per_table;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc
new file mode 100644
index 00000000000..67569d3dae9
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc
@@ -0,0 +1,113 @@
+#
+# load tables with some significant amount of data and then truncate it.
+#
+
+#-----------------------------------------------------------------------------
+#
+# create test-bed
+#
+let $per_table = `select @@innodb_file_per_table`;
+let $format = `select @@innodb_file_format`;
+
+let $WL6501_TMP_DIR = `select @@tmpdir`;
+let $WL6501_DATA_DIR = `select @@datadir`;
+set innodb_strict_mode=OFF;
+
+#-----------------------------------------------------------------------------
+#
+# create procedure to load data
+#
+delimiter |;
+create procedure populate()
+begin
+ declare i int default 1;
+ while (i <= 5000) do
+ insert into t1 values (i, 'a', 'b');
+ insert into t2 values (i, 'a', 'b');
+ insert into t3 values (i, 'a', 'b');
+ set i = i + 1;
+ end while;
+end|
+create procedure populate_small()
+begin
+ declare i int default 10001;
+ while (i <= 12000) do
+ insert into t1 values (i, 'c', 'd');
+ insert into t2 values (i, 'a', 'b');
+ insert into t3 values (i, 'a', 'b');
+ set i = i + 1;
+ end while;
+end|
+delimiter ;|
+
+#-----------------------------------------------------------------------------
+#
+# create and load the tables.
+#
+eval set global innodb_file_per_table = $wl6501_file_per_table;
+eval set global innodb_file_format = $wl6501_file_format;
+--replace_regex /[0-9]+/NUMBER/
+eval create table t1
+ (i int, c1 char(100), c2 char(100),
+ index c1_idx(c1))
+ engine=innodb row_format=$wl6501_row_fmt
+ key_block_size=$wl6501_kbs;
+eval create table t2
+ (i int, c1 char(100), c2 char(100),
+ index c1_idx(c1))
+ engine=innodb row_format=$wl6501_row_fmt
+ key_block_size=$wl6501_kbs;
+eval create temporary table t3
+ (i int, c1 char(100), c2 char(100),
+ index c1_idx(c1))
+ engine=innodb row_format=$wl6501_row_fmt
+ key_block_size=$wl6501_kbs;
+#
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+begin;
+call populate();
+commit;
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+#
+truncate table t1;
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+#
+call populate_small();
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+#
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+#
+call populate_small();
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+#
+drop table t1;
+drop table t2;
+drop table t3;
+
+#-----------------------------------------------------------------------------
+#
+# drop the procedure
+#
+drop procedure populate;
+drop procedure populate_small;
+
+#-----------------------------------------------------------------------------
+#
+# remove test-bed
+#
+eval set global innodb_file_format = $format;
+eval set global innodb_file_per_table = $per_table;
diff --git a/mysql-test/suite/innodb_zip/r/16k.result b/mysql-test/suite/innodb_zip/r/16k.result
new file mode 100644
index 00000000000..3d9f39529e2
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/16k.result
@@ -0,0 +1,745 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+16384
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 41 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 8192 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 8123, Compact: 8126.
+# Compressed: 8126, Dynamic: 8126.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> 8123). 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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=compact;
+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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160)
+) ROW_FORMAT=compressed;
+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 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=dynamic;
+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 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(4) character set utf8,
+PRIMARY KEY (a,b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(5) character set utf8,
+PRIMARY KEY (a,b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(255) character set utf8,
+f varchar(4) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e,f))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(255) character set utf8,
+b varchar(255) character set utf8,
+c varchar(255) character set utf8,
+d varchar(255) character set utf8,
+e varchar(255) character set utf8,
+f varchar(5) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e,f))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=16, 8, 4, 2 & 1
+# are all accepted.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) This series of tests were moved from innodb-index to here
+# because the second alter table t1 assumes a 16k page size.
+# Moving the test allows the rest of innodb-index to be run on all
+# page sizes. The previously disabled portions of this test were
+# moved as well.
+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 STATS_PERSISTENT=0;
+INSERT INTO t1
+SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d;
+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
+ORDER BY 1, 2, 3, 4, 5, 6;
+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 22000 1 4400 1 jejdkrun87
+22 26400 1 5280 1 adfdpplkeock
+22 28600 1 5720 1 adfdijnmnb78k
+22 35200 1 7040 1 adfdijn0loKNHJik
+33 33000 1 6600 1 adfd72nh9k
+33 33000 1 6600 1 jejdkrun87
+33 39600 1 7920 1 adfdpplkeock
+33 42900 1 8580 1 adfdijnmnb78k
+33 52800 1 10560 1 adfdijn0loKNHJik
+44 44000 1 8800 1 adfd72nh9k
+44 44000 1 8800 1 jejdkrun87
+44 52800 1 10560 1 adfdpplkeock
+44 57200 1 11440 1 adfdijnmnb78k
+44 65535 1 14080 1 adfdijn0loKNHJik
+55 55000 1 11000 1 adfd72nh9k
+55 55000 1 11000 1 jejdkrun87
+55 65535 1 13200 1 adfdpplkeock
+55 65535 1 14300 1 adfdijnmnb78k
+55 65535 1 17600 1 adfdijn0loKNHJik
+66 65535 1 13200 1 adfd72nh9k
+66 65535 1 13200 1 jejdkrun87
+66 65535 1 15840 1 adfdpplkeock
+66 65535 1 17160 1 adfdijnmnb78k
+66 65535 1 21120 1 adfdijn0loKNHJik
+ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
+ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
+DELETE FROM t1 WHERE d='null';
+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,
+ `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 STATS_PERSISTENT=0
+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 partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL range b b 769 NULL 12 100.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where (`test`.`t1`.`b` like 'adfd%')
+DROP TABLE t1;
+# Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+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));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1f ON t1 (f(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+CREATE INDEX t1j ON t1 (j(767));
+UPDATE t1 SET j=@e;
+CREATE INDEX t1k ON t1 (k(767));
+UPDATE t1 SET k=@e;
+CREATE INDEX t1l ON t1 (l(767));
+UPDATE t1 SET l=@e;
+CREATE INDEX t1m ON t1 (m(767));
+UPDATE t1 SET m=@e;
+CREATE INDEX t1n ON t1 (n(767));
+UPDATE t1 SET n=@e;
+CREATE INDEX t1o ON t1 (o(767));
+UPDATE t1 SET o=@e;
+CREATE INDEX t1p ON t1 (p(767));
+UPDATE t1 SET p=@e;
+CREATE INDEX t1q ON t1 (q(767));
+UPDATE t1 SET q=@e;
+CREATE INDEX t1r ON t1 (r(767));
+UPDATE t1 SET r=@e;
+CREATE INDEX t1s ON t1 (s(767));
+UPDATE t1 SET s=@e;
+CREATE INDEX t1t ON t1 (t(767));
+UPDATE t1 SET t=@e;
+ERROR HY000: Undo log record is too big.
+CREATE INDEX t1u ON t1 (u(767));
+CREATE INDEX t1ut ON t1 (u(767), t(767));
+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 `t1u` (`u`(767)),
+ KEY `t1ut` (`u`(767),`t`(767)),
+ KEY `t1st` (`s`(767),`t`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+# 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;
+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;
+# Bug#12963823 - Test that the purge thread does not crash when
+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
+# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
+SET SESSION innodb_strict_mode = ON;
+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.
+SHOW WARNINGS;
+Level Code Message
+Error 1713 Undo log record is too big.
+DROP TABLE bug12547647;
+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;
+Warnings:
+Warning 139 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.
+DROP TABLE t1;
+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;
+Warnings:
+Warning 139 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.
+DROP TABLE t1;
+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;
+Warnings:
+Warning 139 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.
+DROP TABLE t1;
+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#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 @optimizer_switch_saved=@@optimizer_switch;
+SET SESSION optimizer_switch='derived_merge=off';
+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 partitions type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> NULL ALL NULL NULL NULL NULL 1537 100.00 NULL
+2 DERIVED t1 NULL index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1537 100.00 Using sort_union(idx,PRIMARY); Using where
+Warnings:
+Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from (/* select#2 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` FORCE INDEX (PRIMARY) FORCE INDEX (`idx`) where ((`test`.`t1`.`a` between 2 and 7) or (`test`.`t1`.`pk` = 1000000))) `t`
+SELECT COUNT(*) FROM
+(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY)
+WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t;
+COUNT(*)
+1537
+set @@optimizer_switch=@optimizer_switch_saved;
+SET SESSION sort_buffer_size = DEFAULT;
+DROP TABLE t1;
+DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
+DROP TABLE t12637786;
+DROP TABLE t12963823;
diff --git a/mysql-test/suite/innodb_zip/r/4k.result b/mysql-test/suite/innodb_zip/r/4k.result
new file mode 100644
index 00000000000..721943e7f5a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/4k.result
@@ -0,0 +1,442 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+4096
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 37 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 1979, Compact: 1982.
+# Compressed: 1982, Dynamic: 1982.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> max_row_size). 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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=compact;
+ERROR 42000: Row size too large (> max_row_size). 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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
+) ROW_FORMAT=compressed;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=dynamic;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(65) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+e varchar(64) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(64) character set utf8,
+b varchar(64) character set utf8,
+c varchar(64) character set utf8,
+d varchar(64) character set utf8,
+e varchar(65) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all
+# accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected
+# in strict mode and converted to 4 in non-strict mode.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+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
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+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
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are both rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=8 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 4.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) Not included here; 16k only
+# Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+CREATE INDEX t1a ON t1 (a(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1b ON t1 (b(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1c ON t1 (c(767));
+UPDATE t1 SET c=@e;
+CREATE INDEX t1d ON t1 (d(767));
+UPDATE t1 SET d=@e;
+ERROR HY000: Undo log record is too big.
+CREATE INDEX t1e ON t1 (e(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))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+CREATE TABLE t1(
+pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = off;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(
+c text NOT NULL, d text NOT NULL,
+PRIMARY KEY (c(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;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+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;
diff --git a/mysql-test/suite/innodb_zip/r/8k.result b/mysql-test/suite/innodb_zip/r/8k.result
new file mode 100644
index 00000000000..dc2b5ca1363
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/8k.result
@@ -0,0 +1,473 @@
+SET default_storage_engine=InnoDB;
+# Test 1) Show the page size from Information Schema
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_page_size';
+variable_value
+8192
+# Test 2) The number of buffer pool pages is dependent upon the page size.
+SELECT variable_value FROM information_schema.global_status
+WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+variable_value
+{checked_valid}
+# Test 3) Query some information_shema tables that are dependent upon
+# the page size.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+mysql/engine_cost 9 33 PRIMARY 3 3 3 50
+mysql/gtid_executed 6 33 PRIMARY 3 3 2 50
+mysql/help_category 7 33 PRIMARY 3 3 1 50
+mysql/help_category 7 33 name 4 2 1 50
+mysql/help_keyword 5 33 PRIMARY 3 3 1 50
+mysql/help_keyword 5 33 name 4 2 1 50
+mysql/help_relation 5 33 PRIMARY 3 3 2 50
+mysql/help_topic 9 33 PRIMARY 3 3 1 50
+mysql/help_topic 9 33 name 4 2 1 50
+mysql/innodb_index_stats 11 33 PRIMARY 3 3 4 50
+mysql/innodb_table_stats 9 33 PRIMARY 3 3 2 50
+mysql/plugin 5 33 PRIMARY 3 3 1 50
+mysql/servers 12 33 PRIMARY 3 3 1 50
+mysql/server_cost 7 33 PRIMARY 3 3 1 50
+mysql/slave_master_info 28 33 PRIMARY 3 3 1 50
+mysql/slave_relay_log_info 12 33 PRIMARY 3 3 1 50
+mysql/slave_worker_info 16 33 PRIMARY 3 3 2 50
+mysql/time_zone 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_leap_second 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_name 5 33 PRIMARY 3 3 1 50
+mysql/time_zone_transition 6 33 PRIMARY 3 3 2 50
+mysql/time_zone_transition_type 8 33 PRIMARY 3 3 2 50
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+i.name index_name, i.page_no root_page, i.type,
+i.n_fields, i.merge_threshold
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+WHERE t.table_id = i.table_id
+AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+table_name n_cols table_flags index_name root_page type n_fields merge_threshold
+test/t1 5 0 PRIMARY 3 3 1 50
+test/t2 5 1 PRIMARY 3 3 1 50
+test/t3 5 39 PRIMARY 3 3 1 50
+test/t4 5 33 PRIMARY 3 3 1 50
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1.ibd
+test/t2 Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2.ibd
+test/t3 Single DEFAULT 4096 Compressed MYSQLD_DATADIR/test/t3.ibd
+test/t4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1.ibd
+test/t2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2.ibd
+test/t3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3.ibd
+test/t4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4.ibd
+DROP TABLE t1, t2, t3, t4;
+# Test 4) The maximum row size is dependent upon the page size.
+# Redundant: 4027, Compact: 4030.
+# Compressed: 4030, Dynamic: 4030.
+# Each row format has its own amount of overhead that
+# varies depending on number of fields and other overhead.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156)
+) ROW_FORMAT=redundant;
+ERROR 42000: Row size too large (> max_row_size). 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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=compact;
+ERROR 42000: Row size too large (> max_row_size). 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.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106)
+) ROW_FORMAT=compressed;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=dynamic;
+ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(129) character set utf8,
+PRIMARY KEY (a,b,c,d))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+e varchar(128) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+DROP TABLE t1;
+CREATE TABLE t1 (a varchar(128) character set utf8,
+b varchar(128) character set utf8,
+c varchar(128) character set utf8,
+d varchar(128) character set utf8,
+e varchar(129) character set utf8,
+PRIMARY KEY (a), KEY (b,c,d,e))
+ENGINE=innodb;
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+# Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all
+# accepted and that KEY_BLOCK_SIZE=16 is rejected in
+# strict mode and converted to 8 in non-strict mode.
+SET SESSION innodb_strict_mode = ON;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Error 1031 Table storage engine for 't1' doesn't have this option
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+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
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+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
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+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=4
+ALTER TABLE t1 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=2
+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=1
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+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
+DROP TABLE t1;
+# Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+# are rejected when innodb_file_per_table=OFF
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table OFF
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+ERROR HY000: Table storage engine for 't4' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't4' doesn't have this option
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+ERROR HY000: Table storage engine for 't5' doesn't have this option
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE=16 cannot be larger than 8.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1031 Table storage engine for 't5' doesn't have this option
+SET GLOBAL innodb_file_format = `Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 7) Not included here; 16k only
+# Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+CREATE INDEX t1a ON t1 (a(767));
+CREATE INDEX t1b ON t1 (b(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+CREATE INDEX t1c ON t1 (c(767));
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+ERROR HY000: Undo log record is too big.
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+CREATE INDEX t1d ON t1 (d(767));
+UPDATE t1 SET d=@e;
+CREATE INDEX t1e ON t1 (e(767));
+UPDATE t1 SET e=@e;
+CREATE INDEX t1f ON t1 (f(767));
+UPDATE t1 SET f=@e;
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+CREATE INDEX t1k ON t1 (j(767));
+CREATE INDEX t1j ON t1 (j(500));
+UPDATE t1 SET j=@e;
+ERROR HY000: Undo log record is too big.
+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 `t1k` (`j`(767)),
+ KEY `t1j` (`j`(500))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+CREATE TABLE t1(
+pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+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;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+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;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+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;
+Warnings:
+Warning 139 Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+DROP TABLE t1;
+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;
diff --git a/mysql-test/suite/innodb_zip/r/bug36169.result b/mysql-test/suite/innodb_zip/r/bug36169.result
new file mode 100644
index 00000000000..7e165e0f7d4
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug36169.result
@@ -0,0 +1 @@
+SET GLOBAL innodb_file_per_table=ON;
diff --git a/mysql-test/suite/innodb_zip/r/bug36172.result b/mysql-test/suite/innodb_zip/r/bug36172.result
new file mode 100644
index 00000000000..23c5b0cc2f7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug36172.result
@@ -0,0 +1 @@
+SET default_storage_engine=InnoDB;
diff --git a/mysql-test/suite/innodb_zip/r/bug52745.result b/mysql-test/suite/innodb_zip/r/bug52745.result
new file mode 100644
index 00000000000..20605eb274d
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug52745.result
@@ -0,0 +1,129 @@
+SET GLOBAL innodb_file_per_table=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+CREATE TABLE bug52745 (
+a2 int(10) unsigned DEFAULT NULL,
+col37 time DEFAULT NULL,
+col38 char(229) CHARACTER SET utf8 DEFAULT NULL,
+col39 text,
+col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+col41 int(10) unsigned DEFAULT NULL,
+col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL,
+col43 smallint(5) unsigned zerofill DEFAULT NULL,
+col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL,
+col45 float unsigned zerofill DEFAULT NULL,
+col46 binary(1) DEFAULT NULL,
+col47 tinyint(4) DEFAULT NULL,
+col48 tinyint(1) DEFAULT NULL,
+col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col50 binary(1) DEFAULT NULL,
+col51 double unsigned zerofill DEFAULT NULL,
+col52 int(10) unsigned DEFAULT NULL,
+col53 time DEFAULT NULL,
+col54 double unsigned DEFAULT NULL,
+col55 time DEFAULT NULL,
+col56 mediumtext CHARACTER SET latin2,
+col57 blob,
+col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000',
+col59 binary(1) DEFAULT NULL,
+col60 longblob,
+col61 time DEFAULT NULL,
+col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci,
+col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col64 int(10) unsigned DEFAULT NULL,
+col65 date DEFAULT NULL,
+col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+col67 binary(1) DEFAULT NULL,
+col68 tinyblob,
+col69 date DEFAULT NULL,
+col70 tinyint(3) unsigned zerofill DEFAULT NULL,
+col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
+col72 datetime DEFAULT NULL,
+col73 smallint(5) unsigned zerofill DEFAULT NULL,
+col74 longblob,
+col75 bit(34) DEFAULT NULL,
+col76 float unsigned zerofill DEFAULT NULL,
+col77 year(4) DEFAULT NULL,
+col78 tinyint(3) unsigned DEFAULT NULL,
+col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
+col80 datetime DEFAULT NULL,
+col81 smallint(6) DEFAULT NULL,
+col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
+col83 bigint(20) unsigned zerofill DEFAULT NULL,
+col84 float unsigned zerofill DEFAULT NULL,
+col85 double DEFAULT NULL,
+col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
+col87 varbinary(221) DEFAULT NULL,
+col88 double unsigned DEFAULT NULL,
+col89 float unsigned zerofill DEFAULT NULL,
+col90 tinyblob
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+Warnings:
+Note 1291 Column 'col82' has duplicated value '' in ENUM
+Note 1291 Column 'col82' has duplicated value '' in ENUM
+SET sql_mode = default;
+INSERT IGNORE INTO bug52745 SET
+col40='0000-00-00 00:00:00',
+col51=16547,
+col53='7711484',
+col54=-28604,
+col55='7112612',
+col56='wakefulness\'',
+col57=repeat('absorbefacient\'',106),
+col58=11027,
+col59='AM09gW7',
+col60=repeat('Noelani\'',16),
+col61='2520576',
+col62='substitutiv',
+col63='19950106155112',
+col64=-12038,
+col65='86238806',
+col66='19600719080256',
+col68=repeat('Sagittarius\'',54),
+col69='38943902',
+col70=1232,
+col71='Elora\'',
+col74=repeat('zipp',11),
+col75='0',
+col76=23254,
+col78=13247,
+col79='56219',
+col80='20500609035724',
+col81=11632,
+col82=7,
+col84=-23863,
+col85=6341,
+col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
+col88=16894,
+col89=6161,
+col90=repeat('gale',48);
+Warnings:
+Warning 1265 Data truncated for column 'col53' at row 1
+Warning 1264 Out of range value for column 'col54' at row 1
+Warning 1265 Data truncated for column 'col59' at row 1
+Warning 1265 Data truncated for column 'col61' at row 1
+Warning 1264 Out of range value for column 'col64' at row 1
+Warning 1265 Data truncated for column 'col65' at row 1
+Warning 1264 Out of range value for column 'col66' at row 1
+Warning 1265 Data truncated for column 'col68' at row 1
+Warning 1265 Data truncated for column 'col69' at row 1
+Warning 1264 Out of range value for column 'col70' at row 1
+Warning 1264 Out of range value for column 'col78' at row 1
+Warning 1265 Data truncated for column 'col79' at row 1
+Warning 1264 Out of range value for column 'col84' at row 1
+SHOW WARNINGS;
+Level Code Message
+Warning 1265 Data truncated for column 'col53' at row 1
+Warning 1264 Out of range value for column 'col54' at row 1
+Warning 1265 Data truncated for column 'col59' at row 1
+Warning 1265 Data truncated for column 'col61' at row 1
+Warning 1264 Out of range value for column 'col64' at row 1
+Warning 1265 Data truncated for column 'col65' at row 1
+Warning 1264 Out of range value for column 'col66' at row 1
+Warning 1265 Data truncated for column 'col68' at row 1
+Warning 1265 Data truncated for column 'col69' at row 1
+Warning 1264 Out of range value for column 'col70' at row 1
+Warning 1264 Out of range value for column 'col78' at row 1
+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_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/bug53591.result b/mysql-test/suite/innodb_zip/r/bug53591.result
new file mode 100644
index 00000000000..e14a1942750
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug53591.result
@@ -0,0 +1,13 @@
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_strict_mode=on;
+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 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 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_per_table=1;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/r/bug56680.result b/mysql-test/suite/innodb_zip/r/bug56680.result
new file mode 100644
index 00000000000..40660f435fb
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/bug56680.result
@@ -0,0 +1,120 @@
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+SET GLOBAL innodb_file_per_table=on;
+CREATE TABLE bug56680(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b CHAR(1),
+c INT,
+INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+b
+x
+connect con1,localhost,root,,;
+connection con1;
+BEGIN;
+UPDATE bug56680 SET b='X';
+connection default;
+SELECT b FROM bug56680;
+b
+x
+SELECT * FROM bug56680;
+a b c
+1 x 1
+connection con1;
+ROLLBACK;
+disconnect con1;
+connection default;
+SELECT b FROM bug56680;
+b
+x
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+connect con1,localhost,root,,;
+connection con1;
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+INSERT INTO bug56680 VALUES(1,'X',1);
+SELECT b FROM bug56680 LIMIT 3;
+b
+X
+x
+x
+connection default;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table Op Msg_type Msg_text
+test.bug56680 check status OK
+connection con1;
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CHECK TABLE bug56680;
+Table Op Msg_type Msg_text
+test.bug56680 check status OK
+connection default;
+disconnect con1;
+SELECT b FROM bug56680 LIMIT 2;
+b
+x
+x
+CREATE TABLE bug56680_2(
+a INT AUTO_INCREMENT PRIMARY KEY,
+b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+c INT,
+INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+DF
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+5353
+DF
+DF
+CHECK TABLE bug56680_2;
+Table Op Msg_type Msg_text
+test.bug56680_2 check status OK
+ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+HEX(b)
+5353
+DF
+DELETE FROM bug56680_2 WHERE a=1;
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+HEX(b)
+DF
+DF
+DF
+CHECK TABLE bug56680_2;
+Table Op Msg_type Msg_text
+test.bug56680_2 check status OK
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;
diff --git a/mysql-test/suite/innodb_zip/r/cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/cmp_drop_table.result
new file mode 100644
index 00000000000..c1743cac2e1
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/cmp_drop_table.result
@@ -0,0 +1,13 @@
+set global innodb_file_per_table=on;
+create table t1(a text) engine=innodb key_block_size=8;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+8192
+drop table t1;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+8192
+create table t2(a text) engine=innodb;
+SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
+page_size
+drop table t2;
diff --git a/mysql-test/suite/innodb_zip/r/cmp_per_index.result b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
new file mode 100644
index 00000000000..5b899e9ff71
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/cmp_per_index.result
@@ -0,0 +1,94 @@
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+CREATE TABLE t (
+a INT,
+b VARCHAR(512),
+c VARCHAR(16),
+PRIMARY KEY (a),
+INDEX (b(512)),
+INDEX (c(16))
+) ENGINE=INNODB KEY_BLOCK_SIZE=2;
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name b
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+database_name test
+table_name t
+index_name c
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 1
+compress_ops_ok 1
+uncompress_ops 0
+BEGIN;
+COMMIT;
+ALTER TABLE t DROP INDEX c;
+GRANT USAGE ON *.* TO 'tuser01'@'localhost' IDENTIFIED BY 'cDJvI9s_Uq';
+Warnings:
+Level Warning
+Code 1287
+Message Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
+FLUSH PRIVILEGES;
+SELECT * FROM information_schema.innodb_cmp_per_index;
+ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
+DROP USER 'tuser01'@'localhost';
+SELECT
+database_name,
+table_name,
+index_name,
+CASE WHEN compress_ops=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops END as compress_ops,
+CASE WHEN compress_ops_ok=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops_ok END as compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name b
+compress_ops 43
+compress_ops_ok 43
+uncompress_ops 0
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 65
+compress_ops_ok 65
+uncompress_ops 0
+# restart
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SELECT COUNT(*) FROM t;
+COUNT(*) 128
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9
+ELSE uncompress_ops END as uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+database_name test
+table_name t
+index_name PRIMARY
+compress_ops 0
+compress_ops_ok 0
+uncompress_ops 9
+DROP TABLE t;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
diff --git a/mysql-test/suite/innodb_zip/r/create_options.result b/mysql-test/suite/innodb_zip/r/create_options.result
new file mode 100644
index 00000000000..2d80894c8cd
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/create_options.result
@@ -0,0 +1,839 @@
+SET default_storage_engine=InnoDB;
+SET GLOBAL innodb_file_per_table=ON;
+SET SESSION innodb_strict_mode = ON;
+# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+# '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;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+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 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+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 Compact row_format=COMPACT
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+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 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+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 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+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
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+SHOW WARNINGS;
+Level Code Message
+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 Dynamic
+# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
+# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+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")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+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")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+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")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+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=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=2
+DROP TABLE t1;
+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=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=1
+# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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 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=1
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED 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=1
+# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) 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=COMPACT
+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 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
+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
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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=2;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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=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=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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=1
+# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
+# ALTER with each ROW_FORMAT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
+ALTER TABLE t1 ADD COLUMN f1 INT;
+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 KEY_BLOCK_SIZE=2
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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 key_block_size=2
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+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
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+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 Compact row_format=COMPACT
+# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+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")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
+# and that they can be set to default values during strict mode.
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+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 Redundant row_format=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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 Compact row_format=COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+Level Code Message
+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 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: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
+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=DYNAMIC.
+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
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+# and a valid non-zero KEY_BLOCK_SIZE are rejected with
+# innodb_file_per_table=OFF and that they can be set to default
+# values during strict mode.
+SET GLOBAL innodb_file_per_table=OFF;
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+Got one of the listed errors
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+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 Redundant row_format=REDUNDANT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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 Compact row_format=COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SHOW WARNINGS;
+Level Code Message
+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: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+ALTER TABLE t1 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=COMPACT
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+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 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT;
+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
+SET GLOBAL innodb_file_per_table=ON;
+DROP TABLE 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;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+Level Code Message
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+Level Code Message
+SET GLOBAL innodb_file_per_table=ON;
+##################################################
+SET SESSION innodb_strict_mode = OFF;
+# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+# 'FIXED' is sent to InnoDB since it is used by MyISAM.
+# It is an invalid mode in InnoDB, use COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
+Warnings:
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+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=FIXED
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+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 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+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 Compact row_format=COMPACT
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+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 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+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 Redundant row_format=REDUNDANT
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+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
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+Warnings:
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+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=FIXED
+# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 t1;
+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=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=2
+DROP TABLE t1;
+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=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=1
+# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+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=FIXED key_block_size=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 t1;
+CREATE TABLE t1 ( i INT );
+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=1
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED 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=1
+# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) 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=COMPACT
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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
+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=2
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+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=4
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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=2
+# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
+# ALTER with each ROW_FORMAT
+DROP TABLE t1;
+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=1
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+Level Code Message
+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 KEY_BLOCK_SIZE=1
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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=1
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
+SHOW WARNINGS;
+Level Code Message
+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=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=1
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+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
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+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 Compact row_format=COMPACT
+# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
+# it defaults to half of the page size.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
+Warnings:
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
+SHOW WARNINGS;
+Level Code Message
+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 Dynamic key_block_size=15
+# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
+is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED 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=1
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
+Warnings:
+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=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+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=DYNAMIC.
+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=COMPRESSED key_block_size=1
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f2 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=1
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) 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
+SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f2 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 Dynamic row_format=DYNAMIC
+# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
+and then used again when innodb_file_per_table=ON.
+DROP TABLE t1;
+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=2
+SET GLOBAL innodb_file_per_table=OFF;
+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=2
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 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=2
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) 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
+SET GLOBAL innodb_file_per_table=OFF;
+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 Dynamic row_format=DYNAMIC
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 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 Dynamic row_format=DYNAMIC
+# Cleanup
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
new file mode 100644
index 00000000000..7285f4dfad7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
@@ -0,0 +1,534 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### 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;
+@@session.tx_isolation
+REPEATABLE-READ
+connect con1,localhost,root,,;
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+connect con2,localhost,root,,;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+connection default;
+rollback;
+drop table worklog5743;
+### 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;
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) 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
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+connection default;
+rollback;
+drop table worklog5743;
+### 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;
+update worklog5743 set a1 = 1000;
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) 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
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+connection default;
+rollback;
+drop table worklog5743;
+### 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+Got one of the listed errors
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_1(a2(4000));
+Got one of the listed errors
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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));
+Warnings:
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_8'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_8'. This is deprecated and will be disallowed in a future release.
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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));
+Warnings:
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_16'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Note 1831 Duplicate index 'idx3' defined on the table 'test.worklog5743_16'. This is deprecated and will be disallowed in a future release.
+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
+set sql_mode= default;
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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
+connection con1;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+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_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
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+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)
+connection default;
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+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;
+SET sql_mode='';
+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
+SET sql_mode= default;
+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;
+connection con1;
+select @@session.tx_isolation;
+@@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 idx6 idx6 5 const 1 Using index
+select a1 from worklog5743 where a1 = 9;
+a1
+9
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+connection default;
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)))
+row_format=compact;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create table worklog5743(a TEXT)
+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 idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+connection con1;
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+disconnect con1;
+connection con2;
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+disconnect con2;
+connection default;
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode='';
+create index idx1 on worklog5743(a(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 3072 bytes
+create index idx2 on worklog5743(a(3072));
+Warnings:
+Note 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(3072)),
+ KEY `idx2` (`a`(3072))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+drop table worklog5743;
+SET sql_mode= default;
+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_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result b/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result
new file mode 100644
index 00000000000..f010c522614
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix_4k.result
@@ -0,0 +1,404 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### Test 1 ###
+create table worklog5743(a TEXT not null, primary key (a(768))) ROW_FORMAT=DYNAMIC;
+show warnings;
+Level Code Message
+insert into worklog5743 values(repeat("a", 20000));
+update worklog5743 set a = (repeat("b", 16000));
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx on worklog5743(a(900));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+SET sql_mode= default;
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+rollback;
+drop table worklog5743;
+### 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(750));
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1111;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### 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;
+update worklog5743 set a1 = 2222;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### 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;
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 767 bytes
+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 1982. 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 1982. 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 1982. 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 1982. 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=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743_2(a2(4000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show create table worklog5743_2;
+Table Create Table
+worklog5743_2 CREATE TABLE `worklog5743_2` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` text NOT NULL,
+ KEY `idx1` (`a2`(768))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
+create index idx3 on worklog5743_2(a2(769));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+create index idx4 on worklog5743_2(a2(768));
+Warnings:
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_2'. This is deprecated and will be disallowed in a future release.
+create index idx5 on worklog5743_2(a1, a2(765));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+create index idx6 on worklog5743_2(a1, a2(764));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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
+show create table worklog5743_4;
+Table Create Table
+worklog5743_4 CREATE TABLE `worklog5743_4` (
+ `a1` int(11) DEFAULT NULL,
+ `a2` text NOT NULL,
+ KEY `idx1` (`a2`(767))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+create index idx3 on worklog5743_4(a2(769));
+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
+create index idx4 on worklog5743_4(a2(768));
+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
+create index idx5 on worklog5743_4(a1, a2(765));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+create index idx6 on worklog5743_4(a1, a2(764));
+show warnings;
+Level Code Message
+SET sql_mode= default;
+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));
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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));
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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
+begin;
+update worklog5743_1 set a1 = 1000;
+update worklog5743_2 set a1 = 1000;
+update worklog5743_4 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 @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
+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
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+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)
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+### Test 5 ###
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+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
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(3072)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(769)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(768)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 768));
+update worklog5743 set a1 = 3333;
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(765)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 768 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(764)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 764));
+begin;
+update worklog5743 set a1 = 4444;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1 from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1 from worklog5743 where a1 = 9;
+a1
+9
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)));
+ERROR 42000: Specified key was too long; max key length is 768 bytes
+create table worklog5743(a TEXT) 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 idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743(a(769));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 768 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 768 bytes
+SET sql_mode= default;
+create index idx2 on worklog5743(a(768));
+Warnings:
+Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx2' defined on the table 'test.worklog5743'. This is deprecated and will be disallowed in a future release.
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(768)),
+ KEY `idx2` (`a`(768))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+insert into worklog5743 values(repeat("a", 768));
+drop table worklog5743;
+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_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result b/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result
new file mode 100644
index 00000000000..3176ffe2204
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix_8k.result
@@ -0,0 +1,442 @@
+SET default_storage_engine=InnoDB;
+set global innodb_file_per_table=1;
+### 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));
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx on worklog5743(a(2000));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+SET sql_mode= default;
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+0
+select a = repeat("b", 16000) from worklog5743;
+a = repeat("b", 16000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 17000) from worklog5743;
+a = repeat("x", 17000)
+1
+rollback;
+drop table worklog5743;
+### 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(1250));
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 10000));
+begin;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### 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;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx idx 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1`,(`test`.`worklog5743`.`a2` = repeat('a',10000)) AS `a2 = repeat("a", 10000)` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+9 1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9;
+a1 a2 = repeat("a", 10000)
+rollback;
+drop table worklog5743;
+### 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;
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx1 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 767 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 767 bytes
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_1(a2(4000));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+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 4030. 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 4030. 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 4030. 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 4030. 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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 4030. 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 1536 bytes
+Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 4030. 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 4030. 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 4030. 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 4030. 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 4030. 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx3 on worklog5743_4(a2(1537));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx4 on worklog5743_4(a2(1536));
+Warnings:
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release.
+show warnings;
+Level Code Message
+Warning 1831 Duplicate index 'idx4' defined on the table 'test.worklog5743_4'. This is deprecated and will be disallowed in a future release.
+create index idx5 on worklog5743_4(a1, a2(1533));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+create index idx6 on worklog5743_4(a1, a2(1532));
+show warnings;
+Level Code Message
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create index idx2 on worklog5743_8(a2(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx3 on worklog5743_8(a2(3072));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx4 on worklog5743_8(a1, a2(1533));
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+create index idx5 on worklog5743_8(a1, a2(1532));
+show warnings;
+Level Code Message
+SET sql_mode= default;
+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));
+set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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));
+set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+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
+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;
+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 @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1, left(a2, 20) from worklog5743_1 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_1 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_1`.`a1` AS `a1`,left(`test`.`worklog5743_1`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_1` where (`test`.`worklog5743_1`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_2 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_2 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_2`.`a1` AS `a1`,left(`test`.`worklog5743_2`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_2` where (`test`.`worklog5743_2`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_4 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_4 NULL ref idx6 idx6 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_4`.`a1` AS `a1`,left(`test`.`worklog5743_4`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_4` where (`test`.`worklog5743_4`.`a1` = 9)
+explain select a1, left(a2, 20) from worklog5743_8 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743_8 NULL ref idx5 idx5 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743_8`.`a1` AS `a1`,left(`test`.`worklog5743_8`.`a2`,20) AS `left(a2, 20)` from `test`.`worklog5743_8` where (`test`.`worklog5743_8`.`a1` = 9)
+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
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+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)
+rollback;
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+drop table worklog5743_8;
+### Test 5 ###
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 3072 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1537)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1536)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 1536));
+update worklog5743 set a1 = 1000;
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1533)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+ERROR 42000: Specified key was too long; max key length is 1536 bytes
+show warnings;
+Level Code Message
+Error 1071 Specified key was too long; max key length is 1536 bytes
+drop table worklog5743;
+create table worklog5743(a1 int, a2 varchar(1532)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+Level Code Message
+insert into worklog5743 values(9, repeat("a", 1532));
+update worklog5743 set a1 = 1000;
+begin;
+update worklog5743 set a1 = 1000;
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+explain select a1 from worklog5743 where a1 = 9;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE worklog5743 NULL ref idx1 idx1 5 const 1 100.00 Using index
+Warnings:
+Note 1003 /* select#1 */ select `test`.`worklog5743`.`a1` AS `a1` from `test`.`worklog5743` where (`test`.`worklog5743`.`a1` = 9)
+select a1 from worklog5743 where a1 = 9;
+a1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a1 from worklog5743 where a1 = 9;
+a1
+rollback;
+drop table worklog5743;
+### Test 6 ###
+create table worklog5743(a TEXT not null, primary key (a(1000)))
+row_format=compact;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
+create table worklog5743(a TEXT) 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 idx on worklog5743(a(767));
+insert into worklog5743 values(repeat("a", 20000));
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+select @@session.tx_isolation;
+@@session.tx_isolation
+REPEATABLE-READ
+select a = repeat("a", 20000) from worklog5743;
+a = repeat("a", 20000)
+1
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+@@session.tx_isolation
+READ-UNCOMMITTED
+select a = repeat("x", 25000) from worklog5743;
+a = repeat("x", 25000)
+1
+1
+rollback;
+drop table worklog5743;
+### Test 7 ###
+create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+SET sql_mode= '';
+Warnings:
+Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
+create index idx1 on worklog5743(a(3073));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+create index idx2 on worklog5743(a(3072));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 1536 bytes
+SET sql_mode= default;
+show create table worklog5743;
+Table Create Table
+worklog5743 CREATE TABLE `worklog5743` (
+ `a` text NOT NULL,
+ KEY `idx1` (`a`(1536)),
+ KEY `idx2` (`a`(1536))
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+drop table worklog5743;
+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_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result
new file mode 100644
index 00000000000..694de4d9c83
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum.result
@@ -0,0 +1,82 @@
+# Set the environmental variables
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
+SET GLOBAL innodb_file_per_table=on;
+CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
+CREATE INDEX idx1 ON tab1(c2(10));
+INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+insert into t1 values(1,"i");
+insert into t1 values(2,"am");
+insert into t1 values(3,"compressed table");
+# Shutdown the Server
+# Server Default checksum = innodb
+[1a]: check the innochecksum when file doesn't exists
+[1b]: check the innochecksum without --strict-check
+[2]: check the innochecksum with full form --strict-check=crc32
+[3]: check the innochecksum with short form -C crc32
+[4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
+[5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
+[6]: check the innochecksum with full form strict-check & no-check , an error is expected
+[7]: check the innochecksum with short form strict-check & no-check , an error is expected
+[8]: check the innochecksum with short & full form combination
+# strict-check & no-check, an error is expected
+[9]: check the innochecksum with full form --strict-check=innodb
+[10]: check the innochecksum with full form --strict-check=none
+# when server Default checksum=crc32
+[11]: check the innochecksum with short form -C innodb
+# when server Default checksum=crc32
+[12]: check the innochecksum with short form -C none
+# when server Default checksum=crc32
+[13]: check strict-check with invalid values
+[14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
+# Also check the long form of write option.
+[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
+# Also check the long form of write option.
+# start the server with innodb_checksum_algorithm=InnoDB
+# restart
+INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+# Stop the server
+[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
+# Also check the short form of write option.
+# Start the server with checksum algorithm=none
+# restart
+INSERT INTO tab1 VALUES(3, 'Innochecksum None');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+3 Innochecksum None
+DROP TABLE t1;
+# Stop the server
+[16]: rewrite into new checksum=crc32 with innochecksum
+# Restart the DB server with innodb_checksum_algorithm=crc32
+# restart
+SELECT * FROM tab1;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+3 Innochecksum None
+DELETE FROM tab1 where c1=3;
+SELECT c1,c2 FROM tab1 order by c1,c2;
+c1 c2
+1 Innochecksum InnoDB1
+2 Innochecksum CRC32
+# Stop server
+[17]: rewrite into new checksum=InnoDB
+# Restart the DB server with innodb_checksum_algorithm=InnoDB
+# restart
+DELETE FROM tab1 where c1=2;
+SELECT * FROM tab1;
+c1 c2
+1 Innochecksum InnoDB1
+# Stop server
+[18]:check Innochecksum with invalid write options
+# Restart the server
+# restart
+DROP TABLE tab1;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_2.result b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
new file mode 100644
index 00000000000..0b6adaa33a2
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
@@ -0,0 +1,140 @@
+SET GLOBAL innodb_compression_level=0;
+SELECT @@innodb_compression_level;
+@@innodb_compression_level
+0
+CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+INSERT INTO t1 SELECT * from t1;
+# stop the server
+[1]:# check the both short and long options for "help"
+[2]:# Run the innochecksum when file isn't provided.
+# It will print the innochecksum usage similar to --help option.
+innochecksum Ver #.#.#
+Copyright (c) YEAR, YEAR , Oracle and/or its affiliates. All rights reserved.
+
+Oracle is a registered trademark of Oracle Corporation and/or its
+affiliates. Other names may be trademarks of their respective
+owners.
+
+InnoDB offline file checksum utility.
+Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] <filename or [-]>
+ -?, --help Displays this help and exits.
+ -I, --info Synonym for --help.
+ -V, --version Displays version information and exits.
+ -v, --verbose Verbose (prints progress every 5 seconds).
+ -c, --count Print the count of pages in the file and exits.
+ -s, --start-page=# Start on this page number (0 based).
+ -e, --end-page=# End at this page number (0 based).
+ -p, --page=# Check only this page (0 based).
+ -C, --strict-check=name
+ Specify the strict checksum algorithm by the user.
+ -n, --no-check Ignore the checksum verification.
+ -a, --allow-mismatches=#
+ Maximum checksum mismatch allowed.
+ -w, --write=name Rewrite the checksum algorithm by the user.
+ -S, --page-type-summary
+ Display a count of each page type in a tablespace.
+ -D, --page-type-dump=name
+ Dump the page type info for each page in a tablespace.
+ -l, --log=name log output.
+
+Variables (--variable-name=value)
+and boolean options {FALSE|TRUE} Value (after reading options)
+--------------------------------- ----------------------------------------
+verbose FALSE
+count FALSE
+start-page 0
+end-page 0
+page 0
+strict-check crc32
+no-check FALSE
+allow-mismatches 0
+write crc32
+page-type-summary FALSE
+page-type-dump (No default value)
+log (No default value)
+[3]:# check the both short and long options for "count" and exit
+Number of pages:#
+Number of pages:#
+[4]:# Print the version of innochecksum and exit
+innochecksum Ver #.#.## Restart the DB server
+# restart
+DROP TABLE t1;
+[5]:# Check the innochecksum for compressed table t1 with different key_block_size
+# Test for KEY_BLOCK_SIZE=1
+===> Testing size=1
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test for KEY_BLOCK_SIZE=2
+===> Testing size=2
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test for for KEY_BLOCK_SIZE=4
+===> Testing size=4
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+set innodb_strict_mode=off;
+# Test for for KEY_BLOCK_SIZE=8
+===> Testing size=8
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+set innodb_strict_mode=off;
+# Test for KEY_BLOCK_SIZE=16
+===> Testing size=16
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+insert into t1 values(1,"I");
+insert into t1 values(2,"AM");
+insert into t1 values(3,"COMPRESSED");
+# restart
+select * from t1;
+id msg
+1 I
+2 AM
+3 COMPRESSED
+drop table t1;
+# Test[5] completed
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
new file mode 100644
index 00000000000..85058c41e04
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -0,0 +1,184 @@
+# Set the environmental variables
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+SET GLOBAL innodb_file_per_table=on;
+[1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
+CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
+linestring_key GEOMETRY NOT NULL,
+linestring_nokey GEOMETRY NOT NULL)
+ENGINE=InnoDB ;
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
+CREATE INDEX linestring_index ON tab1(linestring_nokey(5));
+ALTER TABLE tab1 ADD KEY (linestring_key(5));
+# create a compressed table
+CREATE TABLE tab2(col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 int )
+engine = innodb row_format=compressed key_block_size=4;
+CREATE INDEX idx1 ON tab2(col_3(10));
+CREATE INDEX idx2 ON tab2(col_4(10));
+CREATE INDEX idx3 ON tab2(col_5(10));
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,5);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,4);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,3);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,2);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,1);
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
+: start the server with innodb_checksum_algorithm=strict_innodb
+# restart
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,6);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
+# start the server with innodb_checksum_algorithm=strict_crc32
+# restart
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
+ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
+SET @col_1 = repeat('g', 5);
+SET @col_2 = repeat('h', 20);
+SET @col_3 = repeat('i', 100);
+SET @col_4 = repeat('j', 100);
+SET @col_5 = repeat('k', 100);
+SET @col_6 = repeat('l', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,7);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
+# restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
+SET @col_1 = repeat('m', 5);
+SET @col_2 = repeat('n', 20);
+SET @col_3 = repeat('o', 100);
+SET @col_4 = repeat('p', 100);
+SET @col_5 = repeat('q', 100);
+SET @col_6 = repeat('r', 100);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,8);
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+SELECT * FROM tab2 ORDER BY col_7;
+# stop the server
+[2]: Check the page type summary with shortform for tab1.ibd
+
+File::tab#.ibd
+================PAGE TYPE SUMMARY==============
+#PAGE_COUNT PAGE_TYPE
+===============================================
+ # Index page
+ # Undo log page
+ # Inode page
+ # Insert buffer free list page
+ # Freshly allocated page
+ # Insert buffer bitmap
+ # System page
+ # Transaction system page
+ # File Space Header
+ # Extent descriptor page
+ # BLOB page
+ # Compressed BLOB page
+ # Other type of page
+===============================================
+Additional information:
+Undo page type: # insert, # update, # other
+Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+[3]: Check the page type summary with longform for tab1.ibd
+
+File::tab#.ibd
+================PAGE TYPE SUMMARY==============
+#PAGE_COUNT PAGE_TYPE
+===============================================
+ # Index page
+ # Undo log page
+ # Inode page
+ # Insert buffer free list page
+ # Freshly allocated page
+ # Insert buffer bitmap
+ # System page
+ # Transaction system page
+ # File Space Header
+ # Extent descriptor page
+ # BLOB page
+ # Compressed BLOB page
+ # Other type of page
+===============================================
+Additional information:
+Undo page type: # insert, # update, # other
+Undo page state: # active, # cached, # to_free, # to_purge, # prepared, # other
+[4]: Page type dump for with longform for tab1.ibd
+# Print the contents stored in dump.txt
+
+
+Filename::tab#.ibd
+==============================================================================
+ PAGE_NO | PAGE_TYPE | EXTRA INFO
+==============================================================================
+#:: # | File Space Header | -
+#:: # | Insert Buffer Bitmap | -
+#:: # | Inode page | -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Freshly allocated page | -
+[5]: Page type dump for with shortform for tab1.ibd
+
+
+Filename::tab#.ibd
+==============================================================================
+ PAGE_NO | PAGE_TYPE | EXTRA INFO
+==============================================================================
+#:: # | File Space Header | -
+#:: # | Insert Buffer Bitmap | -
+#:: # | Inode page | -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Index page | index id=#, page level=#, No. of records=#, garbage=#, -
+#:: # | Freshly allocated page | -
+[6]: check the valid lower bound values for option
+# allow-mismatches,page,start-page,end-page
+[7]: check the negative values for option
+# allow-mismatches,page,start-page,end-page.
+# They will reset to zero for negative values.
+# check the invalid lower bound values
+[8]: check the valid upper bound values for
+# both short and long options "allow-mismatches" and "end-page"
+[9]: check the both short and long options "page" and "start-page" when
+# seek value is larger than file size.
+[34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
+# innochecksum will fail with error code: 1
+# Restart the server
+# restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB
+DROP TABLE tab1;
+DROP TABLE tab2;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
index fe3d799229d..1b92eb71fba 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-create-options.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
@@ -1,5 +1,7 @@
SET default_storage_engine=InnoDB;
SET GLOBAL innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
SET SESSION innodb_strict_mode = ON;
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
@@ -45,7 +47,7 @@ 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 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
SHOW WARNINGS;
@@ -54,7 +56,7 @@ 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
+t1 Dynamic
# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1;
@@ -244,7 +246,7 @@ 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 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
@@ -264,6 +266,8 @@ Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
# and that they can be set to default values during strict mode.
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
@@ -324,15 +328,19 @@ Level Code Message
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;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
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.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -348,6 +356,8 @@ ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
# innodb_file_per_table=OFF and that they can be set to default
@@ -427,7 +437,7 @@ 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 Compact
+t1 Dynamic
SET GLOBAL innodb_file_per_table=ON;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
@@ -451,13 +461,13 @@ SET SESSION innodb_strict_mode = OFF;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
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
+t1 Dynamic row_format=FIXED
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
SHOW WARNINGS;
@@ -488,16 +498,16 @@ 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 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
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
+t1 Dynamic row_format=FIXED
# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
DROP TABLE IF EXISTS t1;
@@ -562,14 +572,14 @@ CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
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
+t1 Dynamic row_format=FIXED key_block_size=1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( i INT );
ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
@@ -728,7 +738,7 @@ 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 Compact
+t1 Dynamic
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SHOW WARNINGS;
Level Code Message
@@ -746,7 +756,7 @@ Level Code Message
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
+t1 Dynamic key_block_size=15
# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
@@ -758,22 +768,26 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Compressed row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Antelope;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
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.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
SHOW WARNINGS;
Level Code Message
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.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
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
+t1 Dynamic row_format=COMPRESSED key_block_size=1
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
@@ -788,18 +802,17 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Antelope;
-ALTER TABLE t1 ADD COLUMN f1 INT;
Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+ALTER TABLE t1 ADD COLUMN f1 INT;
SHOW WARNINGS;
Level Code Message
-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
+t1 Dynamic row_format=DYNAMIC
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
Level Code Message
@@ -853,3 +866,5 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
# Cleanup
DROP TABLE IF EXISTS t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index 318f65d49c3..47215a1e077 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
@@ -9,11 +9,13 @@ 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`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @@global.innodb_stats_on_metadata=ON;
create table t0(a int primary key) engine=innodb row_format=compressed;
Warnings:
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
Warnings:
@@ -21,11 +23,8 @@ 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.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t1(a int primary key) engine=innodb row_format=dynamic;
-Warnings:
-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;
@@ -46,6 +45,8 @@ Warnings:
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`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t7(a int primary key) engine=innodb
key_block_size=1 row_format=redundant;
Warnings:
@@ -54,7 +55,7 @@ create table t8(a int primary key) engine=innodb
key_block_size=1 row_format=fixed;
Warnings:
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
create table t9(a int primary key) engine=innodb
key_block_size=1 row_format=compact;
Warnings:
@@ -74,21 +75,21 @@ Warnings:
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 {valid} 0
-mysqltest_innodb_zip t00 Compact {valid} 0
-mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t0 Dynamic {valid} 0
+mysqltest_innodb_zip t00 Dynamic {valid} 0
+mysqltest_innodb_zip t1 Dynamic {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 {valid} 0
-mysqltest_innodb_zip t14 Compact {valid} 0
+mysqltest_innodb_zip t14 Dynamic {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 t4 Dynamic {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 t8 Dynamic {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;
@@ -138,7 +139,7 @@ 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 {valid} 0
+mysqltest_innodb_zip t2 Dynamic {valid} 0
drop table t1,t2;
create table t1( c1 int not null, c2 blob, c3 blob, c4 blob,
primary key(c1, c2(22), c3(22)))
@@ -160,10 +161,14 @@ count(*)
update t1 set c3 = repeat('E', 20000) where c1 = 1;
drop table t1;
set global innodb_file_format=`0`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Antelope
set global innodb_file_format=`1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format;
@@innodb_file_format
Barracuda
@@ -172,7 +177,11 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2'
set global innodb_file_format=`-1`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1'
set global innodb_file_format=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format=`Cheetah`;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah'
set global innodb_file_format=`abc`;
@@ -183,6 +192,8 @@ set global innodb_file_format=``;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of ''
set global innodb_file_per_table = on;
set global innodb_file_format = `1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode = off;
create table t1 (id int primary key) engine = innodb key_block_size = 0;
drop table t1;
@@ -204,7 +215,7 @@ 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 engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
-mysqltest_innodb_zip t1 Compact {valid} 0
+mysqltest_innodb_zip t1 Dynamic {valid} 0
mysqltest_innodb_zip t10 Compact {valid} 0
mysqltest_innodb_zip t11 Redundant {valid} 0
mysqltest_innodb_zip t3 Compressed 1024 0
@@ -320,6 +331,8 @@ mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
@@ -363,16 +376,22 @@ mysqltest_innodb_zip t8 Compact {valid} 0
mysqltest_innodb_zip t9 Redundant {valid} 0
drop table t8, t9;
set global innodb_file_per_table=1;
-set global innodb_file_format=Antelope;
+set global innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_format_max=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table normal_table (
c1 int
) engine = innodb;
select @@innodb_file_format_max;
@@innodb_file_format_max
-Antelope
+Barracuda
create table zip_table (
c1 int
) engine = innodb key_block_size = 4;
@@ -380,6 +399,8 @@ select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
set global innodb_file_format_max=`Antelope`;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@innodb_file_format_max;
@@innodb_file_format_max
Antelope
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
index aa80e4d7aa4..161cef10ad5 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
@@ -1,2 +1,5 @@
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
index f4393e8fae0..5ba26753ea6 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
@@ -1,4 +1,6 @@
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
@@ -126,5 +128,7 @@ Warning 1264 Out of range value for column 'col78' at row 1
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_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
index dbebb9d2d33..3b10942c2de 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
@@ -1,5 +1,8 @@
SET GLOBAL innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
ENGINE=InnoDB KEY_BLOCK_SIZE=1;
@@ -9,5 +12,8 @@ SHOW WARNINGS;
Level Code Message
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_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
index 40c39d21243..92b589c6b7e 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
@@ -1,5 +1,7 @@
SET GLOBAL tx_isolation='REPEATABLE-READ';
SET GLOBAL innodb_file_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug56680(
a INT AUTO_INCREMENT PRIMARY KEY,
@@ -119,3 +121,5 @@ Table Op Msg_type Msg_text
test.bug56680_2 check status OK
DROP TABLE bug56680_2;
DROP TABLE bug56680;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
index 1f6d6948756..11e90b9e7d6 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result
@@ -1,5 +1,7 @@
set global innodb_file_per_table=on;
set global innodb_file_format=`1`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1(a text) engine=innodb key_block_size=8;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
@@ -12,3 +14,5 @@ create table t2(a text) engine=innodb;
SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0;
page_size
drop table t2;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
index f11988034ad..f69fa5c7659 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
@@ -1,7 +1,13 @@
SET default_storage_engine=InnoDB;
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
set global innodb_file_format="Barracuda";
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_strict_mode=1;
### Test 1 ###
create table worklog5743(a TEXT not null, primary key (a(1000))) ROW_FORMAT=DYNAMIC;
show warnings;
@@ -97,6 +103,8 @@ 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
@@ -104,6 +112,8 @@ 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
@@ -127,6 +137,8 @@ create index idx6 on worklog5743_1(a1, a2(428));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_2(a2(4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -134,6 +146,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
@@ -157,6 +171,8 @@ create index idx6 on worklog5743_2(a1, a2(940));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_4(a2(4000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -164,6 +180,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
@@ -187,6 +205,8 @@ create index idx6 on worklog5743_4(a1, a2(1964));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_8(a2(1000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -194,6 +214,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_8(a2(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
@@ -223,6 +245,8 @@ create index idx7 on worklog5743_8(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx1 on worklog5743_16(a2(1000));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
@@ -230,6 +254,8 @@ show warnings;
Level Code Message
Warning 1071 Specified key was too long; max key length is 767 bytes
set global innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create index idx2 on worklog5743_16(a2(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
@@ -264,12 +290,16 @@ 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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select a1, left(a2, 20) from worklog5743_1;
a1 left(a2, 20)
9 aaaaaaaaaaaaaaaaaaaa
@@ -444,9 +474,9 @@ connection default;
rollback;
drop table worklog5743;
### Test 6 ###
-create table worklog5743(a TEXT not null, primary key (a(1000)));
+create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes.
-create table worklog5743(a TEXT);
+create table worklog5743(a TEXT) 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 idx on worklog5743(a(767));
@@ -499,9 +529,14 @@ 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_format=Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=1;
-SET GLOBAL innodb_large_prefix=0;
+SET GLOBAL innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET GLOBAL innodb_strict_mode = DEFAULT;
connection con1;
disconnect con1;
connection con2;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
deleted file mode 100644
index 7d52ab135b3..00000000000
--- a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result
+++ /dev/null
@@ -1,1396 +0,0 @@
-set global innodb_file_format="Barracuda";
-set global innodb_file_per_table=1;
-set global innodb_large_prefix=1;
-DROP TABLE IF EXISTS worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_varchar PRIMARY 3072 BTREE
-col_1_varchar prefix_idx 3072 BTREE
-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;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varchar = REPEAT("c", 4000)
-1
-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;
-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) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_text PRIMARY 3072 BTREE
-col_1_text prefix_idx 3072 BTREE
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT ,
-PRIMARY KEY (col_1_mediumtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_mediumtext = REPEAT("a", 4000) col_2_mediumtext = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000)
-WHERE col_1_mediumtext = REPEAT("a", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumtext = REPEAT("c", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-col_1_mediumtext = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743;
-col_1_mediumtext = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_longtext LONGTEXT , col_2_longtext LONGTEXT ,
-PRIMARY KEY (col_1_longtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_longtext = REPEAT("a", 4000) col_2_longtext = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000)
-WHERE col_1_longtext = REPEAT("a", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longtext = REPEAT("c", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-col_1_longtext = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743;
-col_1_longtext = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072));
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_blob PRIMARY 3072 BTREE
-col_1_blob prefix_idx 3072 BTREE
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB ,
-PRIMARY KEY (col_1_mediumblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_mediumblob = REPEAT("a", 4000) col_2_mediumblob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000)
-WHERE col_1_mediumblob = REPEAT("a", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumblob = REPEAT("c", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-col_1_mediumblob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743;
-col_1_mediumblob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_longblob LONGBLOB , col_2_longblob LONGBLOB ,
-PRIMARY KEY (col_1_longblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_longblob = REPEAT("a", 4000) col_2_longblob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000)
-WHERE col_1_longblob = REPEAT("a", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longblob = REPEAT("c", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-col_1_longblob = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743;
-col_1_longblob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-col_1_varbinary = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255),
-col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255),
-col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255),
-col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255),
-col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250),
-col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250),
-col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250),
-col_11_char(250),col_12_char(250),col_13_char(72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743;
-col_1_char = REPEAT("a", 255) col_2_char = REPEAT("o", 255)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_char = REPEAT("c", 255)
-WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255);
-col_1_char = REPEAT("c", 255)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743;
-col_1_char = REPEAT("c", 255)
-1
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255),
-col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255),
-col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255),
-col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255),
-col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250),
-col_3_binary (250),col_4_binary (250),col_5_binary (250),
-col_6_binary (250),col_7_binary (250),col_8_binary (250),
-col_9_binary (250),col_10_binary (250),col_11_binary (250),
-col_12_binary (250),col_13_binary (72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743;
-col_1_binary = REPEAT("a", 255) col_2_binary = REPEAT("o", 255)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255)
-WHERE col_1_binary = REPEAT("a", 255)
-AND col_2_binary = REPEAT("o", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_binary = REPEAT("c", 255)
-AND col_2_binary = REPEAT("o", 255);
-col_1_binary = REPEAT("c", 255)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743;
-col_1_binary = REPEAT("c", 255)
-1
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743_key2 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 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_key2
-WHERE col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 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("b", 3500) FROM worklog5743_key4
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 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("b", 3500) FROM worklog5743_key8
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-col_1_varchar = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key8;
-CREATE TABLE worklog5743_key2 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key8;
-CREATE TABLE worklog5743_key2 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key2;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key2;
-CREATE TABLE worklog5743_key4 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key4;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743_key4;
-CREATE TABLE worklog5743_key8 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key8;
-col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-col_1_blob = REPEAT("b", 3500)
-0
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8;
-col_1_blob = REPEAT("c", 4000)
-0
-1
-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_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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varbinary = REPEAT("c", 4000)
-1
-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;
-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) ,
-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;
-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));
-START TRANSACTION;
-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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-ROLLBACK;
-START TRANSACTION;
-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)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-START TRANSACTION;
-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)
-);
-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)
-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;
-col_1_varbinary = REPEAT("c", 4000)
-0
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) CHARACTER SET 'utf8',
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-col_1_text = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-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;
-ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) ,
-col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8',
-col_3_text TEXT (4000) CHARACTER SET 'utf8',
-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;
-CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500));
-CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500));
-START TRANSACTION;
-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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-ROLLBACK;
-START TRANSACTION;
-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)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-START TRANSACTION;
-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)
-);
-ROLLBACK;
-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)
-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;
-col_1_varbinary = REPEAT("c", 4000)
-0
-0
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("स", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000)
-WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("क", 4000)
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743;
-col_1_text = REPEAT("क", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connect con1,localhost,root,,;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-connect con2,localhost,root,,;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-0 1
-connection con1;
-select @@session.tx_isolation;
-@@session.tx_isolation
-REPEATABLE-READ
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-@@session.tx_isolation
-READ-UNCOMMITTED
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-1 1
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-START TRANSACTION;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-connection con2;
-COMMIT;
-connection con1;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connection con1;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-START TRANSACTION;
-connection con2;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-0 1
-COMMIT;
-connection con1;
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-@@session.tx_isolation
-READ-UNCOMMITTED
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-1 1
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-connection con1;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-1 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-START TRANSACTION;
-connection con2;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200)
-0 1
-ROLLBACK;
-connection con1;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200)
-0 1
-SELECT COUNT(*) FROM worklog5743;
-COUNT(*)
-1
-COMMIT;
-disconnect con1;
-connection con2;
-disconnect con2;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-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;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varchar = REPEAT("c", 4000)
-1
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT tbl1.col_1_varchar = tbl2.col_1_varchar
-FROM worklog5743 tbl1 , worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ;
-tbl1.col_1_varchar = tbl2.col_1_varchar
-1
-1
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE
-col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2)
-AND col_1_varchar = REPEAT("c", 4000);
-tbl1.col_1_varchar = REPEAT("c", 4000)
-1
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar != tbl2.col_1_varchar
-) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar
-) ;
-tbl1.col_1_varchar = REPEAT("c", 4000)
-0
-0
-1
-SELECT
-REVERSE(col_1_varchar) = REPEAT("c", 4000) ,
-REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-REVERSE(col_1_varchar) = REPEAT("c", 4000) REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000)
-0 0
-0 0
-1 1
-SELECT
-UPPER(col_1_varchar) = REPEAT("c", 4000) ,
-UPPER(col_1_varchar) = REPEAT("C", 4000) ,
-LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-UPPER(col_1_varchar) = REPEAT("c", 4000) UPPER(col_1_varchar) = REPEAT("C", 4000) LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000)
-0 0 0
-0 0 0
-1 1 1
-SELECT
-col_1_varchar = REPEAT("c", 4000)
-FROM worklog5743 WHERE col_1_varchar like '%c__%';
-col_1_varchar = REPEAT("c", 4000)
-1
-SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ;
-SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10)
-kkkkaaaaaa
-kkkkbbbbbb
-kkkkcccccc
-SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ;
-CONCAT(SUBSTRING(col_1_varchar,-5,3),'append')
-aaaappend
-bbbappend
-cccappend
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) ,
-col_2_varchar VARCHAR (4000) ,
-UNIQUE INDEX (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-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));
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE
-FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE
-col_1_varchar col_1_varchar 3072 BTREE
-SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL;
-col_1_varchar
-NULL
-NULL
-SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000))
-FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1;
-col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000))
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varchar = REPEAT("c", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-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;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varchar = REPEAT("c", 4000)
-1
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000)
-1 1
-0 0
-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);
-col_1_varchar = REPEAT("c", 4000)
-1
-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));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-col_1_varchar = REPEAT("c", 4000)
-0
-1
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) ,
-PRIMARY KEY (col_1_varchar (3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-connect con1,localhost,root,,;
-connection con1;
-SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500)
-FROM worklog5743;
-col_1_varchar = REPEAT("c", 3500) col_2_varchar = REPEAT("o", 3500)
-1 1
-connection default;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500));
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-col_1_varchar = REPEAT("b", 3500)
-0
-0
-COMMIT;
-connection con1;
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500)
-WHERE col_1_varchar = REPEAT("a", 3500)
-AND col_2_varchar = REPEAT("o", 3500);
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-col_1_varchar = REPEAT("b", 3500)
-1
-0
-connection default;
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500);
-SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("p", 3500);
-col_1_varchar = REPEAT("a", 3500)
-0
-connection con1;
-COMMIT;
-connection default;
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("b", 4000)
-AND col_2_varbinary = REPEAT("p", 4000);
-col_1_varbinary = REPEAT("b", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000));
-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)
-1
-0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-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
-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)
-1
-0
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-col_1_varbinary = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(500))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000);
-col_1_text = REPEAT("b", 4000)
-1
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000));
-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)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-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
-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)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000)
-1 1
-0 0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-1
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000)
-AND col_2_text = REPEAT("p", 4000);
-col_1_text = REPEAT("b", 4000)
-1
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700));
-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)
-1
-0
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-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 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)
-0
-1
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-col_1_text = REPEAT("c", 4000)
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073));
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073));
-ERROR 42000: Specified key was too long; max key length is 3072 bytes
-DROP TABLE worklog5743;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-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));
-ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
-ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY'
-DROP TABLE worklog5743;
-set global innodb_large_prefix=0;
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ERROR 42000: Specified key was too long; max key length is 767 bytes
-set global innodb_large_prefix=0;
-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
-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,
- `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;
-connection default;
diff --git a/mysql-test/suite/innodb_zip/r/large_blob.result b/mysql-test/suite/innodb_zip/r/large_blob.result
new file mode 100644
index 00000000000..7070d610f58
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/large_blob.result
@@ -0,0 +1,83 @@
+#
+# This tests the use of large blobs in InnoDB.
+#
+call mtr.add_suppression("InnoDB: Warning: a long semaphore wait");
+SET GLOBAL innodb_file_per_table = OFF;
+#
+# System tablespace, Row Format = Redundant
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# System tablespace, Row Format = Compact
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+SET GLOBAL innodb_file_per_table = ON;
+#
+# Separate tablespace, Row Format = Redundant
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compact
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compressed, Key Block Size = 2k
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Compressed, Key Block Size = 1k
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+#
+# Separate tablespace, Row Format = Dynamic
+#
+CREATE TABLE t1 (
+c1 INT DEFAULT NULL,
+c2 LONGBLOB NOT NULL,
+KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result
new file mode 100644
index 00000000000..5645b1ee310
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/restart.result
@@ -0,0 +1,1236 @@
+SET default_storage_engine=InnoDB;
+#
+# A series of tests to make sure tables are opened after restart.
+# Bug#13357607 Compressed file-per-table tablespaces fail to open
+#
+set global innodb_file_per_table=on;
+#
+# Create and insert records into a REDUNDANT row formatted table.
+#
+CREATE TABLE t1_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
+INSERT INTO t1_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+SHOW CREATE TABLE t1_restart;
+Table Create Table
+t1_restart CREATE TABLE `t1_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+SELECT count(*) FROM t1_restart;
+count(*)
+16
+#
+# Create and insert records into a COMPACT row formatted table.
+#
+CREATE TABLE t2_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPACT ENGINE=InnoDB;
+INSERT INTO t2_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t2_restart;
+Table Create Table
+t2_restart CREATE TABLE `t2_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT count(*) FROM t2_restart;
+count(*)
+16
+#
+# Create and insert records into a COMPRESSED row formatted table.
+#
+CREATE TABLE t3_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB;
+INSERT INTO t3_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+SHOW CREATE TABLE t3_restart;
+Table Create Table
+t3_restart CREATE TABLE `t3_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+SELECT count(*) FROM t3_restart;
+count(*)
+16
+#
+# Create and insert records into a DYNAMIC row formatted table.
+#
+CREATE TABLE t4_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB;
+INSERT INTO t4_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SELECT count(*) FROM t4_restart;
+count(*)
+16
+#
+# Create and insert records into a table that uses a remote DATA DIRECTORY.
+#
+CREATE TABLE t5_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t5_restart;
+count(*)
+16
+#
+# Create and insert records into a partitioned table that uses
+# a remote DATA DIRECTORY for each partition.
+#
+CREATE TABLE t6_restart(
+c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB
+PARTITION BY HASH(c1) (
+PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir');
+INSERT INTO t6_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB) */
+SELECT count(*) FROM t6_restart;
+count(*)
+16
+#
+# Create and insert records into a subpartitioned table that uses
+# a remote DATA DIRECTORY for each subpartition.
+#
+CREATE TABLE t7_restart(
+c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB
+PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
+PARTITION p0 VALUES LESS THAN (10) (
+SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'),
+PARTITION p1 VALUES LESS THAN MAXVALUE (
+SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'));
+INSERT INTO t7_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB)) */
+SELECT count(*) FROM t7_restart;
+count(*)
+16
+#
+# Create and insert records into a table that uses a general tablespace.
+#
+CREATE TABLESPACE s1_restart ADD DATAFILE 's1_restart.ibd';
+CREATE TABLE t8_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=COMPACT ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t8_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t8_restart;
+Table Create Table
+t8_restart CREATE TABLE `t8_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SELECT count(*) FROM t8_restart;
+count(*)
+65
+CREATE TABLE t9_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t9_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t9_restart;
+Table Create Table
+t9_restart CREATE TABLE `t9_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SELECT count(*) FROM t9_restart;
+count(*)
+65
+#
+# Show these tables in information_schema.
+#
+=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
+Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
+test/t1_restart test/t1_restart 0 8 Redundant 0 Single
+test/t2_restart test/t2_restart 1 8 Compact 0 Single
+test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
+test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
+test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+test/t8_restart s1_restart 129 8 Compact 0 General
+test/t9_restart s1_restart 161 8 Dynamic 0 General
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart General DEFAULT 0 Any MYSQLD_DATADIR/s1_restart.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
+#
+# Shutdown the server and list the tablespace OS files
+#
+---- MYSQL_DATA_DIR/test
+t1_restart.frm
+t1_restart.ibd
+t2_restart.frm
+t2_restart.ibd
+t3_restart.frm
+t3_restart.ibd
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.isl
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+t8_restart.frm
+t9_restart.frm
+---- MYSQL_TMP_DIR/alt_dir
+test
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Start the server and show that tables are still visible and accessible.
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+SHOW CREATE TABLE t1_restart;
+Table Create Table
+t1_restart CREATE TABLE `t1_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+SHOW CREATE TABLE t2_restart;
+Table Create Table
+t2_restart CREATE TABLE `t2_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t3_restart;
+Table Create Table
+t3_restart CREATE TABLE `t3_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+SHOW CREATE TABLE t8_restart;
+Table Create Table
+t8_restart CREATE TABLE `t8_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+SHOW CREATE TABLE t9_restart;
+Table Create Table
+t9_restart CREATE TABLE `t9_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t8_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t9_restart);
+SELECT count(*) FROM t1_restart;
+count(*)
+32
+SELECT count(*) FROM t2_restart;
+count(*)
+32
+SELECT count(*) FROM t3_restart;
+count(*)
+32
+SELECT count(*) FROM t4_restart;
+count(*)
+32
+SELECT count(*) FROM t5_restart;
+count(*)
+32
+SELECT count(*) FROM t6_restart;
+count(*)
+32
+SELECT count(*) FROM t7_restart;
+count(*)
+32
+SELECT count(*) FROM t8_restart;
+count(*)
+130
+SELECT count(*) FROM t9_restart;
+count(*)
+130
+#
+# Show these tables in information_schema.
+#
+=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
+Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
+test/t1_restart test/t1_restart 0 8 Redundant 0 Single
+test/t2_restart test/t2_restart 1 8 Compact 0 Single
+test/t3_restart test/t3_restart 37 8 Compressed 2048 Single
+test/t4_restart test/t4_restart 33 8 Dynamic 0 Single
+test/t5_restart test/t5_restart 97 8 Dynamic 0 Single
+test/t6_restart#p#p0 test/t6_restart#p#p0 101 8 Compressed 2048 Single
+test/t6_restart#p#p1 test/t6_restart#p#p1 101 8 Compressed 2048 Single
+test/t6_restart#p#p2 test/t6_restart#p#p2 101 8 Compressed 2048 Single
+test/t7_restart#p#p0#sp#s0 test/t7_restart#p#p0#sp#s0 97 8 Dynamic 0 Single
+test/t7_restart#p#p0#sp#s1 test/t7_restart#p#p0#sp#s1 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s2 test/t7_restart#p#p1#sp#s2 97 8 Dynamic 0 Single
+test/t7_restart#p#p1#sp#s3 test/t7_restart#p#p1#sp#s3 97 8 Dynamic 0 Single
+test/t8_restart s1_restart 129 8 Compact 0 General
+test/t9_restart s1_restart 161 8 Dynamic 0 General
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart General DEFAULT 0 Any MYSQLD_DATADIR/s1_restart.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t1_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t1_restart.ibd
+test/t2_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2_restart.ibd
+test/t3_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3_restart.ibd
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
+DROP TABLE t1_restart;
+DROP TABLE t2_restart;
+DROP TABLE t3_restart;
+DROP TABLE t8_restart;
+DROP TABLE t9_restart;
+DROP TABLESPACE s1_restart;
+#
+# Truncate the remote tablespaces.
+#
+TRUNCATE TABLE t5_restart;
+ALTER TABLE t6_restart TRUNCATE PARTITION p2;
+ALTER TABLE t7_restart TRUNCATE PARTITION p1;
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+SELECT count(*) FROM t5_restart;
+count(*)
+8
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000012 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t6_restart;
+count(*)
+21
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SELECT count(*) FROM t7_restart;
+count(*)
+9
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server and make a backup of a tablespace
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.frm.bak
+t5_restart.isl
+t5_restart.isl.bak
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t5_restart.ibd.bak
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Start the server and show the tablespaces.
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t5_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd
+test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd
+test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd
+test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd
+test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd
+test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd
+test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd
+test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd
+SELECT count(*) FROM t5_restart;
+count(*)
+8
+SHOW CREATE TABLE t5_restart;
+Table Create Table
+t5_restart CREATE TABLE `t5_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000009 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+SELECT count(*) FROM t6_restart;
+count(*)
+21
+SHOW CREATE TABLE t6_restart;
+Table Create Table
+t6_restart CREATE TABLE `t6_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+SELECT count(*) FROM t7_restart;
+count(*)
+9
+SHOW CREATE TABLE t7_restart;
+Table Create Table
+t7_restart CREATE TABLE `t7_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Try to rename a tablespace to a file that already exists
+#
+RENAME TABLE t5_restart TO t55_restart;
+ERROR 42S01: Table 't55_restart' already exists
+RENAME TABLE t5_restart TO t55_restart;
+ERROR HY000: Error on rename of './test/t5_restart' to './test/t55_restart' (errno: 184 - Tablespace already exists)
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t5_restart.frm
+t5_restart.isl
+t6_restart#p#p0.isl
+t6_restart#p#p1.isl
+t6_restart#p#p2.isl
+t6_restart.frm
+t7_restart#p#p0#sp#s0.isl
+t7_restart#p#p0#sp#s1.isl
+t7_restart#p#p1#sp#s2.isl
+t7_restart#p#p1#sp#s3.isl
+t7_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t5_restart.ibd
+t6_restart#p#p0.ibd
+t6_restart#p#p1.ibd
+t6_restart#p#p2.ibd
+t7_restart#p#p0#sp#s0.ibd
+t7_restart#p#p0#sp#s1.ibd
+t7_restart#p#p1#sp#s2.ibd
+t7_restart#p#p1#sp#s3.ibd
+#
+# Rename file table and tablespace
+#
+RENAME TABLE t5_restart TO t55_restart;
+RENAME TABLE t6_restart TO t66_restart;
+RENAME TABLE t7_restart TO t77_restart;
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+16
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000024 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+42
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+18
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+#
+# Restart the server
+#
+# restart
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+Variable_name Value
+innodb_file_per_table ON
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+32
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000048 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+84
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+36
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server
+#
+#
+# Move the remote tablespaces to a new location and change the ISL files
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+---- MYSQL_TMP_DIR/new_dir/test
+# Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't55_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't66_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+# Moving tablespace 't77_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.isl
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/alt_dir/test
+---- MYSQL_TMP_DIR/new_dir/test
+t4_restart.ibd
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+#
+# Start the server and check tablespaces.
+#
+# restart
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+count(*)
+64
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000099 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+64
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000096 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/new_dir/'
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+168
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+72
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+ SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB)) */
+#
+# Shutdown the server
+#
+#
+# Move the remote tablespaces back to the default datadir and delete the ISL file.
+#
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.isl
+t55_restart.frm
+t55_restart.isl
+t66_restart#p#p0.isl
+t66_restart#p#p1.isl
+t66_restart#p#p2.isl
+t66_restart.frm
+t77_restart#p#p0#sp#s0.isl
+t77_restart#p#p0#sp#s1.isl
+t77_restart#p#p1#sp#s2.isl
+t77_restart#p#p1#sp#s3.isl
+t77_restart.frm
+---- MYSQL_TMP_DIR/new_dir/test
+t4_restart.ibd
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+# Moving 't4_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't55_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't66_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+# Moving 't77_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+---- MYSQL_DATA_DIR/test
+t4_restart.frm
+t4_restart.ibd
+t55_restart.frm
+t55_restart.ibd
+t66_restart#p#p0.ibd
+t66_restart#p#p1.ibd
+t66_restart#p#p2.ibd
+t66_restart.frm
+t77_restart#p#p0#sp#s0.ibd
+t77_restart#p#p0#sp#s1.ibd
+t77_restart#p#p1#sp#s2.ibd
+t77_restart#p#p1#sp#s3.ibd
+t77_restart.frm
+---- MYSQL_TMP_DIR/new_dir/test
+#
+# Start the server and check tablespaces.
+#
+# restart
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
+test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+=== information_schema.files ===
+Space_Name File_Type Engine Status Tablespace_Name Path
+test/t4_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t4_restart.ibd
+test/t55_restart TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t55_restart.ibd
+test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p0.ibd
+test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p1.ibd
+test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t66_restart#p#p2.ibd
+test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd
+test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd
+test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd
+test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+count(*)
+128
+SHOW CREATE TABLE t4_restart;
+Table Create Table
+t4_restart CREATE TABLE `t4_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000195 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+count(*)
+128
+SHOW CREATE TABLE t55_restart;
+Table Create Table
+t55_restart CREATE TABLE `t55_restart` (
+ `c1` double NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000000192 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+count(*)
+336
+SHOW CREATE TABLE t66_restart;
+Table Create Table
+t66_restart CREATE TABLE `t66_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
+/*!50100 PARTITION BY HASH (c1)
+(PARTITION p0 ENGINE = InnoDB,
+ PARTITION p1 ENGINE = InnoDB,
+ PARTITION p2 ENGINE = InnoDB) */
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+count(*)
+144
+SHOW CREATE TABLE t77_restart;
+Table Create Table
+t77_restart CREATE TABLE `t77_restart` (
+ `c1` int(11) NOT NULL AUTO_INCREMENT,
+ `c2` char(10) DEFAULT NULL,
+ `c3` varchar(100) DEFAULT NULL,
+ `c4` date DEFAULT NULL,
+ `c5` text,
+ PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 ENGINE = InnoDB,
+ SUBPARTITION s1 ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 ENGINE = InnoDB,
+ SUBPARTITION s3 ENGINE = InnoDB)) */
+#
+# Cleanup
+#
+DROP TABLE t4_restart;
+DROP TABLE t55_restart;
+DROP TABLE t66_restart;
+DROP TABLE t77_restart;
diff --git a/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result
new file mode 100644
index 00000000000..5cdfe162b6a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result
@@ -0,0 +1,135 @@
+USE test;
+DROP TABLE IF EXISTS tab5;
+Warnings:
+Note 1051 Unknown table 'test.tab5'
+DROP TABLE IF EXISTS tab6;
+Warnings:
+Note 1051 Unknown table 'test.tab6'
+#set the other madatory flags before test starts
+SET GLOBAL Innodb_file_per_table=on;
+#set the compression level=0 (No compress)
+SET global innodb_compression_level=0;
+#check the compression level and the compressed_pages is default
+SELECT @@innodb_compression_level;
+@@innodb_compression_level
+0
+SELECT @@Innodb_file_per_table;
+@@Innodb_file_per_table
+1
+#create table with 1K block size
+CREATE TABLE tab5 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+#create indexes
+CREATE INDEX idx1 ON tab5(col_4(10));
+CREATE INDEX idx2 ON tab5(col_5(10));
+CREATE INDEX idx3 ON tab5(col_6(10));
+CREATE INDEX idx4 ON tab5(col_7(10));
+CREATE INDEX idx5 ON tab5(col_8(10));
+CREATE INDEX idx6 ON tab5(col_11);
+#load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+#insert 10 records
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+#set the compression level=9 (High compress)
+SET global innodb_compression_level=9;
+#create table with 1K block size
+CREATE TABLE tab6 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+#create indexes
+CREATE INDEX idx1 ON tab6(col_4(10));
+CREATE INDEX idx2 ON tab6(col_5(10));
+CREATE INDEX idx3 ON tab6(col_6(10));
+CREATE INDEX idx4 ON tab6(col_7(10));
+CREATE INDEX idx5 ON tab6(col_8(10));
+CREATE INDEX idx6 ON tab6(col_11);
+#load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+#insert 10 records
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+#diff the sizes of the No compressed table and high compressed table
+SET @size=(SELECT
+(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024)
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab5' AND ENGINE='InnoDB' AND table_schema='test')
+-
+(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab6' AND ENGINE='InnoDB' AND table_schema='test')
+FROM DUAL);
+#check the size of the table, it should not be Negative value
+#The results of this query Test pass = 1 and fail=0
+SELECT @size >= 0;
+@size >= 0
+1
+#
+# Cleanup
+#
+DROP TABLE tab5;
+DROP TABLE tab6;
+#reset back the compression_level to default.
diff --git a/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
new file mode 100644
index 00000000000..3b98527250b
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6347_comp_indx_stat.result
@@ -0,0 +1,8084 @@
+#******************************************************************
+# Test 1: Test the interaction between stats and compression level
+# and logging of compressed pages configuration
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and innodb_compression_level=0
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=0;
+#******************************************************************
+# Test 1-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for deterministic reasons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 5242880
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 2097152
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=2;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 212992
+DROP TABLE tab5;
+#******************************************************************
+# Test 1-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 2: test the interaction between wl6347 & wl6344 (2.2)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and innodb_compression_level=9
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+#******************************************************************
+# Test 2-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 159744
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 122880
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 212992
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 2-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 245760
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 344064
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 3: test the interaction between wl6347 & wl6344 (2.3)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# innodb_compression_level=6 (default)
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+#******************************************************************
+# Test 3-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 1K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 86016
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 65536
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 86016
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 122880
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 172032
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 3-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=default;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 245760
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+# The size of the file with 0 compress = 344064
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 4: test the interaction between wl6347 & wl6344 (2.5 & 2.6)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# Innodb_compression_failure_threshold_pct=0
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+@@innodb_cmp_per_index_enabled 1
+SELECT @@innodb_compression_failure_threshold_pct;
+@@innodb_compression_failure_threshold_pct 0
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table 1
+SELECT @@innodb_compression_level;
+@@innodb_compression_level 6
+#******************************************************************
+# Test 4-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_file_per_table=on;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 4-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 5: test the interaction between wl6347 & wl6344 (2.7)
+# This testcase is to verify the table/idex level compression stats
+# When the flags are set as follows
+# innodb_cmp_per_index_enabled=ON and
+# Innodb_compression_failure_threshold_pct=10
+# page size 1K,2K,4K,8K,16K
+# check the size and compression stats of the table tab5
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_compression_level=Default;
+# check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+@@innodb_cmp_per_index_enabled 1
+SELECT @@innodb_compression_failure_threshold_pct;
+@@innodb_compression_failure_threshold_pct 10
+SELECT @@innodb_file_per_table;
+@@innodb_file_per_table 1
+SELECT @@innodb_compression_level;
+@@innodb_compression_level 6
+#******************************************************************
+# Test 5-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 1K
+#******************************************************************
+# create a table with page size=1K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# restart
+# set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# fetch the compressed page and check the stats
+# The stats figure may be different/same for each restart.
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table
+# testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+===============
+After Restart Chekc the stats of the table
+===============
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @comp_val AND 1000
+AND uncompress_ops BETWEEN @uncomp_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 2K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# create a table with page size=2K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=2;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 4K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=4K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 65536
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 81920
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 8K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+# create a table with page size=8K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 122880
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 163840
+DROP TABLE tab5;
+#******************************************************************
+# Test 5-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 16K
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+# create a table with page size=16K
+# create indexes on each column.(total 9 indexes)
+# Create table & Index
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+CREATE INDEX idx9 ON tab5(col_9(10));
+CREATE INDEX idx8 ON tab5(col_8(10));
+CREATE INDEX idx7 ON tab5(col_7(10));
+CREATE INDEX idx6 ON tab5(col_6(10));
+CREATE INDEX idx5 ON tab5(col_5(10));
+CREATE INDEX idx4 ON tab5(col_4(10));
+CREATE INDEX idx3 ON tab5(col_3(10));
+CREATE INDEX idx2 ON tab5(col_2(10));
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 245760
+# for determintic resons simple data should be inserted.
+# insert some 100 records
+# Load the data
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+INSERT INTO tab5
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9);
+commit;
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed page and check the stats
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+# fetch the compressed same page once again and check the stats
+# the stat figures should be same as above query
+===============
+Fetch Records
+===============
+SELECT col_7,col_8,col_9 FROM tab5
+WHERE col_2='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
+LIMIT 1;
+col_7 gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
+col_8 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
+col_9 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+# check the stats of the table & size of the table
+SET @inl_val=1;
+# Check the stats of the table
+# Check the size of the ibd file
+# testcase : pass = 1 fail = 0
+SELECT count(*) > 0 as "compress_stat"
+FROM information_schema.innodb_cmp_per_index
+WHERE
+compress_ops_ok BETWEEN @inl_val AND 1000
+AND compress_ops BETWEEN @inl_val AND 1000
+AND table_name='tab5' AND database_name='test'
+AND index_name like 'idx%' ;
+compress_stat 1
+The size of the tab5.ibd file: 327680
+DROP TABLE tab5;
+#******************************************************************
+# Test 6: Create multiple tables & indexes having same name in 2 diff DB's
+# Check the stats of the table. (1.1)
+#******************************************************************
+# reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+SET GLOBAL innodb_file_per_table=ON;
+SET GLOBAL innodb_compression_level=default;
+SET GLOBAL innodb_compression_failure_threshold_pct=default;
+# create a table page size=1K
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx1 ON tab5(col_1(10));
+# check the stats of the table
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='test' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+database_name test
+table_name tab5
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+database_name test
+table_name tab5
+index_name idx1
+compress_ops 1
+compress_ops_ok 1
+CREATE DATABASE sb;
+USE sb;
+# create a table page size=1K (testcase-1)
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+CREATE INDEX idx1 ON tab5(col_1(10));
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='sb' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+database_name sb
+table_name tab5
+index_name GEN_CLUST_INDEX
+compress_ops 1
+compress_ops_ok 1
+database_name sb
+table_name tab5
+index_name idx1
+compress_ops 1
+compress_ops_ok 1
+DROP TABLE tab5, test.tab5;
+DROP DATABASE sb;
+# reset the flags
+SET GLOBAL innodb_file_per_table=default;
+SET GLOBAL innodb_cmp_per_index_enabled=default;
+SET GLOBAL innodb_compression_failure_threshold_pct=default;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_1.result b/mysql-test/suite/innodb_zip/r/wl6470_1.result
new file mode 100644
index 00000000000..ea1866d69eb
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6470_1.result
@@ -0,0 +1,598 @@
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb key_block_size = 4;
+set innodb_strict_mode=off;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb key_block_size = 8;
+set innodb_strict_mode=default;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+set global innodb_file_per_table = 0;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create temporary table t2
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) do
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small()
+begin
+declare i int default 1;
+while (i <= 20) do
+insert into t1 values (i, 'c', 'd');
+set i = i + 1;
+end while;
+end|
+create procedure populate_t1_small2()
+begin
+declare i int default 30;
+while (i <= 50) do
+insert into t1 values (i, 'e', 'f');
+set i = i + 1;
+end while;
+end|
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+20
+rollback;
+select count(*) from t1;
+count(*)
+20
+truncate table t1;
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+count(*)
+140
+call populate_t1_small();
+select count(*) from t1;
+count(*)
+160
+select * from t1 limit 10;
+keyc c1 c2
+1 c d
+2 c d
+3 c d
+4 c d
+5 c d
+6 c d
+7 c d
+8 c d
+9 c d
+10 c d
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+count(*)
+181
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+31 e f
+32 e f
+33 e f
+34 e f
+35 e f
+36 e f
+37 e f
+38 e f
+39 e f
+40 e f
+rollback;
+select count(*) from t1;
+count(*)
+160
+select * from t1 where keyc > 30 limit 10;
+keyc c1 c2
+61 a b
+62 a b
+63 a b
+64 a b
+65 a b
+66 a b
+67 a b
+68 a b
+69 a b
+70 a b
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+keyc c1 c2
+4001 c d
+4002 c d
+4003 c d
+4004 c d
+4005 c d
+4006 c d
+4007 c d
+4008 c d
+4009 c d
+4010 c d
+rollback;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+commit;
+select * from t1 limit 10;
+keyc c1 c2
+2001 c d
+2002 c d
+2003 c d
+2004 c d
+2005 c d
+2006 c d
+2007 c d
+2008 c d
+2009 c d
+2010 c d
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+count(*)
+60
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
+drop table t1;
+drop table t2;
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_2.result b/mysql-test/suite/innodb_zip/r/wl6470_2.result
new file mode 100644
index 00000000000..b001cd73882
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6470_2.result
@@ -0,0 +1,667 @@
+create procedure populate_tables()
+begin
+declare n int default 20;
+declare inner_loop int default 100;
+set global innodb_file_per_table=on;
+drop table if exists t1,t2,t3,t4;
+create temporary table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create temporary table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create temporary table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create temporary table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create temporary table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150),(190);
+while (n > 0) do
+start transaction;
+insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t3 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t4 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+insert into t5 values(n,n,repeat(concat(' tc3_',n),30),
+repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+now(),(100.55+n));
+if (n > 10) then
+commit;
+else
+delete from t1 where c1 > 10 ;
+delete from t2 where c1 > 10 ;
+delete from t3 where c1 > 10 ;
+delete from t4 where c1 > 10 ;
+delete from t5 where c1 > 10 ;
+rollback;
+start transaction;
+update t1 set c1 = c1 + 1000 where c1 > 10;
+update t2 set c1 = c1 + 1000 where c1 > 10;
+update t3 set c1 = c1 + 1000 where c1 > 10;
+update t4 set c1 = c1 + 1000 where c1 > 10;
+update t5 set c1 = c1 + 1000 where c1 > 10;
+rollback;
+end if;
+start transaction;
+insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+delete from t1 where c1 between 100 and 110;
+delete from t2 where c1 between 100 and 110;
+delete from t3 where c1 between 100 and 110;
+delete from t4 where c1 between 100 and 110;
+delete from t5 where c1 between 100 and 110;
+update t1 set c1 = c1+1 where c1>110;
+update t2 set c1 = c1+1 where c1>110;
+update t3 set c1 = c1+1 where c1>110;
+update t4 set c1 = c1+1 where c1>110;
+update t5 set c1 = c1+1 where c1>110;
+savepoint a;
+insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+savepoint b;
+insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+insert into t5 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+now(),(100.55+n+inner_loop));
+savepoint c;
+rollback to b;
+rollback to a;
+commit;
+commit;
+rollback;
+set n = n - 1;
+end while;
+end|
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
+#---client 1 : dml operation ---"
+connection con1;
+#---client 2 : dml operation ---"
+connection con2;
+# In connection 1
+connection con1;
+select count(*) from t1;
+count(*)
+20
+select count(*) from t2;
+count(*)
+20
+select count(*) from t3;
+count(*)
+20
+select count(*) from t4;
+count(*)
+20
+select count(*) from t5;
+count(*)
+20
+select c1 from t1;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t2;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t3;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t4;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t5;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 2
+connection con2;
+select count(*) from t1;
+count(*)
+20
+select count(*) from t2;
+count(*)
+20
+select count(*) from t3;
+count(*)
+20
+select count(*) from t4;
+count(*)
+20
+select count(*) from t5;
+count(*)
+20
+select c1 from t1;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t2;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t3;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t4;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+select c1 from t5;
+c1
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 1
+connection con1;
+set autocommit = 0;
+insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t3 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert into t5 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+set autocommit = 1;
+select c1,c2 from t1 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t2 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t3 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t4 where c1 in (20,1);
+c1 c2
+20 20
+select c1,c2 from t5 where c1 in (20,1);
+c1 c2
+20 20
+replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+update ignore t1 set c1 = 20 where c1 = 140 ;
+update ignore t2 set c1 = 20 where c1 = 140 ;
+update ignore t3 set c1 = 20 where c1 = 140 ;
+update ignore t4 set c1 = 20 where c1 = 140 ;
+update ignore t5 set c1 = 20 where c1 = 140 ;
+select count(*) from t1 where c1 = 140;
+count(*)
+1
+select count(*) from t2 where c1 = 140;
+count(*)
+1
+select count(*) from t3 where c1 = 140;
+count(*)
+1
+select count(*) from t4 where c1 = 140;
+count(*)
+1
+select count(*) from t5 where c1 = 140;
+count(*)
+1
+"running select * into outfile <file> from t1 ;
+create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
+select count(*) from temp_1;
+count(*)
+0
+"running load data infile <file> into temp_1 ;
+select count(*) from temp_1;
+count(*)
+20
+alter table temp_1 add column c10 int default 99 ,
+add column c11 varchar(100) default 'test';
+alter table temp_1 add primary key (c1);
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55);
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-1 -1 a a a a a 100.550 99 test
+select count(*) from temp_1 where c10 = 99 and c11 like 'test';
+count(*)
+21
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
+on duplicate key update c1=-2,c2=-2;
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-2 -2 a a a a a 100.550 99 test
+drop table t1 ,t2 ,t3,t4,t5,t6,temp_1;
+disconnect con1;
+connection con2;
+drop table t1 ,t2 ,t3,t4,t5,t6;
+disconnect con2;
+connection default;
+drop procedure populate_tables;
+create temporary table prep_1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(6000) not null,
+c5 blob(6000) not null,
+c6 varchar(2000) not null,
+c7 varchar(2000) not null,
+c8 datetime,
+c9 decimal(6,3),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+PREPARE stm FROM "insert into prep_1 values(?,?,repeat(concat(' tc3_',?),30),repeat(concat(' tc4_',?),800),repeat(concat(' tc_',?),800),repeat(concat(' tc6_',?),245),repeat(concat(' tc7_',?),245),now(),(100.55+?))";
+set @var = 5;
+set @var_static = 5;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+set @var = @var - 1;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+1 tc3_1 tc3_1 tc
+2 tc3_2 tc3_2 tc
+3 tc3_3 tc3_3 tc
+4 tc3_4 tc3_4 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+5 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+10
+PREPARE stm_1 FROM "UPDATE prep_1 SET c1 = c1 + 1";
+EXECUTE stm_1;
+EXECUTE stm_1;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+3 tc3_1 tc3_1 tc
+4 tc3_2 tc3_2 tc
+5 tc3_3 tc3_3 tc
+6 tc3_4 tc3_4 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+10
+PREPARE stm_2 FROM "DELETE FROM prep_1 ORDER BY c1 LIMIT 1";
+EXECUTE stm_2;
+EXECUTE stm_2;
+select c1,left(c3,15) from prep_1 order by c1 ;
+c1 left(c3,15)
+5 tc3_3 tc3_3 tc
+6 tc3_4 tc3_4 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+7 tc3_5 tc3_5 tc
+select count(*) from prep_1;
+count(*)
+8
+drop prepare stm;
+drop prepare stm_1;
+drop prepare stm_2;
+drop table prep_1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_1.result b/mysql-test/suite/innodb_zip/r/wl6501_1.result
new file mode 100644
index 00000000000..4337275d50b
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_1.result
@@ -0,0 +1,1150 @@
+set global innodb_file_per_table=on;
+# Verify that 'TRUNCATE TABLE' statement works fine and the size
+# of .ibd file is equal to the initial size after truncation.
+drop table if exists t1,t2,t3,t4,t6;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table 'test.t4'
+Note 1051 Unknown table 'test.t6'
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_during_drop_index_temp_table";
+"---debug ib_trunc_crash_during_drop_index_temp_table point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t5;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+"---debug ib_trunc_crash_on_drop_of_sec_index point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+"---debug ib_trunc_crash_drop_reinit_done_create_to_start---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t5;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+"---debug ib_trunc_crash_on_create_of_sec_index---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_before_log_removal";
+"---debug ib_trunc_crash_before_log_removal point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_truncate_done";
+"---debug ib_trunc_crash_after_truncate_done point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
+create table t1(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=redundant;
+create table t2(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compact;
+create table t3(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=compressed key_block_size=4;
+create table t4(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb row_format=dynamic;
+create temporary table t5(c1 int not null,
+c2 int not null,
+c3 char(255) not null,
+c4 text(500) not null,
+c5 blob(500) not null,
+c6 varchar(500) not null,
+c7 varchar(500) not null,
+c8 datetime,
+c9 decimal(5,3),
+primary key (c1),
+index (c3,c4(50),c5(50)),
+index (c2))
+engine=innodb;
+create table t6 ( a int ) engine = innodb;
+insert into t6 values (50),(100),(150);
+select count(*) from t1;
+count(*)
+3
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+count(*)
+3
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+3
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t2;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+3
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t3;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+3
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+"---debug ib_trunc_crash_after_redo_log_write_complete point---"
+# Write file to make mysql-test-run.pl expect crash and restart
+# Run the crashing query
+truncate table t4;
+ERROR HY000: Lost connection to MySQL server during query
+# Restart the MySQL server
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+select count(*) from t4;
+count(*)
+0
+select count(*) from t5;
+ERROR 42S02: Table 'test.t5' doesn't exist
+select count(*) from t6;
+count(*)
+3
+drop table t1, t2, t3, t4, t6;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
new file mode 100644
index 00000000000..23acb33adca
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
@@ -0,0 +1,489 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 16;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
new file mode 100644
index 00000000000..cb8a4d5a157
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
@@ -0,0 +1,553 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+call mtr.add_suppression("does not exist in the InnoDB internal");
+set global innodb_file_per_table = on;
+"1. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set innodb_strict_mode=off;
+create temporary table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check Error Table 'test.t' doesn't exist
+test.t check status Operation failed
+"2. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set innodb_strict_mode=off;
+create temporary table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 4;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check Error Table 'test.t' doesn't exist
+test.t check status Operation failed
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
new file mode 100644
index 00000000000..74f1e9dd1ad
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
@@ -0,0 +1,489 @@
+call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
+call mtr.add_suppression("Cannot create file '.*'");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
+set global innodb_file_per_table = on;
+"1. Hit crash point while writing redo log."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine=innodb row_format=compressed
+key_block_size=8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"2. Hit crash point on completion of redo log write."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"3. Hit crash point while dropping indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"4. Hit crash point on completing drop of all indexes before creation"
+" of index is commenced."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"5. Hit crash point while creating indexes."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"6. Hit crash point after data is updated to system-table and"
+" in-memory dict."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+"7. Hit crash point before/after log checkpoint is done."
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_before_log_removal";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+use test;
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+SET innodb_strict_mode=OFF;
+create table t (
+i int, f float, c char,
+primary key pk(i), unique findex(f), index ck(c))
+engine = innodb row_format = compressed
+key_block_size = 8;
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+set session debug = "+d,ib_trunc_crash_after_truncate_done";
+truncate table t;
+ERROR HY000: Lost connection to MySQL server during query
+# restart
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+select * from t;
+i f c
+insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
+select * from t;
+i f c
+1 1.1 a
+2 2.2 b
+3 3.3 c
+select * from t where f < 2.5;
+i f c
+1 1.1 a
+2 2.2 b
+drop table t;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
new file mode 100644
index 00000000000..9c197737137
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
@@ -0,0 +1,354 @@
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Antelope';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compact
+key_block_size=NUMBER;
+Warnings:
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 1;
+set global innodb_file_format = 'Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compressed
+key_block_size=NUMBER;
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compressed
+key_block_size=16;
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compressed
+key_block_size=16;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
+set innodb_strict_mode=OFF;
+create procedure populate()
+begin
+declare i int default 1;
+while (i <= 5000) do
+insert into t1 values (i, 'a', 'b');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+create procedure populate_small()
+begin
+declare i int default 10001;
+while (i <= 12000) do
+insert into t1 values (i, 'c', 'd');
+insert into t2 values (i, 'a', 'b');
+insert into t3 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set global innodb_file_per_table = 0;
+set global innodb_file_format = 'Antelope';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+create table tNUMBER
+(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
+index cNUMBER_idx(cNUMBER))
+engine=innodb row_format=compact
+key_block_size=NUMBER;
+Warnings:
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+create table t2
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+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=16.
+create temporary table t3
+(i int, c1 char(100), c2 char(100),
+index c1_idx(c1))
+engine=innodb row_format=compact
+key_block_size=16;
+Warnings:
+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=16.
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+begin;
+call populate();
+commit;
+select count(*) from t1;
+count(*)
+5000
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+select count(*) from t2;
+count(*)
+5000
+select count(*) from t3;
+count(*)
+5000
+call populate_small();
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+7000
+select count(*) from t3;
+count(*)
+7000
+truncate table t2;
+truncate table t3;
+select count(*) from t1;
+count(*)
+2000
+select count(*) from t2;
+count(*)
+0
+select count(*) from t3;
+count(*)
+0
+call populate_small();
+select count(*) from t1;
+count(*)
+4000
+select count(*) from t2;
+count(*)
+2000
+select count(*) from t3;
+count(*)
+2000
+drop table t1;
+drop table t2;
+drop table t3;
+drop procedure populate;
+drop procedure populate_small;
+set global innodb_file_format = Barracuda;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
+set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6560.result b/mysql-test/suite/innodb_zip/r/wl6560.result
new file mode 100644
index 00000000000..bf46d8a41a0
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6560.result
@@ -0,0 +1,418 @@
+set global innodb_file_per_table = off;
+# files in MYSQL_DATA_DIR
+ibtmp1
+select @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+0
+create temporary table t1 (i int, f float, c char(100)) engine=innodb;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+select * from t1 where i = 98;
+i f c
+98 1.3 jaipur
+select * from t1 where i < 100;
+i f c
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 33.33 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL sec_index NULL NULL NULL 5 60.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+select * from t1 where f > 1.29999;
+i f c
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 20.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
+select * from t1 where i = 100;
+i f c
+100 1.1 pune
+delete from t1 where i < 97;
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 kolkata
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.44 delhi
+96 1.5 kolkata
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+alter table t1 import tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop table t1;
+#files in MYSQL_TMP_DIR
+set global innodb_file_per_table = 1;
+select @@global.innodb_file_per_table;
+@@global.innodb_file_per_table
+1
+create temporary table t1
+(i int, f float, c char(100)) engine = innodb key_block_size = 4;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) DEFAULT NULL,
+ `f` float DEFAULT NULL,
+ `c` char(100) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+select * from t1 where i = 98;
+i f c
+98 1.3 jaipur
+select * from t1 where i < 100;
+i f c
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 33.33 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL sec_index NULL NULL NULL 5 60.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`f` > 1.29999)
+select * from t1 where f > 1.29999;
+i f c
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 5 20.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i`,`test`.`t1`.`f` AS `f`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`i` = 100)
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+id select_type table partitions type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 NULL const pri_index pri_index 5 const 1 100.00 NULL
+Warnings:
+Note 1003 /* select#1 */ select '100' AS `i`,'1.1' AS `f`,'pune' AS `c` from `test`.`t1` where 1
+select * from t1 where i = 100;
+i f c
+100 1.1 pune
+delete from t1 where i < 97;
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 kolkata
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.44 delhi
+96 1.5 kolkata
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop table t1;
+set global innodb_file_per_table = off;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+while (i <= 20000) DO
+insert into t1 values (i, 'a', 'b');
+SET i = i + 1;
+END WHILE;
+END|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+20000
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+set autocommit=1;
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+drop procedure populate_t1;
+drop table t1;
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+insert into t1 values (1, 'c', 'b');
+select * from t1;
+keyc c1 c2
+1 c b
+# restart
+# files in MYSQL_DATA_DIR
+ibtmp1
+use test;
+select * from t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+"testing temp-table creation in --innodb_read_only mode"
+# restart: --innodb-read-only
+use test;
+show tables;
+Tables_in_test
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+ERROR HY000: InnoDB is in read only mode.
+"testing system and temp tablespace name conflict"
+"restarting server in normal mode"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+drop table t1;
+# test condition of full-temp-tablespace
+# restart: --innodb_temp_data_file_path=ibtmp1:12M
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+while (i <= 20000) DO
+insert into t1 values (i, 'a', 'b');
+SET i = i + 1;
+END WHILE;
+END|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+ERROR HY000: The table 't1' is full
+drop procedure populate_t1;
+drop table t1;
+set innodb_strict_mode = off;
+set global innodb_file_per_table = 0;
+set global innodb_file_format = 'Antelope';
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+set global innodb_file_per_table = 1;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+Warning NUMBER InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
+Warning NUMBER InnoDB: assuming ROW_FORMAT=DYNAMIC.
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+set innodb_strict_mode = on;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+drop table t;
+set global innodb_file_format = 'Barracuda';
+set innodb_strict_mode = off;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+set innodb_strict_mode = default;
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+set innodb_strict_mode = on;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+set innodb_strict_mode = off;
+#files in MYSQL_TMP_DIR
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic key_block_size = 4;
+show warnings;
+Level Code Message
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER unless ROW_FORMAT=COMPRESSED.
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compact;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+drop table t;
+create temporary table t (
+i int)
+engine = innodb key_block_size = 4;
+show warnings;
+Level Code Message
+#files in MYSQL_TMP_DIR
+#sql<temporary>.ibd
+drop table t;
+"testing temp tablespace non-support for raw device"
+"testing temp tablespace non-support for raw device"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
+"try starting server with temp-tablespace size < min. threshold"
+"try starting server with sys-tablespace size < min. threshold"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
+"try starting server with no file specified for temp-tablespace"
+# restart
+show tables;
+Tables_in_test
+create temporary table t1 (
+keyc int, c1 char(100), c2 char(100)
+) engine = innodb;
+drop table t1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6915_1.result b/mysql-test/suite/innodb_zip/r/wl6915_1.result
new file mode 100644
index 00000000000..0ffc2f43265
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/r/wl6915_1.result
@@ -0,0 +1,2060 @@
+call mtr.ADD_suppression(".*Resizing redo log.*");
+call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*");
+call mtr.ADD_suppression(".*New log files created.*");
+SELECT @@global.innodb_undo_tablespaces;
+@@global.innodb_undo_tablespaces
+0
+CREATE PROCEDURE populate_tables(IN id VARCHAR(10))
+begin
+declare n int default 20;
+set global innodb_file_per_table=on;
+DROP TABLE IF EXISTS t1,t2,t3,t4;
+CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=redundant;
+set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=compact;
+set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;
+set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL,
+c2 int NOT NULL,
+c3 char(255) NOT NULL,
+c4 text(600) NOT NULL,
+c5 blob(600) NOT NULL,
+c6 varchar(600) NOT NULL,
+c7 varchar(600) NOT NULL,
+c8 datetime,
+c9 decimal(6,3),
+PRIMARY KEY (c1),
+INDEX (c3,c4(50),c5(50)),
+INDEX (c2))
+ENGINE=InnoDB ROW_FORMAT=dynamic;
+set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;");
+PREPARE createTable FROM @s;
+EXECUTE createTable;
+DEALLOCATE PREPARE createTable;
+while (n > 0) do
+START TRANSACTION;
+set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+savepoint a;
+set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+savepoint b;
+set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+NOW(),(100.55+n));
+if (n > 10) then
+if (n > 10 and n <=12) then
+ROLLBACK TO SAVEPOINT a;
+COMMIT;
+end if;
+if (n > 12 and n < 15) then
+ROLLBACK TO SAVEPOINT b;
+COMMIT;
+end if;
+if (n > 15) then
+COMMIT;
+end if;
+else
+if (n > 5) then
+START TRANSACTION;
+DELETE FROM t1_temp WHERE c1 > 10 ;
+DELETE FROM t2_temp WHERE c1 > 10 ;
+DELETE FROM t3_temp WHERE c1 > 10 ;
+DELETE FROM t4_temp WHERE c1 > 10 ;
+rollback;
+START TRANSACTION;
+update t1_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t2_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t3_temp set c1 = c1 + 1000 WHERE c1 > 10;
+update t4_temp set c1 = c1 + 1000 WHERE c1 > 10;
+rollback;
+end if;
+end if;
+if (n < 5) then
+rollback;
+end if;
+FLUSH logs;
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t2_temp DROP PRIMARY KEY;
+ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t3_temp DROP PRIMARY KEY;
+ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ALTER TABLE t4_temp DROP PRIMARY KEY;
+ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+FLUSH tables;
+START TRANSACTION;
+set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+DELETE FROM t1_temp WHERE c1 between 100 and 110;
+DELETE FROM t2_temp WHERE c1 between 100 and 110;
+DELETE FROM t3_temp WHERE c1 between 100 and 110;
+DELETE FROM t4_temp WHERE c1 between 100 and 110;
+update t1_temp set c1 = c1+1 WHERE c1>110;
+update t2_temp set c1 = c1+1 WHERE c1>110;
+update t3_temp set c1 = c1+1 WHERE c1>110;
+update t4_temp set c1 = c1+1 WHERE c1>110;
+savepoint a;
+set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+savepoint b;
+set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+PREPARE insertIntoTable FROM @s;
+EXECUTE insertIntoTable;
+DEALLOCATE PREPARE insertIntoTable;
+INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+NOW(),(100.55+n+100));
+savepoint c;
+rollback to b;
+rollback to a;
+COMMIT;
+COMMIT;
+rollback;
+set n = n - 1;
+end while;
+end|
+#---client 1 : dml operation ---"
+#---client 2 : dml operation ---"
+# In connection 1
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 2
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+# In connection 1
+set AUTOCOMMIT = 0;
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t2_temp DROP PRIMARY KEY;
+ALTER TABLE t2_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t3_temp DROP PRIMARY KEY;
+ALTER TABLE t3_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t4_temp DROP PRIMARY KEY;
+ALTER TABLE t4_temp ADD PRIMARY KEY (c1);
+INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
+set AUTOCOMMIT = 1;
+SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1);
+c1 c2
+20 20
+REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
+c1 c2 c3 c4 c5 c6 c7 c9
+20 1 a a a a a 100.550
+update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
+Warnings:
+Warning 1062 Duplicate entry '20' for key 'PRIMARY'
+SELECT count(*) FROM t1_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t2_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t3_temp WHERE c1 = 140;
+count(*)
+1
+SELECT count(*) FROM t4_temp WHERE c1 = 140;
+count(*)
+1
+ALTER TABLE t1_temp ADD COLUMN c10 int default 99 ,
+ADD COLUMN c11 varchar(100) default 'test';
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55);
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-1 -1 a a a a a 100.550 99 test
+SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test';
+count(*)
+27
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55)
+ON DUPLICATE KEY UPDATE c1=-2,c2=-2;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
+-2 -2 a a a a a 100.550 99 test
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+call populate_tables('_1');;
+call populate_tables('_2');;
+"#connection 1 - verify tables"
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+"#connection 2 - verify tables"
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+# restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4
+call populate_tables('_1');;
+call populate_tables('_2');;
+"#connection 1 - verify tables"
+SELECT count(*) FROM t1_1;
+count(*)
+36
+SELECT count(*) FROM t2_1;
+count(*)
+36
+SELECT count(*) FROM t3_1;
+count(*)
+34
+SELECT count(*) FROM t4_1;
+count(*)
+32
+SELECT c1 FROM t1_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_1;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_1;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_1;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+"#connection 2 - verify tables"
+SELECT count(*) FROM t1_2;
+count(*)
+36
+SELECT count(*) FROM t2_2;
+count(*)
+36
+SELECT count(*) FROM t3_2;
+count(*)
+34
+SELECT count(*) FROM t4_2;
+count(*)
+32
+SELECT c1 FROM t1_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t2_2;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t3_2;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT c1 FROM t4_2;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+SELECT count(*) FROM t1_temp;
+count(*)
+26
+SELECT count(*) FROM t2_temp;
+count(*)
+26
+SELECT count(*) FROM t3_temp;
+count(*)
+24
+SELECT count(*) FROM t4_temp;
+count(*)
+22
+SELECT c1 FROM t1_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t2_temp;
+c1
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t3_temp;
+c1
+5
+6
+7
+8
+9
+10
+13
+14
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+SELECT c1 FROM t4_temp;
+c1
+5
+6
+7
+8
+9
+10
+15
+16
+17
+18
+19
+20
+122
+124
+126
+128
+130
+132
+134
+136
+138
+140
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+DROP PROCEDURE populate_tables;
diff --git a/mysql-test/suite/innodb_zip/t/16k.test b/mysql-test/suite/innodb_zip/t/16k.test
new file mode 100644
index 00000000000..274b0b8e1bb
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/16k.test
@@ -0,0 +1,715 @@
+# Tests for setting innodb-page-size=16k; default value
+--source include/big_test.inc
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+let $MYSQLD_DATADIR = `select @@datadir`;
+let $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+# These values can change during the test
+--enable_query_log
+
+--echo # Test 1) Show the page size from Information Schema
+--disable_warnings
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_page_size';
+--enable_warnings
+
+--echo # Test 2) The number of buffer pool pages is dependent upon the page size.
+--disable_warnings
+--replace_result 1535 {checked_valid} 1536 {checked_valid}
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+--enable_warnings
+
+--echo # Test 3) Query some information_shema tables that are dependent upon
+--echo # the page size.
+# Show the metadata for tables in schema 'mysql'.
+# Pulled from innodb-system-table-view.test
+# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are
+# unpredictable. They depend on whether mtr has created the database for
+# this test from scratch or is using a previously created database where
+# those tables have been dropped and recreated. Since we cannot force mtr
+# to use a freshly created database for this test we do not return the
+# table or index IDs. We can return the space IS of mysql schema tables
+# since they are created consistently during bootstrap.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+
+# Show the metadata for tables in schema 'test'.
+# Do not return the space ID since this tablespace may have existed before
+# this test runs. The root page number of each index should be consistent
+# within a file-per-table tablespace.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+--source suite/innodb/include/show_i_s_tablespaces.inc
+DROP TABLE t1, t2, t3, t4;
+
+--echo # Test 4) The maximum row size is dependent upon the page size.
+--echo # Redundant: 8123, Compact: 8126.
+--echo # Compressed: 8126, Dynamic: 8126.
+--echo # Each row format has its own amount of overhead that
+--echo # varies depending on number of fields and other overhead.
+
+SET SESSION innodb_strict_mode = ON;
+
+# Redundant table; 8011 bytes with 40 char fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212)
+) ROW_FORMAT=redundant;
+
+# Compact table; 8096 bytes with 40 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=compact;
+
+# Compressed table; 7959 bytes with 40 CHAR fields
+# Bug#13391353 Limit is 7957 on 32-Linux only
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(157)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160)
+) ROW_FORMAT=compressed;
+
+# Dynamic table; 8096 bytes with 40 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
+c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
+c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
+c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
+c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
+) ROW_FORMAT=dynamic;
+
+#
+# Test the maximum key length
+# Moved from innodb-index.test since each page size has its own max key length.
+# Max Key Length is 3072 for 16k pages.
+# Max key Part length is 767
+# InnoDB assumes 3 bytes for each UTF8 character.
+#
+CREATE TABLE t1 (a varchar(255) character set utf8,
+ b varchar(255) character set utf8,
+ c varchar(255) character set utf8,
+ d varchar(255) character set utf8,
+ e varchar(4) character set utf8,
+ PRIMARY KEY (a,b,c,d,e))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(255) character set utf8,
+ b varchar(255) character set utf8,
+ c varchar(255) character set utf8,
+ d varchar(255) character set utf8,
+ e varchar(5) character set utf8,
+ PRIMARY KEY (a,b,c,d,e))
+ ENGINE=innodb;
+CREATE TABLE t1 (a varchar(255) character set utf8,
+ b varchar(255) character set utf8,
+ c varchar(255) character set utf8,
+ d varchar(255) character set utf8,
+ e varchar(255) character set utf8,
+ f varchar(4) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e,f))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(255) character set utf8,
+ b varchar(255) character set utf8,
+ c varchar(255) character set utf8,
+ d varchar(255) character set utf8,
+ e varchar(255) character set utf8,
+ f varchar(5) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e,f))
+ ENGINE=innodb;
+
+--echo # Test 5) Make sure that KEY_BLOCK_SIZE=16, 8, 4, 2 & 1
+--echo # are all accepted.
+
+SET SESSION innodb_strict_mode = ON;
+
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+SET SESSION innodb_strict_mode = OFF;
+
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+
+--echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+--echo # are rejected when innodb_file_per_table=OFF
+# Moved from innodb-zip.test
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_format = `Barracuda`;
+
+
+--echo # Test 7) This series of tests were moved from innodb-index to here
+--echo # because the second alter table t1 assumes a 16k page size.
+--echo # Moving the test allows the rest of innodb-index to be run on all
+--echo # page sizes. The previously disabled portions of this test were
+--echo # moved as well.
+
+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 STATS_PERSISTENT=0;
+
+INSERT INTO t1
+SELECT a,LEFT(REPEAT(d,100*a),65535),REPEAT(d,20*a),d FROM t2,t3 order by a, d;
+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
+ORDER BY 1, 2, 3, 4, 5, 6;
+# in-place alter table should trigger ER_PRIMARY_CANT_HAVE_NULL
+--error ER_DUP_ENTRY
+ALTER TABLE t1 ADD PRIMARY KEY (a), ADD KEY (b(20));
+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;
+# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
+# And adding a PRIMARY KEY will also add NOT NULL implicitly!
+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;
+
+--echo # Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+
+# With no indexes defined, we can update all columns to max key part length.
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+ k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+
+# With this many indexes defined, we can still update all fields.
+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));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+ k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+
+# Add one more index and the UNDO record becomes too big to update all columns.
+# But a single transaction can update the columns in separate statements.
+# because the UNDO records will be smaller.
+CREATE INDEX t1f ON t1 (f(767));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+ k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+ n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+
+# More indexes can still be added and a single field can still be updated
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+CREATE INDEX t1j ON t1 (j(767));
+UPDATE t1 SET j=@e;
+CREATE INDEX t1k ON t1 (k(767));
+UPDATE t1 SET k=@e;
+CREATE INDEX t1l ON t1 (l(767));
+UPDATE t1 SET l=@e;
+CREATE INDEX t1m ON t1 (m(767));
+UPDATE t1 SET m=@e;
+CREATE INDEX t1n ON t1 (n(767));
+UPDATE t1 SET n=@e;
+CREATE INDEX t1o ON t1 (o(767));
+UPDATE t1 SET o=@e;
+CREATE INDEX t1p ON t1 (p(767));
+UPDATE t1 SET p=@e;
+CREATE INDEX t1q ON t1 (q(767));
+UPDATE t1 SET q=@e;
+CREATE INDEX t1r ON t1 (r(767));
+UPDATE t1 SET r=@e;
+CREATE INDEX t1s ON t1 (s(767));
+UPDATE t1 SET s=@e;
+
+# Add one more index and we cannot update a column to its defined index length.
+# This is a problem. It means that the DDL is allowed to create a table
+# that CANNOT be updated. See bug#12953735.
+CREATE INDEX t1t ON t1 (t(767));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET t=@e;
+
+CREATE INDEX t1u ON t1 (u(767));
+CREATE INDEX t1ut ON t1 (u(767), t(767));
+CREATE INDEX t1st ON t1 (s(767), t(767));
+
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+--echo # Bug #12429576 - Test an assertion failure on purge.
+# This test is not in innodb_8k or innodb_4k since the bug is not about
+# page size. It just tests the condition that caused the assertion.
+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;
+# We need to activate the purge thread.
+# Instead of doing a --sleep 10 now, do it once at the end.
+
+# Bug#12637786 - Assertion hit; ut_ad(dict_index_is_clust(index));
+# A secondary index tuple is found to be too long to fit into a page.
+# This test is not in innodb_8k or innodb_4k since the bug is not about
+# page size. It just tests the condition that caused the assertion.
+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 to make sure it does not assert and
+# is able to clean up the old versions of secondary index entries.
+# Instead of doing a --sleep 10 now for each test, do it once at the end.
+
+--echo # Bug#12963823 - Test that the purge thread does not crash when
+# the number of indexes has changed since the UNDO record was logged.
+# This test is not in innodb_8k or innodb_4k since the bug is not about
+# page size. It just tests the condition that caused the crash.
+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.
+# Instead of doing a --sleep 10 now for each test, do it once at the end.
+
+--echo # Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
+# InnoDB cannot know that this undo record would be too big for the undo
+# page. Too much of text field is stored in the clustered record in this
+# DYNAMIC row formatted record.
+# This test is not in innodb_8k or innodb_4k since the bug is not about
+# page size. It just tests the condition that caused the hang.
+
+SET SESSION innodb_strict_mode = ON;
+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 a hang while doing infinite undo log allocation.
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE bug12547647 SET c = REPEAT('b',16928);
+SHOW WARNINGS;
+DROP TABLE bug12547647;
+
+# 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;
+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;
+DROP TABLE t1;
+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;
+DROP TABLE t1;
+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;
+DROP TABLE t1;
+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;
+
+
+--echo #
+--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result
+--echo #
+
+# Moved to here from innodb_mysql.test. Some PB3 systems sporadically
+# had timeouts doing this with smaller page sizes.
+
+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 @optimizer_switch_saved=@@optimizer_switch;
+SET SESSION optimizer_switch='derived_merge=off';
+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 @@optimizer_switch=@optimizer_switch_saved;
+SET SESSION sort_buffer_size = DEFAULT;
+
+DROP TABLE t1;
+
+
+# The tests that uses these tables required the purge thread to run.
+# Just in case it has not by now, provide a 10 second wait.
+--sleep 10
+DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
+DROP TABLE t12637786;
+DROP TABLE t12963823;
diff --git a/mysql-test/suite/innodb_zip/t/4k.test b/mysql-test/suite/innodb_zip/t/4k.test
new file mode 100644
index 00000000000..6226c4abcee
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/4k.test
@@ -0,0 +1,440 @@
+# Tests for setting innodb-page-size=4k
+
+--source include/have_innodb.inc
+--source include/have_innodb_4k.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+let $MYSQLD_DATADIR = `select @@datadir`;
+let $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+--enable_query_log
+
+--echo # Test 1) Show the page size from Information Schema
+--disable_warnings
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_page_size';
+--enable_warnings
+
+--echo # Test 2) The number of buffer pool pages is dependent upon the page size.
+--disable_warnings
+--replace_result 6144 {checked_valid}
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+--enable_warnings
+
+--echo # Test 3) Query some information_shema tables that are dependent upon
+--echo # the page size.
+# Show the metadata for tables in schema 'mysql'.
+# Pulled from innodb-system-table-view.test
+# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are
+# unpredictable. They depend on whether mtr has created the database for
+# this test from scratch or is using a previously created database where
+# those tables have been dropped and recreated. Since we cannot force mtr
+# to use a freshly created database for this test we do not return the
+# table or index IDs. We can return the space IS of mysql schema tables
+# since they are created consistently during bootstrap.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+
+# Show the metadata for tables in schema 'test'.
+# Do not return the space ID since this tablespace may have existed before
+# this test runs. The root page number of each index should be consistent
+# within a file-per-table tablespace.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+--source suite/innodb/include/show_i_s_tablespaces.inc
+DROP TABLE t1, t2, t3, t4;
+
+--echo # Test 4) The maximum row size is dependent upon the page size.
+--echo # Redundant: 1979, Compact: 1982.
+--echo # Compressed: 1982, Dynamic: 1982.
+--echo # Each row format has its own amount of overhead that
+--echo # varies depending on number of fields and other overhead.
+
+SET SESSION innodb_strict_mode = ON;
+
+# Redundant table; 1927 bytes with 10 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(127)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(128)
+) ROW_FORMAT=redundant;
+
+# Compact table; 1955 bytes with 10 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=compact;
+
+# Compressed table; 1878 bytes with 10 CHAR fields
+# Bug#13391353 Limit is 1876 on 32-Linux only
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(76)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(79)
+) ROW_FORMAT=compressed;
+
+# Dynamic table; 1955 bytes with 10 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(155)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(156)
+) ROW_FORMAT=dynamic;
+
+#
+# Test the maximum key length
+# Moved from innodb-index.test since each page size has its own max key length.
+# Max Key Length is 768 for 4k pages.
+#
+# InnoDB assumes 3 bytes for each UTF8 character.
+#
+CREATE TABLE t1 (a varchar(64) character set utf8,
+ b varchar(64) character set utf8,
+ c varchar(64) character set utf8,
+ d varchar(64) character set utf8,
+ PRIMARY KEY (a,b,c,d))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(64) character set utf8,
+ b varchar(64) character set utf8,
+ c varchar(64) character set utf8,
+ d varchar(65) character set utf8,
+ PRIMARY KEY (a,b,c,d))
+ ENGINE=innodb;
+CREATE TABLE t1 (a varchar(64) character set utf8,
+ b varchar(64) character set utf8,
+ c varchar(64) character set utf8,
+ d varchar(64) character set utf8,
+ e varchar(64) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(64) character set utf8,
+ b varchar(64) character set utf8,
+ c varchar(64) character set utf8,
+ d varchar(64) character set utf8,
+ e varchar(65) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e))
+ ENGINE=innodb;
+
+--echo # Test 5) Make sure that KEY_BLOCK_SIZE=4, 2 & 1 are all
+--echo # accepted and that KEY_BLOCK_SIZE=16 & 8 are rejected
+--echo # in strict mode and converted to 4 in non-strict mode.
+
+SET SESSION innodb_strict_mode = ON;
+
+--error ER_ILLEGAL_HA
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+
+--error ER_ILLEGAL_HA
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+SET SESSION innodb_strict_mode = OFF;
+
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+
+--echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+--echo # are both rejected when innodb_file_per_table=OFF
+# Moved from innodb-zip.test
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_format = `Barracuda`;
+
+
+--echo # Test 7) Not included here; 16k only
+
+
+--echo # Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+
+# With no indexes defined, we can update all columns to max key part length.
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+ k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+
+# With one index defined, we can still update all fields.
+CREATE INDEX t1a ON t1 (a(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+ k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+
+# Add one more index and the UNDO record becomes too big to update all columns.
+# But a single transaction can update the columns in separate statements.
+# because the UNDO records will be smaller.
+CREATE INDEX t1b ON t1 (b(767));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+ k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+ n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+
+# Another index can still be added and a single field can still be updated
+CREATE INDEX t1c ON t1 (c(767));
+UPDATE t1 SET c=@e;
+
+# Add one more index and we cannot update a column to its defined index length.
+# This is a problem. It means that the DDL is allowed to create a table
+# that CANNOT be updated. See bug#12953735.
+CREATE INDEX t1d ON t1 (d(767));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET d=@e;
+
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE INDEX t1e ON t1 (e(767));
+
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+#
+# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT
+# IF SECONDARY KEY IS NEAR MAX
+# If the secondary index tuple is close to half the page size,
+# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected
+# in ibuf_insert(). In order to insure this does not happen, WL5756
+# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages.
+# The existing max key Size for 16k pages is 3072.
+#
+
+#-- disable_query_log
+# 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
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+# This flag is not used currently since it exposes valgrind error in ibuf
+# code with the following SQL
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET GLOBAL innodb_change_buffering_debug = 1;
+#-- enable_query_log
+
+# make sure the largest possible key entry can be added to the insert buffer.
+# Make enough records so that the root page is not a leaf page.
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+ pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+ pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+ pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+ pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+ sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+ sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+ sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+ sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+ PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+ pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+ KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+ sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+
+# Compressed tables do not compress parent pages. So the whole uncompressed
+# secondary tuple including the primary key must be able to fit in half the
+# compressed page size. This record length is enforced at index creation.
+# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE
+# the same as the page size.
+CREATE TABLE t1(
+ pk01 varchar(48), pk02 varchar(48), pk03 varchar(48), pk04 varchar(48),
+ pk05 varchar(48), pk06 varchar(48), pk07 varchar(48), pk08 varchar(48),
+ pk09 varchar(48), pk10 varchar(48), pk11 varchar(48), pk12 varchar(48),
+ pk13 varchar(48), pk14 varchar(48), pk15 varchar(48), pk16 varchar(48),
+ sk01 varchar(48), sk02 varchar(48), sk03 varchar(48), sk04 varchar(48),
+ sk05 varchar(48), sk06 varchar(48), sk07 varchar(48), sk08 varchar(48),
+ sk09 varchar(48), sk10 varchar(48), sk11 varchar(48), sk12 varchar(48),
+ sk13 varchar(48), sk14 varchar(48), sk15 varchar(48), sk16 varchar(48),
+ PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+ pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+ KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+ sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ ROW_FORMAT=Compressed KEY_BLOCK_SIZE=4 ENGINE=InnoDB;
+SET @r = repeat('a', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+
+#-- disable_query_log
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET GLOBAL innodb_change_buffering_debug = 0;
+#-- enable_query_log
+
+# 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;
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE TABLE t1(
+ c text NOT NULL, d text NOT NULL,
+ PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+DROP TABLE t1;
+CREATE TABLE t1(
+ c text NOT NULL, d text NOT NULL,
+ PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII;
+drop table t1;
+CREATE TABLE t1(
+ c text NOT NULL, d text NOT NULL,
+ PRIMARY KEY (c(767)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII;
+drop table t1;
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+DROP TABLE t1;
+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;
diff --git a/mysql-test/suite/innodb_zip/t/8k.test b/mysql-test/suite/innodb_zip/t/8k.test
new file mode 100644
index 00000000000..3a2e8755f57
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/8k.test
@@ -0,0 +1,468 @@
+# Tests for setting innodb-page-size=8k
+
+--source include/have_innodb.inc
+--source include/have_innodb_8k.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+let $MYSQLD_DATADIR = `select @@datadir`;
+let $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+--enable_query_log
+
+--echo # Test 1) Show the page size from Information Schema
+--disable_warnings
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_page_size';
+--enable_warnings
+
+--echo # Test 2) The number of buffer pool pages is dependent upon the page size.
+--disable_warnings
+--replace_result 3071 {checked_valid} 3072 {checked_valid}
+SELECT variable_value FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
+--enable_warnings
+
+--echo # Test 3) Query some information_shema tables that are dependent upon
+--echo # the page size.
+# Show the metadata for tables in schema 'mysql'.
+# Pulled from innodb-system-table-view.test
+# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats are
+# unpredictable. They depend on whether mtr has created the database for
+# this test from scratch or is using a previously created database where
+# those tables have been dropped and recreated. Since we cannot force mtr
+# to use a freshly created database for this test we do not return the
+# table or index IDs. We can return the space IS of mysql schema tables
+# since they are created consistently during bootstrap.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'mysql%'
+ ORDER BY t.name, i.index_id;
+
+CREATE TABLE t1 (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t2 (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t3 (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb;
+CREATE TABLE t4 (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+
+# Show the metadata for tables in schema 'test'.
+# Do not return the space ID since this tablespace may have existed before
+# this test runs. The root page number of each index should be consistent
+# within a file-per-table tablespace.
+SELECT t.name table_name, t.n_cols, t.flag table_flags,
+ i.name index_name, i.page_no root_page, i.type,
+ i.n_fields, i.merge_threshold
+ FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES t,
+ INFORMATION_SCHEMA.INNODB_SYS_INDEXES i
+ WHERE t.table_id = i.table_id
+ AND t.name LIKE 'test%'
+ ORDER BY t.name, i.name;
+--source suite/innodb/include/show_i_s_tablespaces.inc
+DROP TABLE t1, t2, t3, t4;
+
+--echo # Test 4) The maximum row size is dependent upon the page size.
+--echo # Redundant: 4027, Compact: 4030.
+--echo # Compressed: 4030, Dynamic: 4030.
+--echo # Each row format has its own amount of overhead that
+--echo # varies depending on number of fields and other overhead.
+
+SET SESSION innodb_strict_mode = ON;
+
+# Redundant table; 3955 bytes with 20 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(155)
+) ROW_FORMAT=redundant;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(156)
+) ROW_FORMAT=redundant;
+
+# Compact table; 4002 bytes with 20 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=compact;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=compact;
+
+# Compressed table; 3905 bytes with 20 CHAR fields
+# Bug#13391353 Limit is 3903 on 32-Linux only
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(103)
+) ROW_FORMAT=compressed;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(106)
+) ROW_FORMAT=compressed;
+
+# Dynamic table; 4002 bytes with 20 CHAR fields
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(202)
+) ROW_FORMAT=dynamic;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
+c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
+c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
+c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(203)
+) ROW_FORMAT=dynamic;
+
+#
+# Test the maximum key length
+# Moved from innodb-index.test since each page size has its own max key length.
+# Max Key Length is 1536 for 8k pages.
+#
+# InnoDB assumes 3 bytes for each UTF8 character.
+#
+CREATE TABLE t1 (a varchar(128) character set utf8,
+ b varchar(128) character set utf8,
+ c varchar(128) character set utf8,
+ d varchar(128) character set utf8,
+ PRIMARY KEY (a,b,c,d))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(128) character set utf8,
+ b varchar(128) character set utf8,
+ c varchar(128) character set utf8,
+ d varchar(129) character set utf8,
+ PRIMARY KEY (a,b,c,d))
+ ENGINE=innodb;
+CREATE TABLE t1 (a varchar(128) character set utf8,
+ b varchar(128) character set utf8,
+ c varchar(128) character set utf8,
+ d varchar(128) character set utf8,
+ e varchar(128) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e))
+ ENGINE=innodb;
+DROP TABLE t1;
+--error ER_TOO_LONG_KEY
+CREATE TABLE t1 (a varchar(128) character set utf8,
+ b varchar(128) character set utf8,
+ c varchar(128) character set utf8,
+ d varchar(128) character set utf8,
+ e varchar(129) character set utf8,
+ PRIMARY KEY (a), KEY (b,c,d,e))
+ ENGINE=innodb;
+
+--echo # Test 5) Make sure that KEY_BLOCK_SIZE=8, 4, 2 & 1 are all
+--echo # accepted and that KEY_BLOCK_SIZE=16 is rejected in
+--echo # strict mode and converted to 8 in non-strict mode.
+
+SET SESSION innodb_strict_mode = ON;
+
+--error ER_ILLEGAL_HA
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+SET SESSION innodb_strict_mode = OFF;
+
+CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT table_name, row_format, create_options
+ FROM information_schema.tables WHERE table_name = 't1';
+DROP TABLE t1;
+
+
+--echo # Test 6) Make sure that KEY_BLOCK_SIZE = 8 and 16
+--echo # are rejected when innodb_file_per_table=OFF
+# Moved from innodb-zip.test
+SET SESSION innodb_strict_mode = ON;
+SET GLOBAL innodb_file_per_table = OFF;
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_per_table = ON;
+SET GLOBAL innodb_file_format = `Antelope`;
+--error ER_ILLEGAL_HA
+CREATE TABLE t4 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=8;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA
+CREATE TABLE t5 (id int PRIMARY KEY) ENGINE=innodb KEY_BLOCK_SIZE=16;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_format = `Barracuda`;
+
+
+--echo # Test 7) Not included here; 16k only
+
+
+--echo # Test 8) Test creating a table that could lead to undo log overflow.
+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;
+SET @a = repeat('a', 767);
+SET @b = repeat('b', 767);
+SET @c = repeat('c', 767);
+SET @d = repeat('d', 767);
+SET @e = repeat('e', 767);
+
+# With no indexes defined, we can update all columns to max key part length.
+INSERT INTO t1 VALUES (@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a,@a);
+UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
+ k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
+
+# With this many indexes defined, we can still update all fields.
+CREATE INDEX t1a ON t1 (a(767));
+CREATE INDEX t1b ON t1 (b(767));
+UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
+ k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
+
+# Add one more index and the UNDO record becomes too big to update all columns.
+# But a single transaction can update the columns in separate statements.
+# because the UNDO records will be smaller.
+CREATE INDEX t1c ON t1 (c(767));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d,f=@d,g=@d,h=@d,i=@d,j=@d,
+ k=@d,l=@d,m=@d,n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+BEGIN;
+UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
+UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d,k=@d,l=@d,m=@d,
+ n=@d,o=@d,p=@d,q=@d,r=@d,s=@d,t=@d,u=@d;
+COMMIT;
+
+# More indexes can still be added and a single field can still be updated
+CREATE INDEX t1d ON t1 (d(767));
+UPDATE t1 SET d=@e;
+CREATE INDEX t1e ON t1 (e(767));
+UPDATE t1 SET e=@e;
+CREATE INDEX t1f ON t1 (f(767));
+UPDATE t1 SET f=@e;
+CREATE INDEX t1g ON t1 (g(767));
+UPDATE t1 SET g=@e;
+CREATE INDEX t1h ON t1 (h(767));
+UPDATE t1 SET h=@e;
+CREATE INDEX t1i ON t1 (i(767));
+UPDATE t1 SET i=@e;
+
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE INDEX t1k ON t1 (j(767));
+
+# But it does allow a 500 byte index. And with this, we cannot
+# update the record. This is a problem. It means that the DDL is
+# allowed to create a table and a record that CANNOT be updated.
+# See bug#12953735
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE INDEX t1j ON t1 (j(500));
+--error ER_UNDO_RECORD_TOO_BIG
+UPDATE t1 SET j=@e;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+#
+# Bug #13336585 - INNODB: CHANGE BUFFERING WITH 4K PAGES CAN ASSERT
+# IF SECONDARY KEY IS NEAR MAX
+# If the secondary index tuple is close to half the page size,
+# ibuf_insert_low() could return DB_TOO_BIG_RECORD, which is not expected
+# in ibuf_insert(). In order to insure this does not happen, WL5756
+# imposes a maximum key length of 768 for 4k pages and 1536 for 8k pages.
+# The existing max key Size for 16k pages is 3072.
+#
+
+#-- disable_query_log
+# 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
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET GLOBAL innodb_change_buffering_debug = 1;
+#-- enable_query_log
+
+# make sure the largest possible key entry can be added to the insert buffer.
+# Make enough records so that the root page is not a leaf page.
+SET SESSION innodb_strict_mode = OFF;
+CREATE TABLE t1(
+ pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+ pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+ pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+ pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+ sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+ sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+ sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+ sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+ PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+ pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+ KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+ sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ ROW_FORMAT=Redundant ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+
+# Compressed tables do not compress parent pages. So the whole uncompressed
+# secondary tuple including the primary key must be able to fit in half the
+# compressed page size. This record length is enforced at index creation.
+# So the only way to get an ibuf tuple too big is to make the KEY_BLOCK_SIZE
+# the same as the page size.
+CREATE TABLE t1(
+ pk01 varchar(96), pk02 varchar(96), pk03 varchar(96), pk04 varchar(96),
+ pk05 varchar(96), pk06 varchar(96), pk07 varchar(96), pk08 varchar(96),
+ pk09 varchar(96), pk10 varchar(96), pk11 varchar(96), pk12 varchar(96),
+ pk13 varchar(96), pk14 varchar(96), pk15 varchar(96), pk16 varchar(96),
+ sk01 varchar(96), sk02 varchar(96), sk03 varchar(96), sk04 varchar(96),
+ sk05 varchar(96), sk06 varchar(96), sk07 varchar(96), sk08 varchar(96),
+ sk09 varchar(96), sk10 varchar(96), sk11 varchar(96), sk12 varchar(96),
+ sk13 varchar(96), sk14 varchar(96), sk15 varchar(96), sk16 varchar(96),
+ PRIMARY KEY pk(pk01,pk02,pk03,pk04,pk05,pk06,pk07,pk08,
+ pk09,pk10,pk11,pk12,pk13,pk14,pk15,pk16),
+ KEY pk(sk01,sk02,sk03,sk04,sk05,sk06,sk07,sk08,
+ sk09,sk10,sk11,sk12,sk13,sk14,sk15,sk16))
+ ROW_FORMAT=Compressed KEY_BLOCK_SIZE=8 ENGINE=InnoDB;
+SET @r = repeat('a', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,
+ @r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
+DELETE from t1;
+DROP TABLE t1;
+
+#-- disable_query_log
+#-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+#SET GLOBAL innodb_change_buffering_debug = 0;
+#-- enable_query_log
+
+# 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;
+--replace_regex /> [0-9]*/> max_row_size/
+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;
+DROP TABLE t1;
+--replace_regex /> [0-9]*/> max_row_size/
+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;
+DROP TABLE t1;
+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;
+--replace_regex /> [0-9]*/> max_row_size/
+CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
+DROP TABLE t1;
+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;
diff --git a/mysql-test/suite/innodb_zip/t/bug36169.test b/mysql-test/suite/innodb_zip/t/bug36169.test
new file mode 100644
index 00000000000..5452c929b92
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/bug36169.test
@@ -0,0 +1,1162 @@
+#
+# Bug#36169 create innodb compressed table with too large row size crashed
+# http://bugs.mysql.com/36169
+#
+
+-- source include/have_innodb.inc
+-- source include/have_innodb_zip.inc
+
+let $file_per_table=`select @@innodb_file_per_table`;
+SET GLOBAL innodb_file_per_table=ON;
+
+#
+# The following is copied from http://bugs.mysql.com/36169
+# (http://bugs.mysql.com/file.php?id=9121)
+# Probably it can be simplified but that is not obvious.
+#
+
+# we care only that the following SQL commands do produce errors
+# as expected and do not crash the server
+-- disable_query_log
+-- disable_result_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+# Generating 10 tables
+# Creating a table with 94 columns and 24 indexes
+DROP TABLE IF EXISTS `table0`;
+set innodb_strict_mode=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table0`
+(`col0` BOOL,
+`col1` BOOL,
+`col2` TINYINT,
+`col3` DATE,
+`col4` TIME,
+`col5` SET ('test1','test2','test3'),
+`col6` TIME,
+`col7` TEXT,
+`col8` DECIMAL,
+`col9` SET ('test1','test2','test3'),
+`col10` FLOAT,
+`col11` DOUBLE PRECISION,
+`col12` ENUM ('test1','test2','test3'),
+`col13` TINYBLOB,
+`col14` YEAR,
+`col15` SET ('test1','test2','test3'),
+`col16` NUMERIC,
+`col17` NUMERIC,
+`col18` BLOB,
+`col19` DATETIME,
+`col20` DOUBLE PRECISION,
+`col21` DECIMAL,
+`col22` DATETIME,
+`col23` NUMERIC,
+`col24` NUMERIC,
+`col25` LONGTEXT,
+`col26` TINYBLOB,
+`col27` TIME,
+`col28` TINYBLOB,
+`col29` ENUM ('test1','test2','test3'),
+`col30` SMALLINT,
+`col31` REAL,
+`col32` FLOAT,
+`col33` CHAR (175),
+`col34` TINYTEXT,
+`col35` TINYTEXT,
+`col36` TINYBLOB,
+`col37` TINYBLOB,
+`col38` TINYTEXT,
+`col39` MEDIUMBLOB,
+`col40` TIMESTAMP,
+`col41` DOUBLE,
+`col42` SMALLINT,
+`col43` LONGBLOB,
+`col44` VARCHAR (80),
+`col45` MEDIUMTEXT,
+`col46` NUMERIC,
+`col47` BIGINT,
+`col48` DATE,
+`col49` TINYBLOB,
+`col50` DATE,
+`col51` BOOL,
+`col52` MEDIUMINT,
+`col53` FLOAT,
+`col54` TINYBLOB,
+`col55` LONGTEXT,
+`col56` SMALLINT,
+`col57` ENUM ('test1','test2','test3'),
+`col58` DATETIME,
+`col59` MEDIUMTEXT,
+`col60` VARCHAR (232),
+`col61` NUMERIC,
+`col62` YEAR,
+`col63` SMALLINT,
+`col64` TIMESTAMP,
+`col65` BLOB,
+`col66` LONGBLOB,
+`col67` INT,
+`col68` LONGTEXT,
+`col69` ENUM ('test1','test2','test3'),
+`col70` INT,
+`col71` TIME,
+`col72` TIMESTAMP,
+`col73` TIMESTAMP,
+`col74` VARCHAR (170),
+`col75` SET ('test1','test2','test3'),
+`col76` TINYBLOB,
+`col77` BIGINT,
+`col78` NUMERIC,
+`col79` DATETIME,
+`col80` YEAR,
+`col81` NUMERIC,
+`col82` LONGBLOB,
+`col83` TEXT,
+`col84` CHAR (83),
+`col85` DECIMAL,
+`col86` FLOAT,
+`col87` INT,
+`col88` VARCHAR (145),
+`col89` DATE,
+`col90` DECIMAL,
+`col91` DECIMAL,
+`col92` MEDIUMBLOB,
+`col93` TIME,
+KEY `idx0` (`col69`,`col90`,`col8`),
+KEY `idx1` (`col60`),
+KEY `idx2` (`col60`,`col70`,`col74`),
+KEY `idx3` (`col22`,`col32`,`col72`,`col30`),
+KEY `idx4` (`col29`),
+KEY `idx5` (`col19`,`col45`(143)),
+KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)),
+KEY `idx7` (`col48`,`col61`),
+KEY `idx8` (`col93`),
+KEY `idx9` (`col31`),
+KEY `idx10` (`col30`,`col21`),
+KEY `idx11` (`col67`),
+KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)),
+KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)),
+KEY `idx14` (`col78`),
+KEY `idx15` (`col63`,`col67`,`col64`),
+KEY `idx16` (`col17`,`col86`),
+KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)),
+KEY `idx18` (`col62`),
+KEY `idx19` (`col31`,`col57`,`col56`,`col53`),
+KEY `idx20` (`col46`),
+KEY `idx21` (`col83`(54)),
+KEY `idx22` (`col51`,`col7`(120)),
+KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`)
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET sql_mode = default;
+
+# Creating a table with 10 columns and 32 indexes
+DROP TABLE IF EXISTS `table1`;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table1`
+(`col0` CHAR (113),
+`col1` FLOAT,
+`col2` BIGINT,
+`col3` DECIMAL,
+`col4` BLOB,
+`col5` LONGTEXT,
+`col6` SET ('test1','test2','test3'),
+`col7` BIGINT,
+`col8` BIGINT,
+`col9` TINYBLOB,
+KEY `idx0` (`col5`(101),`col7`,`col8`),
+KEY `idx1` (`col8`),
+KEY `idx2` (`col4`(177),`col9`(126),`col6`,`col3`),
+KEY `idx3` (`col5`(160)),
+KEY `idx4` (`col9`(242)),
+KEY `idx5` (`col4`(139),`col2`,`col3`),
+KEY `idx6` (`col7`),
+KEY `idx7` (`col6`,`col2`,`col0`,`col3`),
+KEY `idx8` (`col9`(66)),
+KEY `idx9` (`col5`(253)),
+KEY `idx10` (`col1`,`col7`,`col2`),
+KEY `idx11` (`col9`(242),`col0`,`col8`,`col5`(163)),
+KEY `idx12` (`col8`),
+KEY `idx13` (`col0`,`col9`(37)),
+KEY `idx14` (`col0`),
+KEY `idx15` (`col5`(111)),
+KEY `idx16` (`col8`,`col0`,`col5`(13)),
+KEY `idx17` (`col4`(139)),
+KEY `idx18` (`col5`(189),`col2`,`col3`,`col9`(136)),
+KEY `idx19` (`col0`,`col3`,`col1`,`col8`),
+KEY `idx20` (`col8`),
+KEY `idx21` (`col0`,`col7`,`col9`(227),`col3`),
+KEY `idx22` (`col0`),
+KEY `idx23` (`col2`),
+KEY `idx24` (`col3`),
+KEY `idx25` (`col2`,`col3`),
+KEY `idx26` (`col0`),
+KEY `idx27` (`col5`(254)),
+KEY `idx28` (`col3`),
+KEY `idx29` (`col3`),
+KEY `idx30` (`col7`,`col3`,`col0`,`col4`(220)),
+KEY `idx31` (`col4`(1),`col0`)
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+# Creating a table with 141 columns and 18 indexes
+DROP TABLE IF EXISTS `table2`;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table2`
+(`col0` BOOL,
+`col1` MEDIUMINT,
+`col2` VARCHAR (209),
+`col3` MEDIUMBLOB,
+`col4` CHAR (13),
+`col5` DOUBLE,
+`col6` TINYTEXT,
+`col7` REAL,
+`col8` SMALLINT,
+`col9` BLOB,
+`col10` TINYINT,
+`col11` DECIMAL,
+`col12` BLOB,
+`col13` DECIMAL,
+`col14` LONGBLOB,
+`col15` SMALLINT,
+`col16` LONGBLOB,
+`col17` TINYTEXT,
+`col18` FLOAT,
+`col19` CHAR (78),
+`col20` MEDIUMTEXT,
+`col21` SET ('test1','test2','test3'),
+`col22` MEDIUMINT,
+`col23` INT,
+`col24` MEDIUMBLOB,
+`col25` ENUM ('test1','test2','test3'),
+`col26` TINYBLOB,
+`col27` VARCHAR (116),
+`col28` TIMESTAMP,
+`col29` BLOB,
+`col30` SMALLINT,
+`col31` DOUBLE PRECISION,
+`col32` DECIMAL,
+`col33` DECIMAL,
+`col34` TEXT,
+`col35` MEDIUMINT,
+`col36` MEDIUMINT,
+`col37` BIGINT,
+`col38` VARCHAR (253),
+`col39` TINYBLOB,
+`col40` MEDIUMBLOB,
+`col41` BIGINT,
+`col42` DOUBLE,
+`col43` TEXT,
+`col44` BLOB,
+`col45` TIME,
+`col46` MEDIUMINT,
+`col47` DOUBLE PRECISION,
+`col48` SET ('test1','test2','test3'),
+`col49` DOUBLE PRECISION,
+`col50` VARCHAR (97),
+`col51` TEXT,
+`col52` NUMERIC,
+`col53` ENUM ('test1','test2','test3'),
+`col54` MEDIUMTEXT,
+`col55` MEDIUMINT,
+`col56` DATETIME,
+`col57` DATETIME,
+`col58` MEDIUMTEXT,
+`col59` CHAR (244),
+`col60` LONGBLOB,
+`col61` MEDIUMBLOB,
+`col62` DOUBLE,
+`col63` SMALLINT,
+`col64` BOOL,
+`col65` SMALLINT,
+`col66` VARCHAR (212),
+`col67` TIME,
+`col68` REAL,
+`col69` BOOL,
+`col70` BIGINT,
+`col71` DATE,
+`col72` TINYINT,
+`col73` ENUM ('test1','test2','test3'),
+`col74` DATE,
+`col75` TIME,
+`col76` DATETIME,
+`col77` BOOL,
+`col78` TINYTEXT,
+`col79` MEDIUMINT,
+`col80` NUMERIC,
+`col81` LONGTEXT,
+`col82` SET ('test1','test2','test3'),
+`col83` DOUBLE PRECISION,
+`col84` NUMERIC,
+`col85` VARCHAR (184),
+`col86` DOUBLE PRECISION,
+`col87` MEDIUMTEXT,
+`col88` MEDIUMBLOB,
+`col89` BOOL,
+`col90` SMALLINT,
+`col91` TINYINT,
+`col92` ENUM ('test1','test2','test3'),
+`col93` BOOL,
+`col94` TIMESTAMP,
+`col95` BOOL,
+`col96` MEDIUMTEXT,
+`col97` DECIMAL,
+`col98` BOOL,
+`col99` DECIMAL,
+`col100` MEDIUMINT,
+`col101` DOUBLE PRECISION,
+`col102` TINYINT,
+`col103` BOOL,
+`col104` MEDIUMINT,
+`col105` DECIMAL,
+`col106` NUMERIC,
+`col107` TIMESTAMP,
+`col108` MEDIUMBLOB,
+`col109` TINYBLOB,
+`col110` SET ('test1','test2','test3'),
+`col111` YEAR,
+`col112` TIMESTAMP,
+`col113` CHAR (201),
+`col114` BOOL,
+`col115` TINYINT,
+`col116` DOUBLE,
+`col117` TINYINT,
+`col118` TIMESTAMP,
+`col119` SET ('test1','test2','test3'),
+`col120` SMALLINT,
+`col121` TINYBLOB,
+`col122` TIMESTAMP,
+`col123` BLOB,
+`col124` DATE,
+`col125` SMALLINT,
+`col126` ENUM ('test1','test2','test3'),
+`col127` MEDIUMBLOB,
+`col128` DOUBLE PRECISION,
+`col129` REAL,
+`col130` VARCHAR (159),
+`col131` MEDIUMBLOB,
+`col132` BIGINT,
+`col133` INT,
+`col134` SET ('test1','test2','test3'),
+`col135` CHAR (198),
+`col136` SET ('test1','test2','test3'),
+`col137` MEDIUMTEXT,
+`col138` SMALLINT,
+`col139` BLOB,
+`col140` LONGBLOB,
+KEY `idx0` (`col14`(139),`col24`(208),`col38`,`col35`),
+KEY `idx1` (`col48`,`col118`,`col29`(131),`col100`),
+KEY `idx2` (`col86`,`col67`,`col43`(175)),
+KEY `idx3` (`col19`),
+KEY `idx4` (`col40`(220),`col67`),
+KEY `idx5` (`col99`,`col56`),
+KEY `idx6` (`col68`,`col28`,`col137`(157)),
+KEY `idx7` (`col51`(160),`col99`,`col45`,`col39`(9)),
+KEY `idx8` (`col15`,`col52`,`col90`,`col94`),
+KEY `idx9` (`col24`(3),`col139`(248),`col108`(118),`col41`),
+KEY `idx10` (`col36`,`col92`,`col114`),
+KEY `idx11` (`col115`,`col9`(116)),
+KEY `idx12` (`col130`,`col93`,`col134`),
+KEY `idx13` (`col123`(65)),
+KEY `idx14` (`col44`(90),`col86`,`col119`),
+KEY `idx15` (`col69`),
+KEY `idx16` (`col132`,`col81`(118),`col18`),
+KEY `idx17` (`col24`(250),`col7`,`col92`,`col45`)
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+# Creating a table with 199 columns and 1 indexes
+DROP TABLE IF EXISTS `table3`;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table3`
+(`col0` SMALLINT,
+`col1` SET ('test1','test2','test3'),
+`col2` TINYTEXT,
+`col3` DOUBLE,
+`col4` NUMERIC,
+`col5` DATE,
+`col6` BIGINT,
+`col7` DOUBLE,
+`col8` TEXT,
+`col9` INT,
+`col10` REAL,
+`col11` TINYINT,
+`col12` NUMERIC,
+`col13` NUMERIC,
+`col14` TIME,
+`col15` DOUBLE,
+`col16` REAL,
+`col17` MEDIUMBLOB,
+`col18` YEAR,
+`col19` TINYTEXT,
+`col20` YEAR,
+`col21` CHAR (250),
+`col22` TINYINT,
+`col23` TINYINT,
+`col24` SMALLINT,
+`col25` DATETIME,
+`col26` MEDIUMINT,
+`col27` LONGBLOB,
+`col28` VARCHAR (106),
+`col29` FLOAT,
+`col30` MEDIUMTEXT,
+`col31` TINYBLOB,
+`col32` BIGINT,
+`col33` YEAR,
+`col34` REAL,
+`col35` MEDIUMBLOB,
+`col36` LONGTEXT,
+`col37` LONGBLOB,
+`col38` BIGINT,
+`col39` FLOAT,
+`col40` TIME,
+`col41` DATETIME,
+`col42` BOOL,
+`col43` BIGINT,
+`col44` SMALLINT,
+`col45` TIME,
+`col46` DOUBLE PRECISION,
+`col47` TIME,
+`col48` TINYTEXT,
+`col49` DOUBLE PRECISION,
+`col50` BIGINT,
+`col51` NUMERIC,
+`col52` TINYBLOB,
+`col53` DATE,
+`col54` DECIMAL,
+`col55` SMALLINT,
+`col56` TINYTEXT,
+`col57` ENUM ('test1','test2','test3'),
+`col58` YEAR,
+`col59` TIME,
+`col60` TINYINT,
+`col61` DECIMAL,
+`col62` DOUBLE,
+`col63` DATE,
+`col64` LONGTEXT,
+`col65` DOUBLE,
+`col66` VARCHAR (88),
+`col67` MEDIUMTEXT,
+`col68` DATE,
+`col69` MEDIUMINT,
+`col70` DECIMAL,
+`col71` MEDIUMTEXT,
+`col72` LONGTEXT,
+`col73` REAL,
+`col74` DOUBLE,
+`col75` TIME,
+`col76` DATE,
+`col77` DECIMAL,
+`col78` MEDIUMBLOB,
+`col79` NUMERIC,
+`col80` BIGINT,
+`col81` YEAR,
+`col82` SMALLINT,
+`col83` MEDIUMINT,
+`col84` TINYINT,
+`col85` MEDIUMBLOB,
+`col86` TIME,
+`col87` MEDIUMBLOB,
+`col88` LONGTEXT,
+`col89` BOOL,
+`col90` BLOB,
+`col91` LONGBLOB,
+`col92` YEAR,
+`col93` BLOB,
+`col94` INT,
+`col95` TINYTEXT,
+`col96` TINYINT,
+`col97` DECIMAL,
+`col98` ENUM ('test1','test2','test3'),
+`col99` MEDIUMINT,
+`col100` TINYINT,
+`col101` MEDIUMBLOB,
+`col102` TINYINT,
+`col103` SET ('test1','test2','test3'),
+`col104` TIMESTAMP,
+`col105` TEXT,
+`col106` DATETIME,
+`col107` MEDIUMTEXT,
+`col108` CHAR (220),
+`col109` TIME,
+`col110` VARCHAR (131),
+`col111` DECIMAL,
+`col112` FLOAT,
+`col113` SMALLINT,
+`col114` BIGINT,
+`col115` LONGBLOB,
+`col116` SET ('test1','test2','test3'),
+`col117` ENUM ('test1','test2','test3'),
+`col118` BLOB,
+`col119` MEDIUMTEXT,
+`col120` SET ('test1','test2','test3'),
+`col121` DATETIME,
+`col122` FLOAT,
+`col123` VARCHAR (242),
+`col124` YEAR,
+`col125` MEDIUMBLOB,
+`col126` TIME,
+`col127` BOOL,
+`col128` TINYBLOB,
+`col129` DOUBLE,
+`col130` TINYINT,
+`col131` BIGINT,
+`col132` SMALLINT,
+`col133` INT,
+`col134` DOUBLE PRECISION,
+`col135` MEDIUMBLOB,
+`col136` SET ('test1','test2','test3'),
+`col137` TINYTEXT,
+`col138` DOUBLE PRECISION,
+`col139` NUMERIC,
+`col140` BLOB,
+`col141` SET ('test1','test2','test3'),
+`col142` INT,
+`col143` VARCHAR (26),
+`col144` BLOB,
+`col145` REAL,
+`col146` SET ('test1','test2','test3'),
+`col147` LONGBLOB,
+`col148` TEXT,
+`col149` BLOB,
+`col150` CHAR (189),
+`col151` LONGTEXT,
+`col152` INT,
+`col153` FLOAT,
+`col154` LONGTEXT,
+`col155` DATE,
+`col156` LONGBLOB,
+`col157` TINYBLOB,
+`col158` REAL,
+`col159` DATE,
+`col160` TIME,
+`col161` YEAR,
+`col162` DOUBLE,
+`col163` VARCHAR (90),
+`col164` FLOAT,
+`col165` NUMERIC,
+`col166` ENUM ('test1','test2','test3'),
+`col167` DOUBLE PRECISION,
+`col168` DOUBLE PRECISION,
+`col169` TINYBLOB,
+`col170` TIME,
+`col171` SMALLINT,
+`col172` TINYTEXT,
+`col173` SMALLINT,
+`col174` DOUBLE,
+`col175` VARCHAR (14),
+`col176` VARCHAR (90),
+`col177` REAL,
+`col178` MEDIUMINT,
+`col179` TINYBLOB,
+`col180` FLOAT,
+`col181` TIMESTAMP,
+`col182` REAL,
+`col183` DOUBLE PRECISION,
+`col184` BIGINT,
+`col185` INT,
+`col186` MEDIUMTEXT,
+`col187` TIME,
+`col188` FLOAT,
+`col189` TIME,
+`col190` INT,
+`col191` FLOAT,
+`col192` MEDIUMINT,
+`col193` TINYINT,
+`col194` MEDIUMTEXT,
+`col195` DATE,
+`col196` TIME,
+`col197` YEAR,
+`col198` CHAR (206),
+KEY `idx0` (`col39`,`col23`)
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+# Creating a table with 133 columns and 16 indexes
+DROP TABLE IF EXISTS `table4`;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table4`
+(`col0` VARCHAR (60),
+`col1` NUMERIC,
+`col2` LONGTEXT,
+`col3` MEDIUMTEXT,
+`col4` LONGTEXT,
+`col5` LONGBLOB,
+`col6` LONGBLOB,
+`col7` DATETIME,
+`col8` TINYTEXT,
+`col9` BLOB,
+`col10` BOOL,
+`col11` BIGINT,
+`col12` TEXT,
+`col13` VARCHAR (213),
+`col14` TINYBLOB,
+`col15` BOOL,
+`col16` MEDIUMTEXT,
+`col17` DOUBLE,
+`col18` TEXT,
+`col19` BLOB,
+`col20` SET ('test1','test2','test3'),
+`col21` TINYINT,
+`col22` DATETIME,
+`col23` TINYINT,
+`col24` ENUM ('test1','test2','test3'),
+`col25` REAL,
+`col26` BOOL,
+`col27` FLOAT,
+`col28` LONGBLOB,
+`col29` DATETIME,
+`col30` FLOAT,
+`col31` SET ('test1','test2','test3'),
+`col32` LONGBLOB,
+`col33` NUMERIC,
+`col34` YEAR,
+`col35` VARCHAR (146),
+`col36` BIGINT,
+`col37` DATETIME,
+`col38` DATE,
+`col39` SET ('test1','test2','test3'),
+`col40` CHAR (112),
+`col41` FLOAT,
+`col42` YEAR,
+`col43` TIME,
+`col44` DOUBLE,
+`col45` NUMERIC,
+`col46` FLOAT,
+`col47` DECIMAL,
+`col48` BIGINT,
+`col49` DECIMAL,
+`col50` YEAR,
+`col51` MEDIUMTEXT,
+`col52` LONGBLOB,
+`col53` SET ('test1','test2','test3'),
+`col54` BLOB,
+`col55` FLOAT,
+`col56` REAL,
+`col57` REAL,
+`col58` TEXT,
+`col59` MEDIUMBLOB,
+`col60` INT,
+`col61` INT,
+`col62` DATE,
+`col63` TEXT,
+`col64` DATE,
+`col65` ENUM ('test1','test2','test3'),
+`col66` DOUBLE PRECISION,
+`col67` TINYTEXT,
+`col68` TINYBLOB,
+`col69` FLOAT,
+`col70` BLOB,
+`col71` DATETIME,
+`col72` DOUBLE,
+`col73` LONGTEXT,
+`col74` TIME,
+`col75` DATETIME,
+`col76` VARCHAR (122),
+`col77` MEDIUMTEXT,
+`col78` MEDIUMTEXT,
+`col79` BOOL,
+`col80` LONGTEXT,
+`col81` TINYTEXT,
+`col82` NUMERIC,
+`col83` DOUBLE PRECISION,
+`col84` DATE,
+`col85` YEAR,
+`col86` BLOB,
+`col87` TINYTEXT,
+`col88` DOUBLE PRECISION,
+`col89` MEDIUMINT,
+`col90` MEDIUMTEXT,
+`col91` NUMERIC,
+`col92` DATETIME,
+`col93` NUMERIC,
+`col94` SET ('test1','test2','test3'),
+`col95` TINYTEXT,
+`col96` SET ('test1','test2','test3'),
+`col97` YEAR,
+`col98` MEDIUMINT,
+`col99` TEXT,
+`col100` TEXT,
+`col101` TIME,
+`col102` VARCHAR (225),
+`col103` TINYTEXT,
+`col104` TEXT,
+`col105` MEDIUMTEXT,
+`col106` TINYINT,
+`col107` TEXT,
+`col108` LONGBLOB,
+`col109` LONGTEXT,
+`col110` TINYTEXT,
+`col111` CHAR (56),
+`col112` YEAR,
+`col113` ENUM ('test1','test2','test3'),
+`col114` TINYBLOB,
+`col115` DATETIME,
+`col116` DATE,
+`col117` TIME,
+`col118` MEDIUMTEXT,
+`col119` DOUBLE PRECISION,
+`col120` FLOAT,
+`col121` TIMESTAMP,
+`col122` MEDIUMINT,
+`col123` YEAR,
+`col124` DATE,
+`col125` TEXT,
+`col126` FLOAT,
+`col127` TINYTEXT,
+`col128` BOOL,
+`col129` NUMERIC,
+`col130` TIMESTAMP,
+`col131` INT,
+`col132` MEDIUMBLOB,
+KEY `idx0` (`col130`),
+KEY `idx1` (`col30`,`col55`,`col19`(31)),
+KEY `idx2` (`col104`(186)),
+KEY `idx3` (`col131`),
+KEY `idx4` (`col64`,`col93`,`col2`(11)),
+KEY `idx5` (`col34`,`col121`,`col22`),
+KEY `idx6` (`col33`,`col55`,`col83`),
+KEY `idx7` (`col17`,`col87`(245),`col99`(17)),
+KEY `idx8` (`col65`,`col120`),
+KEY `idx9` (`col82`),
+KEY `idx10` (`col9`(72)),
+KEY `idx11` (`col88`),
+KEY `idx12` (`col128`,`col9`(200),`col71`,`col66`),
+KEY `idx13` (`col77`(126)),
+KEY `idx14` (`col105`(26),`col13`,`col117`),
+KEY `idx15` (`col4`(246),`col130`,`col115`,`col3`(141))
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+# Creating a table with 176 columns and 13 indexes
+DROP TABLE IF EXISTS `table5`;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table5`
+(`col0` MEDIUMTEXT,
+`col1` VARCHAR (90),
+`col2` TINYTEXT,
+`col3` TIME,
+`col4` BOOL,
+`col5` TINYTEXT,
+`col6` BOOL,
+`col7` TIMESTAMP,
+`col8` TINYBLOB,
+`col9` TINYINT,
+`col10` YEAR,
+`col11` SET ('test1','test2','test3'),
+`col12` TEXT,
+`col13` CHAR (248),
+`col14` BIGINT,
+`col15` TEXT,
+`col16` TINYINT,
+`col17` NUMERIC,
+`col18` SET ('test1','test2','test3'),
+`col19` LONGBLOB,
+`col20` FLOAT,
+`col21` INT,
+`col22` TEXT,
+`col23` BOOL,
+`col24` DECIMAL,
+`col25` DOUBLE PRECISION,
+`col26` FLOAT,
+`col27` TINYBLOB,
+`col28` NUMERIC,
+`col29` MEDIUMBLOB,
+`col30` DATE,
+`col31` LONGTEXT,
+`col32` DATE,
+`col33` FLOAT,
+`col34` BIGINT,
+`col35` TINYTEXT,
+`col36` MEDIUMTEXT,
+`col37` TIME,
+`col38` INT,
+`col39` TINYINT,
+`col40` SET ('test1','test2','test3'),
+`col41` CHAR (130),
+`col42` SMALLINT,
+`col43` INT,
+`col44` MEDIUMTEXT,
+`col45` VARCHAR (126),
+`col46` INT,
+`col47` DOUBLE PRECISION,
+`col48` BIGINT,
+`col49` MEDIUMTEXT,
+`col50` TINYBLOB,
+`col51` MEDIUMINT,
+`col52` TEXT,
+`col53` VARCHAR (208),
+`col54` VARCHAR (207),
+`col55` NUMERIC,
+`col56` DATETIME,
+`col57` ENUM ('test1','test2','test3'),
+`col58` NUMERIC,
+`col59` TINYBLOB,
+`col60` VARCHAR (73),
+`col61` MEDIUMTEXT,
+`col62` TINYBLOB,
+`col63` DATETIME,
+`col64` NUMERIC,
+`col65` MEDIUMINT,
+`col66` DATETIME,
+`col67` NUMERIC,
+`col68` TINYINT,
+`col69` VARCHAR (58),
+`col70` DECIMAL,
+`col71` MEDIUMTEXT,
+`col72` DATE,
+`col73` TIME,
+`col74` DOUBLE PRECISION,
+`col75` DECIMAL,
+`col76` MEDIUMBLOB,
+`col77` REAL,
+`col78` YEAR,
+`col79` YEAR,
+`col80` LONGBLOB,
+`col81` BLOB,
+`col82` BIGINT,
+`col83` ENUM ('test1','test2','test3'),
+`col84` NUMERIC,
+`col85` SET ('test1','test2','test3'),
+`col86` MEDIUMTEXT,
+`col87` LONGBLOB,
+`col88` TIME,
+`col89` ENUM ('test1','test2','test3'),
+`col90` DECIMAL,
+`col91` FLOAT,
+`col92` DATETIME,
+`col93` TINYTEXT,
+`col94` TIMESTAMP,
+`col95` TIMESTAMP,
+`col96` TEXT,
+`col97` REAL,
+`col98` VARCHAR (198),
+`col99` TIME,
+`col100` TINYINT,
+`col101` BIGINT,
+`col102` LONGBLOB,
+`col103` LONGBLOB,
+`col104` MEDIUMINT,
+`col105` MEDIUMTEXT,
+`col106` TIMESTAMP,
+`col107` SMALLINT,
+`col108` NUMERIC,
+`col109` DECIMAL,
+`col110` FLOAT,
+`col111` DECIMAL,
+`col112` REAL,
+`col113` TINYTEXT,
+`col114` FLOAT,
+`col115` VARCHAR (7),
+`col116` LONGTEXT,
+`col117` DATE,
+`col118` BIGINT,
+`col119` TEXT,
+`col120` BIGINT,
+`col121` BLOB,
+`col122` CHAR (110),
+`col123` NUMERIC,
+`col124` MEDIUMBLOB,
+`col125` NUMERIC,
+`col126` NUMERIC,
+`col127` BOOL,
+`col128` TIME,
+`col129` TINYBLOB,
+`col130` TINYBLOB,
+`col131` DATE,
+`col132` INT,
+`col133` VARCHAR (123),
+`col134` CHAR (238),
+`col135` VARCHAR (225),
+`col136` LONGTEXT,
+`col137` LONGBLOB,
+`col138` REAL,
+`col139` TINYBLOB,
+`col140` DATETIME,
+`col141` TINYTEXT,
+`col142` LONGBLOB,
+`col143` BIGINT,
+`col144` VARCHAR (236),
+`col145` TEXT,
+`col146` YEAR,
+`col147` DECIMAL,
+`col148` TEXT,
+`col149` MEDIUMBLOB,
+`col150` TINYINT,
+`col151` BOOL,
+`col152` VARCHAR (72),
+`col153` INT,
+`col154` VARCHAR (165),
+`col155` TINYINT,
+`col156` MEDIUMTEXT,
+`col157` DOUBLE PRECISION,
+`col158` TIME,
+`col159` MEDIUMBLOB,
+`col160` LONGBLOB,
+`col161` DATETIME,
+`col162` DOUBLE PRECISION,
+`col163` BLOB,
+`col164` ENUM ('test1','test2','test3'),
+`col165` TIMESTAMP,
+`col166` DATE,
+`col167` TINYBLOB,
+`col168` TINYBLOB,
+`col169` LONGBLOB,
+`col170` DATETIME,
+`col171` BIGINT,
+`col172` VARCHAR (30),
+`col173` LONGTEXT,
+`col174` TIME,
+`col175` FLOAT,
+KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`),
+KEY `idx1` (`col24`,`col0`(108)),
+KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`),
+KEY `idx3` (`col2`(86)),
+KEY `idx4` (`col2`(43)),
+KEY `idx5` (`col83`,`col35`(87),`col111`),
+KEY `idx6` (`col6`,`col134`,`col92`),
+KEY `idx7` (`col56`),
+KEY `idx8` (`col30`,`col53`,`col129`(66)),
+KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)),
+KEY `idx10` (`col34`),
+KEY `idx11` (`col126`),
+KEY `idx12` (`col24`)
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+# Creating a table with 179 columns and 46 indexes
+DROP TABLE IF EXISTS `table6`;
+-- error ER_TOO_BIG_ROWSIZE
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE IF NOT EXISTS `table6`
+(`col0` ENUM ('test1','test2','test3'),
+`col1` MEDIUMBLOB,
+`col2` MEDIUMBLOB,
+`col3` DATETIME,
+`col4` DATE,
+`col5` YEAR,
+`col6` REAL,
+`col7` NUMERIC,
+`col8` MEDIUMBLOB,
+`col9` TEXT,
+`col10` TIMESTAMP,
+`col11` DOUBLE,
+`col12` DOUBLE,
+`col13` SMALLINT,
+`col14` TIMESTAMP,
+`col15` DECIMAL,
+`col16` DATE,
+`col17` TEXT,
+`col18` LONGBLOB,
+`col19` BIGINT,
+`col20` FLOAT,
+`col21` DATETIME,
+`col22` TINYINT,
+`col23` MEDIUMBLOB,
+`col24` SET ('test1','test2','test3'),
+`col25` TIME,
+`col26` TEXT,
+`col27` LONGTEXT,
+`col28` BIGINT,
+`col29` REAL,
+`col30` YEAR,
+`col31` MEDIUMBLOB,
+`col32` MEDIUMINT,
+`col33` FLOAT,
+`col34` TEXT,
+`col35` DATE,
+`col36` TIMESTAMP,
+`col37` REAL,
+`col38` BLOB,
+`col39` BLOB,
+`col40` BLOB,
+`col41` TINYBLOB,
+`col42` INT,
+`col43` TINYINT,
+`col44` REAL,
+`col45` BIGINT,
+`col46` TIMESTAMP,
+`col47` BLOB,
+`col48` ENUM ('test1','test2','test3'),
+`col49` BOOL,
+`col50` CHAR (109),
+`col51` DOUBLE,
+`col52` DOUBLE PRECISION,
+`col53` ENUM ('test1','test2','test3'),
+`col54` FLOAT,
+`col55` DOUBLE PRECISION,
+`col56` CHAR (166),
+`col57` TEXT,
+`col58` TIME,
+`col59` DECIMAL,
+`col60` TEXT,
+`col61` ENUM ('test1','test2','test3'),
+`col62` LONGTEXT,
+`col63` YEAR,
+`col64` DOUBLE,
+`col65` CHAR (87),
+`col66` DATE,
+`col67` BOOL,
+`col68` MEDIUMBLOB,
+`col69` DATETIME,
+`col70` DECIMAL,
+`col71` TIME,
+`col72` REAL,
+`col73` LONGTEXT,
+`col74` BLOB,
+`col75` REAL,
+`col76` INT,
+`col77` INT,
+`col78` FLOAT,
+`col79` DOUBLE,
+`col80` MEDIUMINT,
+`col81` ENUM ('test1','test2','test3'),
+`col82` VARCHAR (221),
+`col83` BIGINT,
+`col84` TINYINT,
+`col85` BIGINT,
+`col86` FLOAT,
+`col87` MEDIUMBLOB,
+`col88` CHAR (126),
+`col89` MEDIUMBLOB,
+`col90` DATETIME,
+`col91` TINYINT,
+`col92` DOUBLE,
+`col93` NUMERIC,
+`col94` DATE,
+`col95` BLOB,
+`col96` DATETIME,
+`col97` TIME,
+`col98` LONGBLOB,
+`col99` INT,
+`col100` SET ('test1','test2','test3'),
+`col101` TINYBLOB,
+`col102` INT,
+`col103` MEDIUMBLOB,
+`col104` MEDIUMTEXT,
+`col105` FLOAT,
+`col106` TINYBLOB,
+`col107` VARCHAR (26),
+`col108` TINYINT,
+`col109` TIME,
+`col110` TINYBLOB,
+`col111` LONGBLOB,
+`col112` TINYTEXT,
+`col113` FLOAT,
+`col114` TINYINT,
+`col115` NUMERIC,
+`col116` TIME,
+`col117` SET ('test1','test2','test3'),
+`col118` DATE,
+`col119` SMALLINT,
+`col120` BLOB,
+`col121` TINYTEXT,
+`col122` REAL,
+`col123` YEAR,
+`col124` REAL,
+`col125` BOOL,
+`col126` BLOB,
+`col127` REAL,
+`col128` MEDIUMBLOB,
+`col129` TIMESTAMP,
+`col130` LONGBLOB,
+`col131` MEDIUMBLOB,
+`col132` YEAR,
+`col133` YEAR,
+`col134` INT,
+`col135` MEDIUMINT,
+`col136` MEDIUMINT,
+`col137` TINYTEXT,
+`col138` TINYBLOB,
+`col139` BLOB,
+`col140` SET ('test1','test2','test3'),
+`col141` ENUM ('test1','test2','test3'),
+`col142` ENUM ('test1','test2','test3'),
+`col143` TINYTEXT,
+`col144` DATETIME,
+`col145` TEXT,
+`col146` DOUBLE PRECISION,
+`col147` DECIMAL,
+`col148` MEDIUMTEXT,
+`col149` TINYTEXT,
+`col150` SET ('test1','test2','test3'),
+`col151` MEDIUMTEXT,
+`col152` CHAR (126),
+`col153` DOUBLE,
+`col154` CHAR (243),
+`col155` SET ('test1','test2','test3'),
+`col156` SET ('test1','test2','test3'),
+`col157` DATETIME,
+`col158` DOUBLE,
+`col159` NUMERIC,
+`col160` DECIMAL,
+`col161` FLOAT,
+`col162` LONGBLOB,
+`col163` LONGTEXT,
+`col164` INT,
+`col165` TIME,
+`col166` CHAR (27),
+`col167` VARCHAR (63),
+`col168` TEXT,
+`col169` TINYBLOB,
+`col170` TINYBLOB,
+`col171` ENUM ('test1','test2','test3'),
+`col172` INT,
+`col173` TIME,
+`col174` DECIMAL,
+`col175` DOUBLE,
+`col176` MEDIUMBLOB,
+`col177` LONGBLOB,
+`col178` CHAR (43),
+KEY `idx0` (`col131`(219)),
+KEY `idx1` (`col67`,`col122`,`col59`,`col87`(33)),
+KEY `idx2` (`col83`,`col42`,`col57`(152)),
+KEY `idx3` (`col106`(124)),
+KEY `idx4` (`col173`,`col80`,`col165`,`col89`(78)),
+KEY `idx5` (`col174`,`col145`(108),`col23`(228),`col141`),
+KEY `idx6` (`col157`,`col140`),
+KEY `idx7` (`col130`(188),`col15`),
+KEY `idx8` (`col52`),
+KEY `idx9` (`col144`),
+KEY `idx10` (`col155`),
+KEY `idx11` (`col62`(230),`col1`(109)),
+KEY `idx12` (`col151`(24),`col95`(85)),
+KEY `idx13` (`col114`),
+KEY `idx14` (`col42`,`col98`(56),`col146`),
+KEY `idx15` (`col147`,`col39`(254),`col35`),
+KEY `idx16` (`col79`),
+KEY `idx17` (`col65`),
+KEY `idx18` (`col149`(165),`col168`(119),`col32`,`col117`),
+KEY `idx19` (`col64`),
+KEY `idx20` (`col93`),
+KEY `idx21` (`col64`,`col113`,`col104`(182)),
+KEY `idx22` (`col52`,`col111`(189)),
+KEY `idx23` (`col45`),
+KEY `idx24` (`col154`,`col107`,`col110`(159)),
+KEY `idx25` (`col149`(1),`col87`(131)),
+KEY `idx26` (`col58`,`col115`,`col63`),
+KEY `idx27` (`col95`(9),`col0`,`col87`(113)),
+KEY `idx28` (`col92`,`col130`(1)),
+KEY `idx29` (`col151`(129),`col137`(254),`col13`),
+KEY `idx30` (`col49`),
+KEY `idx31` (`col28`),
+KEY `idx32` (`col83`,`col146`),
+KEY `idx33` (`col155`,`col90`,`col17`(245)),
+KEY `idx34` (`col174`,`col169`(44),`col107`),
+KEY `idx35` (`col113`),
+KEY `idx36` (`col52`),
+KEY `idx37` (`col16`,`col120`(190)),
+KEY `idx38` (`col28`),
+KEY `idx39` (`col131`(165)),
+KEY `idx40` (`col135`,`col26`(86)),
+KEY `idx41` (`col69`,`col94`),
+KEY `idx42` (`col105`,`col151`(38),`col97`),
+KEY `idx43` (`col88`),
+KEY `idx44` (`col176`(100),`col42`,`col73`(189),`col94`),
+KEY `idx45` (`col2`(27),`col27`(116))
+)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+DROP TABLE IF EXISTS table0;
+DROP TABLE IF EXISTS table1;
+DROP TABLE IF EXISTS table2;
+DROP TABLE IF EXISTS table3;
+DROP TABLE IF EXISTS table4;
+DROP TABLE IF EXISTS table5;
+DROP TABLE IF EXISTS table6;
+
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
+SET sql_mode = default;
diff --git a/mysql-test/suite/innodb_zip/t/bug36172.test b/mysql-test/suite/innodb_zip/t/bug36172.test
new file mode 100644
index 00000000000..49590f40192
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/bug36172.test
@@ -0,0 +1,30 @@
+#
+# Test case for bug 36172
+#
+
+-- source include/not_embedded.inc
+-- source include/have_innodb.inc
+-- source include/have_innodb_16k.inc
+
+SET default_storage_engine=InnoDB;
+
+# we do not really care about what gets printed, we are only
+# interested in getting success or failure according to our
+# expectations
+
+-- disable_query_log
+-- disable_result_log
+
+let $file_per_table=`select @@innodb_file_per_table`;
+SET GLOBAL innodb_file_per_table=on;
+
+DROP TABLE IF EXISTS `table0`;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+SET sql_mode = default;
+insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
+CHECK TABLE table0 EXTENDED;
+INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
+CHECK TABLE table0 EXTENDED;
+DROP TABLE table0;
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_zip/t/bug52745.test b/mysql-test/suite/innodb_zip/t/bug52745.test
new file mode 100644
index 00000000000..a3de7323efe
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/bug52745.test
@@ -0,0 +1,105 @@
+-- source include/have_innodb.inc
+-- source include/have_innodb_zip.inc
+
+let $file_per_table=`select @@innodb_file_per_table`;
+SET GLOBAL innodb_file_per_table=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+CREATE TABLE bug52745 (
+ a2 int(10) unsigned DEFAULT NULL,
+ col37 time DEFAULT NULL,
+ col38 char(229) CHARACTER SET utf8 DEFAULT NULL,
+ col39 text,
+ col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ col41 int(10) unsigned DEFAULT NULL,
+ col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL,
+ col43 smallint(5) unsigned zerofill DEFAULT NULL,
+ col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL,
+ col45 float unsigned zerofill DEFAULT NULL,
+ col46 binary(1) DEFAULT NULL,
+ col47 tinyint(4) DEFAULT NULL,
+ col48 tinyint(1) DEFAULT NULL,
+ col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ col50 binary(1) DEFAULT NULL,
+ col51 double unsigned zerofill DEFAULT NULL,
+ col52 int(10) unsigned DEFAULT NULL,
+ col53 time DEFAULT NULL,
+ col54 double unsigned DEFAULT NULL,
+ col55 time DEFAULT NULL,
+ col56 mediumtext CHARACTER SET latin2,
+ col57 blob,
+ col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000',
+ col59 binary(1) DEFAULT NULL,
+ col60 longblob,
+ col61 time DEFAULT NULL,
+ col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci,
+ col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ col64 int(10) unsigned DEFAULT NULL,
+ col65 date DEFAULT NULL,
+ col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ col67 binary(1) DEFAULT NULL,
+ col68 tinyblob,
+ col69 date DEFAULT NULL,
+ col70 tinyint(3) unsigned zerofill DEFAULT NULL,
+ col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL,
+ col72 datetime DEFAULT NULL,
+ col73 smallint(5) unsigned zerofill DEFAULT NULL,
+ col74 longblob,
+ col75 bit(34) DEFAULT NULL,
+ col76 float unsigned zerofill DEFAULT NULL,
+ col77 year(4) DEFAULT NULL,
+ col78 tinyint(3) unsigned DEFAULT NULL,
+ col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL,
+ col80 datetime DEFAULT NULL,
+ col81 smallint(6) DEFAULT NULL,
+ col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL,
+ col83 bigint(20) unsigned zerofill DEFAULT NULL,
+ col84 float unsigned zerofill DEFAULT NULL,
+ col85 double DEFAULT NULL,
+ col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL,
+ col87 varbinary(221) DEFAULT NULL,
+ col88 double unsigned DEFAULT NULL,
+ col89 float unsigned zerofill DEFAULT NULL,
+ col90 tinyblob
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET sql_mode = default;
+INSERT IGNORE INTO bug52745 SET
+col40='0000-00-00 00:00:00',
+col51=16547,
+col53='7711484',
+col54=-28604,
+col55='7112612',
+col56='wakefulness\'',
+col57=repeat('absorbefacient\'',106),
+col58=11027,
+col59='AM09gW7',
+col60=repeat('Noelani\'',16),
+col61='2520576',
+col62='substitutiv',
+col63='19950106155112',
+col64=-12038,
+col65='86238806',
+col66='19600719080256',
+col68=repeat('Sagittarius\'',54),
+col69='38943902',
+col70=1232,
+col71='Elora\'',
+col74=repeat('zipp',11),
+col75='0',
+col76=23254,
+col78=13247,
+col79='56219',
+col80='20500609035724',
+col81=11632,
+col82=7,
+col84=-23863,
+col85=6341,
+col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W',
+col88=16894,
+col89=6161,
+col90=repeat('gale',48);
+
+SHOW WARNINGS;
+
+DROP TABLE bug52745;
+
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_zip/t/bug53591.test b/mysql-test/suite/innodb_zip/t/bug53591.test
new file mode 100644
index 00000000000..1943c59fe17
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/bug53591.test
@@ -0,0 +1,22 @@
+-- source include/have_innodb.inc
+-- source include/have_innodb_zip.inc
+
+let $file_per_table=`select @@innodb_file_per_table`;
+
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_strict_mode=on;
+
+set old_alter_table=0;
+
+CREATE TABLE bug53591(a text charset utf8 not null)
+ENGINE=InnoDB KEY_BLOCK_SIZE=1;
+-- 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;
+
+EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/t/bug56680.test b/mysql-test/suite/innodb_zip/t/bug56680.test
new file mode 100644
index 00000000000..694c5ffac59
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/bug56680.test
@@ -0,0 +1,140 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+#
+# Bug #56680 InnoDB may return wrong results from a case-insensitive index
+#
+-- source include/have_innodb.inc
+-- source include/have_innodb_zip.inc
+
+-- disable_query_log
+SET @tx_isolation_orig = @@tx_isolation;
+SET @innodb_file_per_table_orig = @@innodb_file_per_table;
+# 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
+# change buffering is possible, so that the change buffer will be used
+# whenever possible.
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
+-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = 1;
+-- enable_query_log
+SET GLOBAL tx_isolation='REPEATABLE-READ';
+SET GLOBAL innodb_file_per_table=on;
+
+CREATE TABLE bug56680(
+ a INT AUTO_INCREMENT PRIMARY KEY,
+ b CHAR(1),
+ c INT,
+ INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+
+INSERT INTO bug56680 VALUES(0,'x',1);
+BEGIN;
+SELECT b FROM bug56680;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+UPDATE bug56680 SET b='X';
+
+connection default;
+# This should return the last committed value 'x', but would return 'X'
+# due to a bug in row_search_for_mysql().
+SELECT b FROM bug56680;
+# This would always return the last committed value 'x'.
+SELECT * FROM bug56680;
+
+connection con1;
+ROLLBACK;
+disconnect con1;
+
+connection default;
+
+SELECT b FROM bug56680;
+
+# For the rest of this test, use the READ UNCOMMITTED isolation level
+# to see what exists in the secondary index.
+SET GLOBAL tx_isolation='READ-UNCOMMITTED';
+
+# Create enough rows for the table, so that the insert buffer will be
+# used for modifying the secondary index page. There must be multiple
+# index pages, because changes to the root page are never buffered.
+
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+INSERT INTO bug56680 SELECT 0,b,c FROM bug56680;
+
+BEGIN;
+SELECT b FROM bug56680 LIMIT 2;
+
+connect (con1,localhost,root,,);
+connection con1;
+BEGIN;
+DELETE FROM bug56680 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680 VALUES(1,'X',1);
+
+# This should force an insert buffer merge, and return 'X' in the first row.
+SELECT b FROM bug56680 LIMIT 3;
+
+connection default;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection con1;
+ROLLBACK;
+SELECT b FROM bug56680 LIMIT 2;
+CHECK TABLE bug56680;
+
+connection default;
+disconnect con1;
+
+SELECT b FROM bug56680 LIMIT 2;
+
+CREATE TABLE bug56680_2(
+ a INT AUTO_INCREMENT PRIMARY KEY,
+ b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci,
+ c INT,
+ INDEX(b))
+ENGINE=InnoDB STATS_PERSISTENT=0;
+
+INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680;
+
+BEGIN;
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,'SS',1);
+
+# This should force an insert buffer merge, and return 'SS' in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+# Test this with compressed tables.
+ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+SELECT HEX(b) FROM bug56680_2 LIMIT 2;
+DELETE FROM bug56680_2 WHERE a=1;
+# This should be buffered, if innodb_change_buffering_debug = 1 is in effect.
+INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1);
+
+# This should force an insert buffer merge, and return 0xdf in the first row.
+SELECT HEX(b) FROM bug56680_2 LIMIT 3;
+CHECK TABLE bug56680_2;
+
+DROP TABLE bug56680_2;
+DROP TABLE bug56680;
+
+-- disable_query_log
+SET GLOBAL tx_isolation = @tx_isolation_orig;
+SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
+-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
+SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig;
diff --git a/mysql-test/suite/innodb_zip/t/cmp_drop_table-master.opt b/mysql-test/suite/innodb_zip/t/cmp_drop_table-master.opt
new file mode 100644
index 00000000000..a9a3d8c3db8
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/cmp_drop_table-master.opt
@@ -0,0 +1 @@
+--innodb-buffer-pool-size=8M
diff --git a/mysql-test/suite/innodb_zip/t/cmp_drop_table.test b/mysql-test/suite/innodb_zip/t/cmp_drop_table.test
new file mode 100644
index 00000000000..145f55bb160
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/cmp_drop_table.test
@@ -0,0 +1,57 @@
+-- source include/have_innodb.inc
+-- source include/have_innodb_16k.inc
+
+let $per_table=`select @@innodb_file_per_table`;
+
+-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
+
+set global innodb_file_per_table=on;
+
+create table t1(a text) engine=innodb key_block_size=8;
+
+-- disable_query_log
+
+# insert some rows so we are using compressed pages
+-- let $i = 10
+while ($i)
+{
+ insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100));
+ dec $i;
+}
+-- enable_query_log
+
+# we should be using some 8K pages
+-- eval $query_i_s
+
+drop table t1;
+
+# because of lazy eviction at drop table there should still be some
+# used 8K pages
+-- eval $query_i_s
+
+# create a non-compressed table and insert enough into it to evict
+# compressed pages
+create table t2(a text) engine=innodb;
+
+-- disable_query_log
+
+-- let $i = 500
+while ($i)
+{
+ insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000));
+ dec $i;
+}
+
+-- enable_query_log
+
+# now there should be no 8K pages in the buffer pool
+-- eval $query_i_s
+
+drop table t2;
+
+#
+# restore environment to the state it was before this test execution
+#
+
+-- disable_query_log
+eval set global innodb_file_per_table=$per_table;
diff --git a/mysql-test/suite/innodb_zip/t/cmp_per_index.test b/mysql-test/suite/innodb_zip/t/cmp_per_index.test
new file mode 100644
index 00000000000..58b7855219b
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/cmp_per_index.test
@@ -0,0 +1,118 @@
+#
+# Test information_schema.innodb_cmp_per_index
+#
+
+-- source include/have_innodb.inc
+
+# Using innodb_log_compressed=0 leads to a larger number of page
+# compressions, because page_cur_insert_rec_zip() will reorganize the
+# page before attempting an insert followed by page compression and
+# page_zip_compress_write_log_no_data().
+
+if (`SELECT @@innodb_log_compressed_pages = 0`)
+{
+ --skip Needs innodb_log_compressed_pages
+}
+
+# numbers read in this test depend on the page size
+-- source include/have_innodb_16k.inc
+# include/restart_mysqld.inc does not work in embedded mode
+-- source include/not_embedded.inc
+
+-- vertical_results
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+# reset any leftover stats from previous tests
+-- disable_query_log
+-- disable_result_log
+SELECT * FROM information_schema.innodb_cmp_per_index_reset;
+-- enable_result_log
+-- enable_query_log
+
+# see that the table is empty
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+# create a table that uses compression
+CREATE TABLE t (
+ a INT,
+ b VARCHAR(512),
+ c VARCHAR(16),
+ PRIMARY KEY (a),
+ INDEX (b(512)),
+ INDEX (c(16))
+) ENGINE=INNODB KEY_BLOCK_SIZE=2;
+
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+
+# insert some data into it
+BEGIN;
+-- disable_query_log
+let $i=128;
+while ($i)
+{
+ -- eval INSERT INTO t VALUES ($i, REPEAT('x', 512), NULL);
+ dec $i;
+}
+-- enable_query_log
+COMMIT;
+
+ALTER TABLE t DROP INDEX c;
+
+GRANT USAGE ON *.* TO 'tuser01'@'localhost' IDENTIFIED BY 'cDJvI9s_Uq';
+FLUSH PRIVILEGES;
+
+-- connect (con1,localhost,tuser01,cDJvI9s_Uq,)
+-- connection con1
+
+-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SELECT * FROM information_schema.innodb_cmp_per_index;
+
+-- connection default
+-- disconnect con1
+
+DROP USER 'tuser01'@'localhost';
+
+SELECT
+database_name,
+table_name,
+index_name,
+CASE WHEN compress_ops=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops END as compress_ops,
+CASE WHEN compress_ops_ok=47 and @@innodb_compression_level IN (4,8,9) THEN 65
+ELSE compress_ops_ok END as compress_ops_ok,
+uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+
+# restart mysqld and see that uncompress ops also gets increased when
+# selecting from the table again
+
+-- source include/restart_mysqld.inc
+
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SELECT COUNT(*) FROM t;
+
+SELECT
+database_name,
+table_name,
+index_name,
+compress_ops,
+compress_ops_ok,
+CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9
+ELSE uncompress_ops END as uncompress_ops
+FROM information_schema.innodb_cmp_per_index
+ORDER BY 1, 2, 3;
+
+DROP TABLE t;
+
+SET GLOBAL innodb_cmp_per_index_enabled=default;
diff --git a/mysql-test/suite/innodb_zip/t/create_options.test b/mysql-test/suite/innodb_zip/t/create_options.test
new file mode 100644
index 00000000000..1a3dbdff90a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/create_options.test
@@ -0,0 +1,528 @@
+# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE
+# Related bugs;
+# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
+# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error
+# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
+# Rules for interpreting CREATE_OPTIONS
+# 1) Create options on an ALTER are added to the options on the
+# previous CREATE or ALTER statements.
+# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value.
+# If the current ROW_FORMAT has explicitly been set to COMPRESSED,
+# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE
+# will not be used.
+# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT.
+# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to
+# unset or erase the values persisted in the MySQL dictionary and
+# by SHOW CTREATE TABLE.
+# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are
+# both explicitly given, the ROW_FORMAT is always used in non-strict
+# mode.
+# 6) InnoDB will automatically convert a table to COMPRESSED only if a
+# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT
+# or has not been used on a previous CREATE TABLE or ALTER TABLE.
+# 7) InnoDB strict mode is designed to prevent incompatible create
+# options from being used together.
+# 8) The non-strict behavior is intended to permit you to import a
+# mysqldump file into a database that does not support compressed
+# tables, even if the source database contained compressed tables.
+# All invalid values and/or incompatible combinations of ROW_FORMAT
+# and KEY_BLOCK_SIZE are automatically corrected
+#
+# *** innodb_strict_mode=ON ***
+# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC
+# & REDUNDANT. All others are rejected.
+# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected.
+# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'.
+# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC &
+# REDUNDANT.
+# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED
+# are incompatible with innodb_file_format=Antelope
+# and innodb_file_per_table=OFF
+# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED
+# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified
+# as COMPACT, DYNAMIC or REDUNDANT.
+# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the
+# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified.
+#
+# *** innodb_strict_mode=OFF ***
+# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8.
+# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT.
+# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid
+# ROW_FORMAT is specified.
+# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF
+# it will ignore ROW_FORMAT=COMPRESSED and 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.
+
+-- source include/have_innodb.inc
+-- source include/have_innodb_zip.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+# 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
+
+SET GLOBAL innodb_file_per_table=ON;
+
+# The first half of these tests are with strict mode ON.
+SET SESSION innodb_strict_mode = ON;
+
+--echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
+--echo # But it is an invalid mode in InnoDB
+--error ER_ILLEGAL_HA, 1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
+SHOW WARNINGS;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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';
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+
+--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 t1;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+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 t1;
+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;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+--echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+--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=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;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+--echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+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';
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+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';
+--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=1;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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';
+
+--echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
+--echo # ALTER with each ROW_FORMAT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW CREATE TABLE t1;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+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 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
+DROP TABLE t1;
+--error ER_ILLEGAL_HA, 1005
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
+SHOW WARNINGS;
+
+--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
+--echo # and that they can be set to default values during strict mode.
+SET GLOBAL innodb_file_format=Antelope;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+--error 1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+--error 1478
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SET GLOBAL innodb_file_format=Barracuda;
+DROP TABLE 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;
+SHOW CREATE TABLE t1;
+SHOW WARNINGS;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_format=Barracuda;
+
+--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
+--echo # innodb_file_per_table=OFF and that they can be set to default
+--echo # values during strict mode.
+SET GLOBAL innodb_file_per_table=OFF;
+DROP TABLE t1;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA,1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+--error 1005
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+--error ER_ILLEGAL_HA_CREATE_OPTION
+ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
+SHOW WARNINGS;
+--error 1478
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=DEFAULT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_per_table=ON;
+DROP TABLE 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;
+SHOW WARNINGS;
+ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SET GLOBAL innodb_file_per_table=ON;
+
+--echo ##################################################
+SET SESSION innodb_strict_mode = OFF;
+
+--echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
+--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
+--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
+--echo # It is an invalid mode in InnoDB, use COMPACT
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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';
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+--echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+--echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) 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 t1;
+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 t1;
+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 t1;
+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;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+--echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT );
+ALTER TABLE t1 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 t1;
+CREATE TABLE t1 ( i INT );
+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 t1;
+CREATE TABLE t1 ( i INT );
+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;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+--echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 KEY_BLOCK_SIZE=2;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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=4;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
+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 t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ROW_FORMAT=COMPACT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+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,
+--echo # it defaults to half of the page size.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+--echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+--echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
+--echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_format=Antelope;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_format=Barracuda;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_format=Antelope;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_format=Barracuda;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+--echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
+--echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
+--echo and then used again when innodb_file_per_table=ON.
+DROP TABLE t1;
+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';
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
+CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_per_table=OFF;
+ALTER TABLE t1 ADD COLUMN f1 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SET GLOBAL innodb_file_per_table=ON;
+ALTER TABLE t1 ADD COLUMN f2 INT;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+
+
+--echo # Cleanup
+DROP TABLE t1;
+
+--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
+
diff --git a/mysql-test/suite/innodb_zip/t/disabled.def b/mysql-test/suite/innodb_zip/t/disabled.def
new file mode 100644
index 00000000000..d3799d0e2c9
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/disabled.def
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# List the test cases that are to be disabled temporarily.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
+#
+# Do not use any TAB characters for whitespace.
+#
+##############################################################################
+
+restart : Not supported by MariaDB 10.2 2/9/2016 jplindst
+innochecksum : MDEV-10727 2/9/2016 jplindst
+innochecksum_2 : MDEV-10727 2/9/2016 jplindst
+innochecksum_3 : MDEV-10727 2/9/2016 jplindst
+
diff --git a/mysql-test/suite/innodb_zip/t/index_large_prefix.test b/mysql-test/suite/innodb_zip/t/index_large_prefix.test
new file mode 100644
index 00000000000..d61cce8d484
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/index_large_prefix.test
@@ -0,0 +1,441 @@
+# 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;
+
+--disable_query_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+--enable_query_log
+
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+
+set global innodb_file_per_table=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;
+show warnings;
+
+# Do some insertion and update to excercise the external cache
+# code path
+insert into worklog5743 values(repeat("a", 20000));
+
+# default session, update the table
+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
+
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+
+# Start a new session to select the column to force it build
+# an earlier version of the clustered index through undo log. So it should
+# just see the result of repeat("b", 16000)
+select @@session.tx_isolation;
+--connect (con1,localhost,root,,)
+select a = repeat("x", 17000) from worklog5743;
+select a = repeat("b", 16000) from worklog5743;
+
+# Start another session doing "read uncommitted" query, it
+# should see the uncommitted update
+--connect (con2,localhost,root,,)
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 17000) from worklog5743;
+
+# Roll back the transaction
+--connection default
+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;
+show warnings;
+create index idx on worklog5743(a1, a2(2000));
+show warnings;
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 1000;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+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;
+
+create index idx on worklog5743(a1, a2(50));
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 1000;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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_TOO_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_LONG_KEY,1118
+create index idx1 on worklog5743_1(a2(4000));
+show warnings;
+set global innodb_large_prefix=1;
+-- error ER_TOO_LONG_KEY,1118
+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;
+# Check index creation behavior without STRICT mode
+SET sql_mode= '';
+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;
+set sql_mode= default;
+
+# 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, 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, 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;
+# Check index creation behavior without STRICT mode
+SET sql_mode='';
+create index idx1 on worklog5743(a2);
+create index idx2 on worklog5743(a3);
+create index idx3 on worklog5743(a4);
+show warnings;
+SET sql_mode= default;
+-- 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;
+
+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;
+
+# Do a select from another connection that would use the secondary index
+--connection con1
+select @@session.tx_isolation;
+explain select a1 from worklog5743 where a1 = 9;
+select a1 from worklog5743 where a1 = 9;
+
+# Do read uncommitted, 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 from worklog5743 where a1 = 9;
+
+--connection default
+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)))
+row_format=compact;
+
+create table worklog5743(a TEXT)
+row_format=compact;
+
+# Excercise the column length check in ha_innobase::add_index()
+-- error ER_INDEX_COLUMN_TOO_LONG
+create index idx on worklog5743(a(768));
+
+# This should be successful
+create index idx on worklog5743(a(767));
+
+# Perform some DMLs
+insert into worklog5743 values(repeat("a", 20000));
+
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+
+# Start a new session to select the table to force it build
+# an earlier version of the cluster index through undo log
+select @@session.tx_isolation;
+--connection con1
+select a = repeat("a", 20000) from worklog5743;
+--disconnect con1
+
+--connection con2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 25000) from worklog5743;
+--disconnect con2
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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;
+
+# Length exceeds maximum supported key length
+# It will be auto-truncated to 3072
+# Check index creation behavior without STRICT mode
+SET sql_mode='';
+create index idx1 on worklog5743(a(3073));
+create index idx2 on worklog5743(a(3072));
+show create table worklog5743;
+drop table worklog5743;
+SET sql_mode= default;
+
+# 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_per_table=$innodb_file_per_table_orig;
diff --git a/mysql-test/suite/innodb_zip/t/index_large_prefix_4k.test b/mysql-test/suite/innodb_zip/t/index_large_prefix_4k.test
new file mode 100644
index 00000000000..a0229abc4f8
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/index_large_prefix_4k.test
@@ -0,0 +1,400 @@
+# Testcase for worklog #5743: Lift the limit of index key prefixes
+
+--source include/have_innodb.inc
+--source include/have_innodb_4k.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+--enable_query_log
+
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+
+set global innodb_file_per_table=1;
+
+-- echo ### Test 1 ###
+# Create a table of DYNAMIC format, with a primary index of 768 bytes in
+# size
+create table worklog5743(a TEXT not null, primary key (a(768))) ROW_FORMAT=DYNAMIC;
+show warnings;
+
+# Do some insertion and update to excercise the external cache
+# code path
+insert into worklog5743 values(repeat("a", 20000));
+
+# default session, update the table
+update worklog5743 set a = (repeat("b", 16000));
+
+# Create a secondary index
+SET sql_mode= '';
+create index idx on worklog5743(a(900));
+show warnings;
+SET sql_mode= default;
+# 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
+
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+
+# Start a new session to select the column to force it build
+# an earlier version of the clustered index through undo log. So it should
+# just see the result of repeat("b", 16000)
+select @@session.tx_isolation;
+--connect (con1,localhost,root,,)
+select a = repeat("x", 17000) from worklog5743;
+select a = repeat("b", 16000) from worklog5743;
+
+# Start another session doing "read uncommitted" query, it
+# should see the uncommitted update
+--connect (con2,localhost,root,,)
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 17000) from worklog5743;
+
+# Roll back the transaction
+--connection default
+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;
+show warnings;
+create index idx on worklog5743(a1, a2(750));
+show warnings;
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 1111;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+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;
+
+create index idx on worklog5743(a1, a2(50));
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 2222;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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;
+
+# 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_TOO_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_LONG_KEY
+create index idx1 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=1;
+SET sql_mode= '';
+create index idx1 on worklog5743_2(a2(4000));
+show warnings;
+show create table worklog5743_2;
+create index idx3 on worklog5743_2(a2(769));
+show warnings;
+create index idx4 on worklog5743_2(a2(768));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx5 on worklog5743_2(a1, a2(765));
+show warnings;
+create index idx6 on worklog5743_2(a1, a2(764));
+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;
+show create table worklog5743_4;
+create index idx3 on worklog5743_4(a2(769));
+show warnings;
+create index idx4 on worklog5743_4(a2(768));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx5 on worklog5743_4(a1, a2(765));
+show warnings;
+create index idx6 on worklog5743_4(a1, a2(764));
+show warnings;
+SET sql_mode= default;
+# 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));
+
+# 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));
+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;
+
+begin;
+
+update worklog5743_1 set a1 = 1000;
+update worklog5743_2 set a1 = 1000;
+update worklog5743_4 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;
+
+# Do a select from another connection that would use the secondary index
+--connection con1
+select @@session.tx_isolation;
+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;
+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;
+
+# 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, 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;
+
+--connection default
+rollback;
+
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+
+-- 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.
+
+# This commented form of the test causes an unlimited page split
+# on update of the int field - Bug 12636590 - INNODB; UPDATE OF
+# LARGE RECORD CAUSES UNLIMITED PAGE SPLITS IN 8K PAGE SIZE
+#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;
+#
+#insert into worklog5743 values(9,
+# repeat("a", 20000), repeat("a", 3073),
+# repeat("a", 3072), repeat("a", 3069),
+# repeat("a", 3068));
+#
+
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a2);
+show warnings;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(3072)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a2);
+show warnings;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(769)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a2);
+show warnings;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(768)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+insert into worklog5743 values(9, repeat("a", 768));
+update worklog5743 set a1 = 3333;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(765)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(764)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+insert into worklog5743 values(9, repeat("a", 764));
+
+begin;
+update worklog5743 set a1 = 4444;
+
+# Do a select from another connection that would use the secondary index
+--connection con1
+select @@session.tx_isolation;
+explain select a1 from worklog5743 where a1 = 9;
+select a1 from worklog5743 where a1 = 9;
+
+# Do read uncommitted, 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 from worklog5743 where a1 = 9;
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- echo ### Test 6 ###
+# Create a table with old format, and the limit is 768 bytes.
+-- error ER_TOO_LONG_KEY
+create table worklog5743(a TEXT not null, primary key (a(1000)));
+
+create table worklog5743(a TEXT) ROW_FORMAT=COMPACT;
+
+# Excercise the column length check in ha_innobase::add_index()
+-- error ER_INDEX_COLUMN_TOO_LONG
+create index idx on worklog5743(a(768));
+
+# This should be successful
+create index idx on worklog5743(a(767));
+
+# Perform some DMLs
+insert into worklog5743 values(repeat("a", 20000));
+
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+
+# Start a new session to select the table to force it build
+# an earlier version of the cluster index through undo log
+select @@session.tx_isolation;
+--connection con1
+select a = repeat("a", 20000) from worklog5743;
+--disconnect con1
+
+--connection con2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 25000) from worklog5743;
+--disconnect con2
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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;
+
+# Length exceeds maximum supported key length
+# It will be auto-truncated to 3072 if the page size were not 4k.
+# With this page size, the prefix length is less.
+SET sql_mode= '';
+create index idx1 on worklog5743(a(769));
+show warnings;
+SET sql_mode= default;
+create index idx2 on worklog5743(a(768));
+show warnings;
+show create table worklog5743;
+insert into worklog5743 values(repeat("a", 768));
+drop table worklog5743;
+
+# 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_per_table=$innodb_file_per_table_orig;
diff --git a/mysql-test/suite/innodb_zip/t/index_large_prefix_8k.test b/mysql-test/suite/innodb_zip/t/index_large_prefix_8k.test
new file mode 100644
index 00000000000..00a97249a95
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/index_large_prefix_8k.test
@@ -0,0 +1,429 @@
+# Testcase for worklog #5743: Lift the limit of index key prefixes
+
+--source include/have_innodb.inc
+--source include/have_innodb_8k.inc
+SET default_storage_engine=InnoDB;
+
+--disable_query_log
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
+--enable_query_log
+
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+
+set global innodb_file_per_table=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;
+show warnings;
+
+# Do some insertion and update to excercise the external cache
+# code path
+insert into worklog5743 values(repeat("a", 20000));
+
+# default session, update the table
+update worklog5743 set a = (repeat("b", 16000));
+
+# Create a secondary index
+SET sql_mode= '';
+create index idx on worklog5743(a(2000));
+show warnings;
+SET sql_mode= default;
+
+# 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
+
+begin;
+update worklog5743 set a = (repeat("x", 17000));
+
+# Start a new session to select the column to force it build
+# an earlier version of the clustered index through undo log. So it should
+# just see the result of repeat("b", 16000)
+select @@session.tx_isolation;
+--connect (con1,localhost,root,,)
+select a = repeat("x", 17000) from worklog5743;
+select a = repeat("b", 16000) from worklog5743;
+
+# Start another session doing "read uncommitted" query, it
+# should see the uncommitted update
+--connect (con2,localhost,root,,)
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 17000) from worklog5743;
+
+# Roll back the transaction
+--connection default
+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;
+show warnings;
+create index idx on worklog5743(a1, a2(1250));
+show warnings;
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 1000;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+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;
+
+create index idx on worklog5743(a1, a2(50));
+
+insert into worklog5743 values(9, repeat("a", 10000));
+
+begin;
+
+update worklog5743 set a1 = 1000;
+
+# 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 where a1 = 9;
+select a1, a2 = repeat("a", 10000) from worklog5743 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 where a1 = 9;
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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;
+
+# 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_TOO_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_LONG_KEY
+create index idx1 on worklog5743_1(a2(4000));
+show warnings;
+set global innodb_large_prefix=1;
+-- error ER_TOO_LONG_KEY
+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;
+SET sql_mode= '';
+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;
+create index idx3 on worklog5743_4(a2(1537));
+show warnings;
+create index idx4 on worklog5743_4(a2(1536));
+show warnings;
+-- error ER_TOO_LONG_KEY
+create index idx5 on worklog5743_4(a1, a2(1533));
+show warnings;
+create index idx6 on worklog5743_4(a1, a2(1532));
+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(1533));
+show warnings;
+create index idx5 on worklog5743_8(a1, a2(1532));
+show warnings;
+SET sql_mode= default;
+
+# 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));
+
+# 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));
+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;
+
+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;
+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;
+
+
+# Do a select from another connection that would use the secondary index
+--connection con1
+select @@session.tx_isolation;
+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;
+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;
+
+# 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, 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;
+
+--connection default
+rollback;
+
+drop table worklog5743_1;
+drop table worklog5743_2;
+drop table worklog5743_4;
+drop table worklog5743_8;
+
+-- 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.
+
+# This commented form of the test causes an unlimited page split
+# on update of the int field - Bug 12636590 - INNODB; UPDATE OF
+# LARGE RECORD CAUSES UNLIMITED PAGE SPLITS IN 8K PAGE SIZE
+#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;
+#
+#insert into worklog5743 values(9,
+# repeat("a", 20000), repeat("a", 3073),
+# repeat("a", 3072), repeat("a", 3069),
+# repeat("a", 3068));
+#
+
+create table worklog5743(a1 int, a2 varchar(20000)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a2);
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(1537)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a2);
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(1536)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a2);
+show warnings;
+insert into worklog5743 values(9, repeat("a", 1536));
+update worklog5743 set a1 = 1000;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(1533)) ROW_FORMAT=DYNAMIC;
+-- error ER_TOO_LONG_KEY
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+drop table worklog5743;
+
+create table worklog5743(a1 int, a2 varchar(1532)) ROW_FORMAT=DYNAMIC;
+create index idx1 on worklog5743(a1, a2);
+show warnings;
+insert into worklog5743 values(9, repeat("a", 1532));
+update worklog5743 set a1 = 1000;
+
+begin;
+update worklog5743 set a1 = 1000;
+
+# Do a select from another connection that would use the secondary index
+--connection con1
+select @@session.tx_isolation;
+explain select a1 from worklog5743 where a1 = 9;
+select a1 from worklog5743 where a1 = 9;
+
+# Do read uncommitted, 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 from worklog5743 where a1 = 9;
+
+--connection default
+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)))
+row_format=compact;
+
+create table worklog5743(a TEXT) row_format=compact;
+
+# Excercise the column length check in ha_innobase::add_index()
+-- error ER_INDEX_COLUMN_TOO_LONG
+create index idx on worklog5743(a(768));
+
+# This should be successful
+create index idx on worklog5743(a(767));
+
+# Perform some DMLs
+insert into worklog5743 values(repeat("a", 20000));
+
+begin;
+insert into worklog5743 values(repeat("b", 20000));
+update worklog5743 set a = (repeat("x", 25000));
+
+# Start a new session to select the table to force it build
+# an earlier version of the cluster index through undo log
+select @@session.tx_isolation;
+--connection con1
+select a = repeat("a", 20000) from worklog5743;
+--disconnect con1
+
+--connection con2
+SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+select @@session.tx_isolation;
+select a = repeat("x", 25000) from worklog5743;
+--disconnect con2
+
+--connection default
+rollback;
+
+drop table worklog5743;
+
+-- 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;
+
+# Length exceeds maximum supported key length
+# It will be auto-truncated to 3072
+SET sql_mode= '';
+create index idx1 on worklog5743(a(3073));
+create index idx2 on worklog5743(a(3072));
+SET sql_mode= default;
+show create table worklog5743;
+drop table worklog5743;
+
+# 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_per_table=$innodb_file_per_table_orig;
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test
new file mode 100644
index 00000000000..fd64e6d0d0c
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.test
@@ -0,0 +1,240 @@
+#************************************************************
+# WL6045:Improve Innochecksum
+#************************************************************
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+--source include/no_valgrind_without_big.inc
+# Embedded server does not support crashing.
+--source include/not_embedded.inc
+
+# Avoid CrashReporter popup on Mac.
+--source include/not_crashrep.inc
+
+--echo # Set the environmental variables
+let MYSQLD_BASEDIR= `SELECT @@basedir`;
+let MYSQLD_DATADIR= `SELECT @@datadir`;
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
+
+SET GLOBAL innodb_file_per_table=on;
+
+CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
+CREATE INDEX idx1 ON tab1(c2(10));
+INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
+CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
+insert into t1 values(1,"i");
+insert into t1 values(2,"am");
+insert into t1 values(3,"compressed table");
+
+--echo # Shutdown the Server
+--source include/shutdown_mysqld.inc
+--echo # Server Default checksum = innodb
+
+--echo [1a]: check the innochecksum when file doesn't exists
+--error 1
+--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/aa.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: $MYSQLD_DATADIR/test/aa.ibd cannot be found;
+--source include/search_pattern_in_file.inc
+
+--echo [1b]: check the innochecksum without --strict-check
+--exec $INNOCHECKSUM $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [2]: check the innochecksum with full form --strict-check=crc32
+--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [3]: check the innochecksum with short form -C crc32
+--exec $INNOCHECKSUM -C crc32 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected
+--error 1
+--exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
+--source include/search_pattern_in_file.inc
+
+--echo [5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected
+--error 1
+--exec $INNOCHECKSUM -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: --no-check must be associated with --write option.;
+--source include/search_pattern_in_file.inc
+
+--echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected
+--error 1
+--exec $INNOCHECKSUM --strict-check=innodb --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
+--source include/search_pattern_in_file.inc
+
+--echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected
+--error 1
+--exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
+--source include/search_pattern_in_file.inc
+
+--echo [8]: check the innochecksum with short & full form combination
+--echo # strict-check & no-check, an error is expected
+--error 1
+--exec $INNOCHECKSUM --strict-check=innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.;
+--source include/search_pattern_in_file.inc
+
+--echo [9]: check the innochecksum with full form --strict-check=innodb
+# Server Default checksum = crc32
+--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+
+--echo [10]: check the innochecksum with full form --strict-check=none
+--echo # when server Default checksum=crc32
+--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+
+--echo [11]: check the innochecksum with short form -C innodb
+--echo # when server Default checksum=crc32
+--exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+
+--echo [12]: check the innochecksum with short form -C none
+--echo # when server Default checksum=crc32
+--exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+
+--echo [13]: check strict-check with invalid values
+--error 1
+--exec $INNOCHECKSUM --strict-check=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -C strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --strict-check=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -C strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --strict-check=strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -C strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --strict-check=InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -C InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2>$SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --strict-check=crc $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'crc\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --strict-check=no $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\';
+--source include/search_pattern_in_file.inc
+
+--echo [14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum
+--echo # Also check the long form of write option.
+--exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/t1.ibd
+# Rewrite done, verify with --strict-check=crc32
+--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd
+
+--echo [14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum
+--echo # Also check the long form of write option.
+--exec $INNOCHECKSUM --no-check --write=innodb $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --strict-check=crc32 --write=innodb $MYSQLD_DATADIR/test/t1.ibd
+# Rewrite done, verify with --strict-check=innodb
+--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo # start the server with innodb_checksum_algorithm=InnoDB
+--let restart_options= : --innodb_checksum_algorithm=innodb
+--source include/start_mysqld.inc
+
+INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+
+--echo # Stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum
+--echo # Also check the short form of write option.
+--exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/t1.ibd
+# Rewrite done, verify with --strict-check=none
+--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
+
+--echo # Start the server with checksum algorithm=none
+--let restart_options= : --innodb_checksum_algorithm=none
+--source include/start_mysqld.inc
+
+INSERT INTO tab1 VALUES(3, 'Innochecksum None');
+SELECT c1,c2 FROM tab1 order by c1,c2;
+DROP TABLE t1;
+
+--echo # Stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [16]: rewrite into new checksum=crc32 with innochecksum
+--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo # Restart the DB server with innodb_checksum_algorithm=crc32
+--let restart_options= : --innodb_checksum_algorithm=crc32 --innodb_file_per_table=on
+--source include/start_mysqld.inc
+
+SELECT * FROM tab1;
+DELETE FROM tab1 where c1=3;
+SELECT c1,c2 FROM tab1 order by c1,c2;
+
+--echo # Stop server
+--source include/shutdown_mysqld.inc
+
+--echo [17]: rewrite into new checksum=InnoDB
+--exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo # Restart the DB server with innodb_checksum_algorithm=InnoDB
+--let restart_options= : --innodb_checksum_algorithm=innodb --innodb_file_per_table=on
+--source include/start_mysqld.inc
+
+DELETE FROM tab1 where c1=2;
+SELECT * FROM tab1;
+
+--echo # Stop server
+--source include/shutdown_mysqld.inc
+
+--echo [18]:check Innochecksum with invalid write options
+--error 1
+--exec $INNOCHECKSUM --no-check --write=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN=Error while setting value \'strict_crc32\' to \'write\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --no-check --write=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN=Error while setting value \'strict_innodb\' to \'write\';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --no-check --write=crc23 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\';
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+
+# Cleanup
+--echo # Restart the server
+--source include/start_mysqld.inc
+
+DROP TABLE tab1;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
new file mode 100644
index 00000000000..decec8e0f0a
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
@@ -0,0 +1,114 @@
+#************************************************************
+# WL6045:Improve Innochecksum
+#************************************************************
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+
+--source include/not_embedded.inc
+-- source include/big_test.inc
+
+--disable_query_log
+# This warning occurs due to small buffer pool size(i.e. 8MB). It doesn't occur
+# with --mysqld=--innodb_buffer_pool_size=10MB
+call mtr.add_suppression("\\[Warning\\] InnoDB: Difficult to find free blocks in the buffer pool.*");
+--enable_query_log
+let MYSQLD_BASEDIR= `SELECT @@basedir`;
+let MYSQLD_DATADIR= `SELECT @@datadir`;
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+
+SET GLOBAL innodb_compression_level=0;
+SELECT @@innodb_compression_level;
+
+CREATE TABLE t1 (j LONGBLOB) ENGINE = InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (repeat('abcdefghijklmnopqrstuvwxyz',200));
+let $i=10;
+while ($i > 0) {
+ INSERT INTO t1 SELECT * from t1;
+ dec $i;
+}
+
+--echo # stop the server
+--source include/shutdown_mysqld.inc
+
+# Page_type_dump for t1
+--exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/t1.ibd
+--file_exists $MYSQLTEST_VARDIR/tmp/dump.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
+
+--echo [1]:# check the both short and long options for "help"
+--exec $INNOCHECKSUM --help $MYSQLD_DATADIR/test/t1.ibd > $MYSQLTEST_VARDIR/tmp/help_output_long.txt
+--exec $INNOCHECKSUM -I $MYSQLD_DATADIR/test/t1.ibd > $MYSQLTEST_VARDIR/tmp/help_output_short.txt
+--diff_files $MYSQLTEST_VARDIR/tmp/help_output_long.txt $MYSQLTEST_VARDIR/tmp/help_output_short.txt
+
+--echo [2]:# Run the innochecksum when file isn't provided.
+--echo # It will print the innochecksum usage similar to --help option.
+--error 1
+--exec $INNOCHECKSUM > $MYSQLTEST_VARDIR/tmp/usage.txt
+--diff_files $MYSQLTEST_VARDIR/tmp/help_output_long.txt $MYSQLTEST_VARDIR/tmp/usage.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/usage.txt
+
+perl;
+use strict;
+use warnings;
+use File::Copy;
+my $dir = $ENV{'MYSQLTEST_VARDIR'};
+my $file= 'help_output_long.txt';
+# open file in write mode
+open IN_FILE,"<", "$dir/tmp/$file" or die $!;
+open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
+while(<IN_FILE>) {
+ unless ($_=~ /^debug.*$/ || $_=~ /\-#, \-\-debug.*$/ || $_=~ /http:.*html/) {
+ $_=~ s/^\S*innochecksum.+Ver.+[0-9]*\.[0-9]*\.[0-9]*.+$/innochecksum Ver #.#.#/g;
+ $_=~ s/(Copyright\s\(c\))\s([0-9]*),\s([0-9]*)(.*)/$1 YEAR, YEAR $4/g;
+ $_=~ s/Usage:.*\[-c/Usage: innochecksum [-c/g;
+ print OUT_FILE $_;
+ }
+}
+close(IN_FILE);
+close(OUT_FILE);
+# move the new content from tmp file to the orginal file.
+move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
+EOF
+
+--cat_file $MYSQLTEST_VARDIR/tmp/help_output_long.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/help_output_long.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/help_output_short.txt
+
+--echo [3]:# check the both short and long options for "count" and exit
+--replace_regex /[0-9]+/#/
+--exec $INNOCHECKSUM --count $MYSQLD_DATADIR/test/t1.ibd
+--replace_regex /[0-9]+/#/
+--exec $INNOCHECKSUM -c $MYSQLD_DATADIR/test/t1.ibd
+
+--echo [4]:# Print the version of innochecksum and exit
+--replace_regex /.*innochecksum.*Ver.*[0-9]*.[0-9]*.[0-9]*.*/innochecksum Ver #.#.#/
+--exec $INNOCHECKSUM -V $MYSQLD_DATADIR/test/t1.ibd
+
+--echo # Restart the DB server
+--source include/start_mysqld.inc
+
+DROP TABLE t1;
+
+--echo [5]:# Check the innochecksum for compressed table t1 with different key_block_size
+--echo # Test for KEY_BLOCK_SIZE=1
+--let $size=1
+--source ../include/innodb-wl6045.inc
+
+--echo # Test for KEY_BLOCK_SIZE=2
+--let $size=2
+--source ../include/innodb-wl6045.inc
+
+--echo # Test for for KEY_BLOCK_SIZE=4
+--let $size=4
+--source ../include/innodb-wl6045.inc
+
+set innodb_strict_mode=off;
+--echo # Test for for KEY_BLOCK_SIZE=8
+--let $size=8
+--source ../include/innodb-wl6045.inc
+
+set innodb_strict_mode=off;
+--echo # Test for KEY_BLOCK_SIZE=16
+--let $size=16
+--source ../include/innodb-wl6045.inc
+--echo # Test[5] completed
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test
new file mode 100644
index 00000000000..30e98aa25f5
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test
@@ -0,0 +1,378 @@
+#************************************************************
+# WL6045:Improve Innochecksum
+#************************************************************
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+
+# Embedded server does not support crashing.
+--source include/not_embedded.inc
+
+# Avoid CrashReporter popup on Mac.
+--source include/not_crashrep.inc
+
+--echo # Set the environmental variables
+let MYSQLD_BASEDIR= `SELECT @@basedir`;
+let MYSQLD_DATADIR= `SELECT @@datadir`;
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
+call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+
+SET GLOBAL innodb_file_per_table=on;
+
+--echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
+
+CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
+linestring_key GEOMETRY NOT NULL,
+linestring_nokey GEOMETRY NOT NULL)
+ENGINE=InnoDB ;
+
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (1, ST_GeomFromText('POINT(10 10) '), ST_GeomFromText('POINT(10 10) '));
+
+CREATE INDEX linestring_index ON tab1(linestring_nokey(5));
+ALTER TABLE tab1 ADD KEY (linestring_key(5));
+
+--echo # create a compressed table
+CREATE TABLE tab2(col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 int )
+engine = innodb row_format=compressed key_block_size=4;
+
+CREATE INDEX idx1 ON tab2(col_3(10));
+CREATE INDEX idx2 ON tab2(col_4(10));
+CREATE INDEX idx3 ON tab2(col_5(10));
+
+# load the with repeat function
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+
+# insert 5 records
+let $i = 5;
+while ($i) {
+ eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+ VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
+ dec $i;
+}
+
+--disable_result_log
+SELECT * FROM tab2 ORDER BY col_7;
+
+--echo # stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1
+--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab2.ibd
+--exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/ibdata1
+perl;
+foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
+ system("$ENV{INNOCHECKSUM} --no-check --write=InnoDB $_")
+}
+EOF
+
+--echo : start the server with innodb_checksum_algorithm=strict_innodb
+--let restart_options= : --innodb_checksum_algorithm=strict_innodb --default_storage_engine=InnoDB
+--source include/start_mysqld.inc
+
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'));
+
+# load the with repeat function
+SET @col_1 = repeat('a', 5);
+SET @col_2 = repeat('b', 20);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+
+# check the table status is GOOD with DML
+let $i = 6;
+eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
+
+-- disable_result_log
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+
+-- disable_result_log
+SELECT * FROM tab2 ORDER BY col_7;
+
+--echo # stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1
+--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab2.ibd
+--exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/ibdata1
+perl;
+foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
+ system("$ENV{INNOCHECKSUM} --no-check --write=crc32 $_")
+}
+EOF
+
+--echo # start the server with innodb_checksum_algorithm=strict_crc32
+--let restart_options= : --innodb_checksum_algorithm=strict_crc32 --default_storage_engine=InnoDB
+--source include/start_mysqld.inc
+
+# check the table status is GOOD with DML
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'),
+ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'));
+
+# load the with repeat function
+SET @col_1 = repeat('g', 5);
+SET @col_2 = repeat('h', 20);
+SET @col_3 = repeat('i', 100);
+SET @col_4 = repeat('j', 100);
+SET @col_5 = repeat('k', 100);
+SET @col_6 = repeat('l', 100);
+
+# check the table status is GOOD with DML
+let $i = 7;
+eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
+
+# check the records from table
+-- disable_result_log
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+
+-- disable_result_log
+SELECT * FROM tab2 ORDER BY col_7;
+
+--echo # stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1
+--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab2.ibd
+--exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/ibdata1
+perl;
+foreach (glob("$ENV{MYSQLD_DATADIR}/undo*")) {
+ system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
+}
+foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
+ system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_")
+}
+EOF
+
+let $restart_parameters = restart: --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB;
+--source include/start_mysqld.inc
+
+# check the table status is GOOD with DML
+INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
+VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '));
+
+# load the with repeat function
+SET @col_1 = repeat('m', 5);
+SET @col_2 = repeat('n', 20);
+SET @col_3 = repeat('o', 100);
+SET @col_4 = repeat('p', 100);
+SET @col_5 = repeat('q', 100);
+SET @col_6 = repeat('r', 100);
+
+# check the table status is GOOD with DML
+let $i = 8;
+eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i);
+
+# check the records from table
+-- disable_result_log
+SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey)
+FROM tab1 ORDER BY pk;
+
+--disable_result_log
+SELECT * FROM tab2 ORDER BY col_7;
+--enable_result_log
+
+--echo # stop the server
+--source include/shutdown_mysqld.inc
+
+--echo [2]: Check the page type summary with shortform for tab1.ibd
+--replace_regex /File.*.ibd/File::tab1.ibd/ /[0-9]+/#/
+--exec $INNOCHECKSUM -S $MYSQLD_DATADIR/test/tab1.ibd 2>$MYSQLTEST_VARDIR/tmp/page_summary_short.txt
+
+--echo [3]: Check the page type summary with longform for tab1.ibd
+--replace_regex /File.*.ibd/File::tab1.ibd/ /[0-9]+/#/
+--exec $INNOCHECKSUM --page-type-summary $MYSQLD_DATADIR/test/tab1.ibd 2>$MYSQLTEST_VARDIR/tmp/page_summary_long.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/page_summary_short.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/page_summary_long.txt
+--echo [4]: Page type dump for with longform for tab1.ibd
+--exec $INNOCHECKSUM --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd
+
+perl;
+use strict;
+use warnings;
+use File::Copy;
+my $dir = $ENV{'MYSQLTEST_VARDIR'};
+opendir(DIR, $dir) or die $!;
+my $file= 'dump.txt';
+# open file in write mode
+open IN_FILE,"<", "$dir/tmp/$file" or die $!;
+open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
+while(<IN_FILE>)
+{
+ # Replace the intergers to # and complete file patht to file name only.
+ $_=~ s/Filename.+/Filename::tab1.ibd/g;
+ $_=~ s/\d+/#/g;
+ print OUT_FILE $_;
+}
+close(IN_FILE);
+close(OUT_FILE);
+# move the new content from tmp file to the orginal file.
+move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
+closedir(DIR);
+EOF
+
+--echo # Print the contents stored in dump.txt
+cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
+--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
+
+# Page type dump for ibdata1
+--exec $INNOCHECKSUM -v --page-type-dump $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/ibdata1
+--file_exists $MYSQLTEST_VARDIR/tmp/dump.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
+
+--echo [5]: Page type dump for with shortform for tab1.ibd
+--exec $INNOCHECKSUM -D $MYSQLTEST_VARDIR/tmp/dump.txt $MYSQLD_DATADIR/test/tab1.ibd
+
+perl;
+use strict;
+use warnings;
+use File::Copy;
+my $dir = $ENV{'MYSQLTEST_VARDIR'};
+opendir(DIR, $dir) or die $!;
+my $file= 'dump.txt';
+# open file in write mode
+open IN_FILE,"<", "$dir/tmp/$file" or die $!;
+open OUT_FILE, ">", "$dir/tmp/tmpfile" or die $!;
+while(<IN_FILE>)
+{
+ # Replace teh intergers to # and complete file patht to file name only.
+ $_=~ s/Filename.+/Filename::tab1.ibd/g;
+ $_=~ s/\d+/#/g;
+ print OUT_FILE $_;
+}
+close(IN_FILE);
+close(OUT_FILE);
+# move the new content from tmp file to the orginal file.
+move ("$dir/tmp/tmpfile", "$dir/tmp/$file");
+closedir(DIR);
+EOF
+
+# Print the contents stored in dump.txt
+cat_file $MYSQLTEST_VARDIR/tmp/dump.txt;
+--remove_file $MYSQLTEST_VARDIR/tmp/dump.txt
+
+--echo [6]: check the valid lower bound values for option
+--echo # allow-mismatches,page,start-page,end-page
+--exec $INNOCHECKSUM --allow-mismatches=0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -a 0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --page=0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -p 0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --start-page=0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -s 0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --end-page=0 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -e 0 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [7]: check the negative values for option
+--echo # allow-mismatches,page,start-page,end-page.
+--echo # They will reset to zero for negative values.
+--echo # check the invalid lower bound values
+--exec $INNOCHECKSUM --allow-mismatches=-1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -a -1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --page=-1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -p -1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --start-page=-1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -s -1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --end-page=-1 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -e -1 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [8]: check the valid upper bound values for
+--echo # both short and long options "allow-mismatches" and "end-page"
+
+--exec $INNOCHECKSUM --allow-mismatches=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -a 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM --end-page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
+--exec $INNOCHECKSUM -e 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
+
+--echo [9]: check the both short and long options "page" and "start-page" when
+--echo # seek value is larger than file size.
+--error 1
+--exec $INNOCHECKSUM --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -p 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --start-page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -s 18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Error: Unable to seek to necessary offset: Invalid argument;
+--source include/search_pattern_in_file.inc
+
+--echo [34]: check the invalid upper bound values for options, allow-mismatches, end-page, start-page and page.
+--echo # innochecksum will fail with error code: 1
+--error 1
+--exec $INNOCHECKSUM --allow-mismatches=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -a 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --end-page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -e 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -p 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM --start-page=18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+
+--error 1
+--exec $INNOCHECKSUM -s 18446744073709551616 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE
+let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+
+# Cleanup
+--echo # Restart the server
+--source include/start_mysqld.inc
+
+DROP TABLE tab1;
+DROP TABLE tab2;
+SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.opt b/mysql-test/suite/innodb_zip/t/innodb_bug36169.opt
new file mode 100644
index 00000000000..3a4e594f382
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.opt
@@ -0,0 +1 @@
+--innodb_large_prefix=ON \ No newline at end of file
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
index 6426bd683ae..1d82b95a602 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
@@ -4,6 +4,8 @@
# http://bugs.mysql.com/36169
#
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
+
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
SET GLOBAL innodb_file_format='Barracuda';
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
index 8bc461719b8..6c80165f6eb 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
@@ -5,7 +5,7 @@ let $file_per_table=`select @@innodb_file_per_table`;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on;
-
+SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
@@ -20,3 +20,4 @@ DROP TABLE bug53591;
EVAL SET GLOBAL innodb_file_format=$file_format;
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
+SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
index 17f82f88fef..8af2bc7ffc7 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
@@ -4,6 +4,8 @@
--source include/have_innodb_16k.inc
SET default_storage_engine=InnoDB;
+call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
+
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`;
@@ -11,6 +13,7 @@ let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
+set global innodb_strict_mode=1;
-- echo ### Test 1 ###
# Create a table of DYNAMIC format, with a primary index of 1000 bytes in
@@ -365,9 +368,9 @@ 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)));
+create table worklog5743(a TEXT not null, primary key (a(1000))) row_format=COMPACT;
-create table worklog5743(a TEXT);
+create table worklog5743(a TEXT) row_format=COMPACT;
# Excercise the column length check in ha_innobase::add_index()
-- error ER_INDEX_COLUMN_TOO_LONG
@@ -428,6 +431,7 @@ 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;
+SET GLOBAL innodb_strict_mode = DEFAULT;
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
diff --git a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test
deleted file mode 100644
index 1c02cafa47e..00000000000
--- a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test
+++ /dev/null
@@ -1,1371 +0,0 @@
-######## suite/innodb/t/innodb_prefix_index_liftedlimit.test ##########
-# #
-# Testcase for worklog WL#5743: Lift the limit of index key prefixes #
-# Accorrding to WL#5743 - prefix index limit is increased from 767 #
-# to 3072 for innodb. This change is applicable with Barracuda file #
-# format. #
-# All sub-test in this file focus on prefix index along with other #
-# operations #
-# #
-# #
-# Creation: #
-# 2011-05-19 Implemented this test as part of WL#5743 #
-# #
-######################################################################
-
---source include/have_innodb.inc
---source include/have_innodb_16k.inc
-
-# Save innodb variables
---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";
-set global innodb_file_per_table=1;
-set global innodb_large_prefix=1;
-
--- disable_warnings
-DROP TABLE IF EXISTS worklog5743;
--- enable_warnings
-#------------------------------------------------------------------------------
-# Prefix index with VARCHAR data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-# check IS
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-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;
---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;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with TEXT data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-# check IS
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with MEDIUMTEXT data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT ,
-PRIMARY KEY (col_1_mediumtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000)
-WHERE col_1_mediumtext = REPEAT("a", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumtext = REPEAT("c", 4000)
-AND col_2_mediumtext = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000);
-SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with LONGTEXT data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_longtext LONGTEXT , col_2_longtext LONGTEXT ,
-PRIMARY KEY (col_1_longtext(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000)
-WHERE col_1_longtext = REPEAT("a", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longtext = REPEAT("c", 4000)
-AND col_2_longtext = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000);
-SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with BLOB data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072));
-# check IS
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM
-INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with MEDIUMBLOB data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB ,
-PRIMARY KEY (col_1_mediumblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000)
-WHERE col_1_mediumblob = REPEAT("a", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_mediumblob = REPEAT("c", 4000)
-AND col_2_mediumblob = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000);
-SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with LONGBLOB data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_longblob LONGBLOB , col_2_longblob LONGBLOB ,
-PRIMARY KEY (col_1_longblob(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000)
-WHERE col_1_longblob = REPEAT("a", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_longblob = REPEAT("c", 4000)
-AND col_2_longblob = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000);
-SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with VARBINARY data type , primary/secondary index and DML ops
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with CHAR data type , composite index and DML ops
-CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255),
-col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255),
-col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255),
-col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255),
-col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-# Create index with total prefix index length = 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250),
-col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250),
-col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250),
-col_11_char(250),col_12_char(250),col_13_char(72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743;
-UPDATE worklog5743 SET col_1_char = REPEAT("c", 255)
-WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255);
-SELECT col_1_char = REPEAT("c", 255) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with BINARY data type , composite index and DML ops
-CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255),
-col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255),
-col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255),
-col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255),
-col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-# Create index with total prefix index length = 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250),
-col_3_binary (250),col_4_binary (250),col_5_binary (250),
-col_6_binary (250),col_7_binary (250),col_8_binary (250),
-col_9_binary (250),col_10_binary (250),col_11_binary (250),
-col_12_binary (250),col_13_binary (72)
-);
-INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743;
-UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255)
-WHERE col_1_binary = REPEAT("a", 255)
-AND col_2_binary = REPEAT("o", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743
-WHERE col_1_binary = REPEAT("c", 255)
-AND col_2_binary = REPEAT("o", 255);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255),
-REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255)
-);
-DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255);
-SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743;
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with VARCHAR data type , primary/seconday index , DML ops
-# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
-
-# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
-CREATE TABLE worklog5743_key2 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_varchar (767));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key2;
-UPDATE worklog5743_key2 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_key2
-WHERE col_2_varchar = REPEAT("o", 4000);
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2;
-DROP TABLE worklog5743_key2;
-
-# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
-CREATE TABLE worklog5743_key4 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_varchar (767));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key4;
-UPDATE worklog5743_key4 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("b", 3500) FROM worklog5743_key4
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4;
-DROP TABLE worklog5743_key4;
-
-# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following
-CREATE TABLE worklog5743_key8 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_varchar (767));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743_key8;
-UPDATE worklog5743_key8 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("b", 3500) FROM worklog5743_key8
-WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000);
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000);
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8;
-DROP TABLE worklog5743_key8;
-
-# Prefix index with TEXT data type , primary/seconday index , DML ops
-# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
-
-# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
-CREATE TABLE worklog5743_key2 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_text (767));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key2;
-UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2;
-DROP TABLE worklog5743_key2;
-
-# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
-CREATE TABLE worklog5743_key4 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_text (767));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key4;
-UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4;
-DROP TABLE worklog5743_key4;
-
-# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following
-CREATE TABLE worklog5743_key8 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_text (767));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743_key8;
-UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8;
-DROP TABLE worklog5743_key8;
-
-# Prefix index with BLOB data type , primary/seconday index , DML ops
-# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8.
-
-# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following
-CREATE TABLE worklog5743_key2 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_blob (767));
-INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key2;
-UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2;
-DROP TABLE worklog5743_key2;
-
-# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following
-CREATE TABLE worklog5743_key4 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(1964))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb;
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_blob (767));
-INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key4;
-UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4;
-DROP TABLE worklog5743_key4;
-
-# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following
-CREATE TABLE worklog5743_key8 (
-col_1_blob BLOB (4000) , col_2_blob BLOB (4000) ,
-PRIMARY KEY (col_1_blob(3072))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb;
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_blob (767));
-INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000)
-FROM worklog5743_key8;
-UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000)
-WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000);
-SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8
-WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000);
-INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000);
-SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8;
-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 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_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)
-);
-
-# 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));
-
-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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-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;
-
-# 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
-# we write in undo log page which of 16K size.
-# so we can create max 5 prefix index of length 3072 on table.
-# Similar to above case but with transactions
-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_6_varchar VARCHAR (4000), col_7_binary BINARY (255)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-
-
-# 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));
-CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072));
-CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072));
-
-START TRANSACTION;
-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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-ROLLBACK;
-START TRANSACTION;
-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)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-
-START TRANSACTION;
-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)
-);
-ROLLBACK;
-# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
-# 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),
-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;
-
-#------------------------------------------------------------------------------
-# Prefix index with utf8 charset
-# utf8 charcter takes 3 bytes in mysql so prefix index limit is 3072/3 = 1024
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) CHARACTER SET 'utf8',
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-# Prefix index with utf8 charset + varchar.
-# 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 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
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) ,
-col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8',
-col_3_text TEXT (4000) CHARACTER SET 'utf8',
-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;
-
-
-CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500));
-CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500));
-
-START TRANSACTION;
-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)
-);
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-ROLLBACK;
-START TRANSACTION;
-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)
-);
-COMMIT;
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000)
-FROM worklog5743;
-
-START TRANSACTION;
-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)
-);
-ROLLBACK;
-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;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with utf8 charset on TEXT data type with actual utf8 character
-# like "स" and "क"
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) CHARACTER SET 'utf8',
-col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(1024))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000)
-WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000);
-SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743;
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with transaction when 2 client are ruuning there transaction
-# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and
-# READ UNCOMMITTED.
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-
---connect (con1,localhost,root,,)
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-
-
---connect (con2,localhost,root,,)
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-# Uncomment after Bug#12552164 - TRANSACTION CAN NOT SEE OLD VERSION ROWS THAT
-# BEING UPDATED
-#UPDATE worklog5743 SET col_1_varchar = REPEAT("d", 200) WHERE col_1_varchar =
-#REPEAT("a", 200) AND col_2_varchar = REPEAT("o", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-
-
---connection con1
-select @@session.tx_isolation;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-
-START TRANSACTION;
-
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-
---connection con2
-COMMIT;
-# Wait for commit
-let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist
-WHERE info='COMMIT';
---source include/wait_condition.inc
-
---connection con1
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-COMMIT;
-
---connection default
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Prefix index with transaction when 2 client are ruuning there transaction
-# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and
-# READ UNCOMMITTED. Same as above case but con2 starts tnx before con1
-
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-
---connection con1
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-START TRANSACTION;
-
-
---connection con2
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-COMMIT;
-# Wait for commit
-let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist
-WHERE info='COMMIT';
---source include/wait_condition.inc
-
-
---connection con1
-SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
-select @@session.tx_isolation;
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
-
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-COMMIT;
-
---connection default
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-
-# Prefix index with transaction when 2 client are ruuning there transaction
-# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and
-# READ UNCOMMITTED. Same as above cases but with ROLLBACK
-
-CREATE TABLE worklog5743 (
-col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
-PRIMARY KEY (col_1_text(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200));
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-
---connection con1
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-START TRANSACTION;
-
-
---connection con2
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200));
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200);
-SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-ROLLBACK;
-# Wait for rollback
-let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist
-WHERE info='COMMIT';
---source include/wait_condition.inc
-
-
---connection con1
-SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM
-worklog5743;
-SELECT COUNT(*) FROM worklog5743;
-COMMIT;
-
---disconnect con1
---source include/wait_until_disconnected.inc
---connection con2
---disconnect con2
---source include/wait_until_disconnected.inc
-
---connection default
-DROP TABLE worklog5743;
-
-
-#------------------------------------------------------------------------------
-# Select queries on prefix index column as index will be used in queries.
-# Use few select functions , join condition , subqueries.
-
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-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));
-SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743;
-
-# Select with Join
-SELECT tbl1.col_1_varchar = tbl2.col_1_varchar
-FROM worklog5743 tbl1 , worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ;
-
-# Select in subquey
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ;
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE
-col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2)
-AND col_1_varchar = REPEAT("c", 4000);
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar != tbl2.col_1_varchar
-) ;
-SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1
-WHERE col_1_varchar in (
-SELECT tbl2.col_1_varchar FROM worklog5743 tbl2
-WHERE tbl1.col_1_varchar = tbl2.col_1_varchar
-) ;
-
-# function
-SELECT
-REVERSE(col_1_varchar) = REPEAT("c", 4000) ,
-REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-SELECT
-UPPER(col_1_varchar) = REPEAT("c", 4000) ,
-UPPER(col_1_varchar) = REPEAT("C", 4000) ,
-LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000)
-FROM worklog5743;
-SELECT
-col_1_varchar = REPEAT("c", 4000)
-FROM worklog5743 WHERE col_1_varchar like '%c__%';
-SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ;
-SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ;
-
-
-DROP TABLE worklog5743;
-
-#------------------------------------------------------------------------------
-# Prefix index with NULL values
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) ,
-col_2_varchar VARCHAR (4000) ,
-UNIQUE INDEX (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-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));
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-INSERT INTO worklog5743 VALUES(NULL,NULL);
-# check IS
-SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE
-FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ;
-SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL;
-SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000))
-FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1;
-
-
-DROP TABLE worklog5743;
-
-# -----------------------------------------------------------------------------
-# Try drop and add secondary prefix index
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-# Drop index
-DROP INDEX prefix_idx ON worklog5743;
-
-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);
-# Again add index
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-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;
-
-# -----------------------------------------------------------------------------
-
-# Try drop and add primary prefix index
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-# Drop index
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-
-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);
-# Again add index
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072));
-
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
---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;
-DROP TABLE worklog5743;
-
-
-# -----------------------------------------------------------------------------
-
-# Try drop and add both (primary/secondary) prefix index
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY `prefix_primary` (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-# Drop primary index
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-# Drop secondary index
-DROP INDEX prefix_idx ON worklog5743;
-
-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);
-# Again add index
-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 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;
-DROP TABLE worklog5743;
-
-
-# -----------------------------------------------------------------------------
-# Drop index from differnt session
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) ,
-PRIMARY KEY (col_1_varchar (3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500));
-CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072));
-
---connect (con1,localhost,root,,)
-
-
---connection con1
-SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500)
-FROM worklog5743;
-
---connection default
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500));
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-COMMIT;
-
---connection con1
-START TRANSACTION;
-INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500));
-# Drop primary index
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500)
-WHERE col_1_varchar = REPEAT("a", 3500)
-AND col_2_varchar = REPEAT("o", 3500);
-SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("o", 3500);
-
---connection default
-DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500);
-SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743
-WHERE col_2_varchar = REPEAT("p", 3500);
-
---connection con1
-COMMIT;
-
---connection default
-DROP TABLE worklog5743;
-
-
-
-# -----------------------------------------------------------------------------
-# Create prefix index with length < 3072 , length = 3072 , length > 3072
-# - varbinary data type + secondary index
-CREATE TABLE worklog5743 (
-col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) ,
-PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index of 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-# Drop index
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("b", 4000)
-AND col_2_varbinary = REPEAT("p", 4000);
-
-
-# Again add index length < 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-# Drop index
-DROP INDEX prefix_idx ON worklog5743;
-
-# Again add index length > 3072.
-# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072
-# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does
-# not support prefix > 767, the create index will be rejected.
-CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000)
-WHERE col_1_varbinary = REPEAT("a", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000);
-SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_varbinary = REPEAT("c", 4000)
-AND col_2_varbinary = REPEAT("o", 4000);
-
-
-DROP TABLE worklog5743;
-
-# -----------------------------------------------------------------------------
-# Create prefix index with length < 3072 , length = 3072 , length > 3072
-# text data type + secondary index
-CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(500))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index of 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072));
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000)
-FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-# Drop index
-DROP INDEX prefix_idx ON worklog5743;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000);
-
-# Again add index length < 3072
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-# Drop index
-DROP INDEX prefix_idx ON worklog5743;
-
-# Again add index length > 3072. Expect error.Length exceeds maximum supported
-# key length
-# Again add index length > 3072.
-# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072
-# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does
-# not support prefix > 767, the create index will be rejected.
-CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000);
-
-DROP TABLE worklog5743;
-
-
-# -----------------------------------------------------------------------------
-# Create prefix index with length < 948 , length = 948 , length > 948
-# For compressed row type + primary key
-CREATE TABLE worklog5743 (
-col_1_text TEXT (4000) , col_2_text TEXT (4000) ,
-PRIMARY KEY (col_1_text(948))
-) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb;
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000));
-# Create index of 767
-INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000));
-SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-# Drop index
-#DROP INDEX prefix_idx ON worklog5743;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("b", 4000)
-AND col_2_text = REPEAT("p", 4000);
-
-# Again add index length < 767
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700));
-INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
-SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-# Drop index
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-
-# Again add index length > 948. Expect error 'to big row ' due to exceed
-# 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;
-UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000)
-WHERE col_1_text = REPEAT("a", 4000)
-AND col_2_text = REPEAT("o", 4000);
-DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000);
-SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743
-WHERE col_1_text = REPEAT("c", 4000)
-AND col_2_text = REPEAT("o", 4000);
-
-DROP TABLE worklog5743;
-
-# -----------------------------------------------------------------------------
-# Create prefix index with length < 3072 , length = 3072 , length > 3072
-# data types VARCHAR
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-# Again add index length > 3072. Expect error.Length exceeds maximum supported
-# key length
-# Again add index length > 3072.
-# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072
-# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does
-# not support prefix > 767, the create index will be rejected.
-# Index length is truncated only for 'create index' , but error if we add
-# prefix index with length > 3072
---error ER_TOO_LONG_KEY
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073));
-DROP TABLE worklog5743;
-
-
-CREATE TABLE worklog5743 (
-col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500));
-ALTER TABLE worklog5743 DROP PRIMARY KEY;
-# Negative case
-# Again add index length > 3072. Expect error.Length exceeds maximum supported
-# key length
-# Index length is truncated only for 'create index' , but error if we add
-# prefix index with length > 3072
---error ER_TOO_LONG_KEY
-ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073));
-
-DROP TABLE worklog5743;
-
-# -----------------------------------------------------------------------------
-# Error on adding larger prefix if violates unique index.
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000)
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-INSERT INTO worklog5743
-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 ER_DUP_ENTRY
-ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000));
-DROP TABLE worklog5743;
-
-# -----------------------------------------------------------------------------
-set global innodb_large_prefix=0;
-# Prefix index > 767 is allowed if innodb_large_prefix is set to 1
---error ER_TOO_LONG_KEY
-CREATE TABLE worklog5743 (
-col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
-PRIMARY KEY (col_1_varchar(3072))
-) ROW_FORMAT=DYNAMIC, engine = innodb;
-
-
-# -----------------------------------------------------------------------------
-set global innodb_large_prefix=0;
-# Backward compatibility test - Index lenghth > 767 is truncated for REDUNDANT
-# and COMPACT
-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));
-# 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;
-#------------------------------------------------------------------------------
-
---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;
---connection con1
---disconnect con1
---source include/wait_until_disconnected.inc
---enable_query_log
---connection default
diff --git a/mysql-test/suite/innodb_zip/t/large_blob-master.opt b/mysql-test/suite/innodb_zip/t/large_blob-master.opt
new file mode 100644
index 00000000000..90a3f0db9d4
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/large_blob-master.opt
@@ -0,0 +1,3 @@
+--max_allowed_packet=200M
+--innodb_buffer_pool_size=10M
+--innodb_log_buffer_size=10M
diff --git a/mysql-test/suite/innodb_zip/t/large_blob.test b/mysql-test/suite/innodb_zip/t/large_blob.test
new file mode 100644
index 00000000000..dc1dc2eba29
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/large_blob.test
@@ -0,0 +1,122 @@
+--echo #
+--echo # This tests the use of large blobs in InnoDB.
+--echo #
+
+--source include/have_innodb.inc
+--source include/have_nodebug.inc
+--source include/big_test.inc
+
+--disable_query_log
+# These values can change during the test
+let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
+
+# Create a 20MB blob that does not compress easily.
+# 1000 Random characters is enough to keep compression low.
+set @alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+set @r=abs(rand()*52) + 1;
+set @blob=substr(@alphabet,@r,1);
+let $1=1000;
+while ($1 > 1)
+{
+ set @r=abs(rand()*52) + 1;
+ set @letter=substr(@alphabet,@r,1);
+ set @blob=concat(@blob,@letter);
+ dec $1;
+}
+# The loop above is extremely slow compared to repeat().
+set @longblob=repeat(@blob,200000);
+--enable_query_log
+
+call mtr.add_suppression("InnoDB: Warning: a long semaphore wait");
+
+SET GLOBAL innodb_file_per_table = OFF;
+
+--echo #
+--echo # System tablespace, Row Format = Redundant
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--echo #
+--echo # System tablespace, Row Format = Compact
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+SET GLOBAL innodb_file_per_table = ON;
+
+--echo #
+--echo # Separate tablespace, Row Format = Redundant
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--echo #
+--echo # Separate tablespace, Row Format = Compact
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--echo #
+--echo # Separate tablespace, Row Format = Compressed, Key Block Size = 2k
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--echo #
+--echo # Separate tablespace, Row Format = Compressed, Key Block Size = 1k
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--echo #
+--echo # Separate tablespace, Row Format = Dynamic
+--echo #
+CREATE TABLE t1 (
+ c1 INT DEFAULT NULL,
+ c2 LONGBLOB NOT NULL,
+ KEY k2 (c2(250), c1)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+INSERT INTO t1 VALUES (1, '');
+UPDATE t1 SET c2=@longblob;
+DROP TABLE t1;
+
+--disable_query_log
+EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
+--enable_query_log
diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test
new file mode 100644
index 00000000000..354e63a69f7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/restart.test
@@ -0,0 +1,602 @@
+#
+# These test make sure that tables are visible after rebooting
+#
+
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+--source include/have_partition.inc
+--source include/not_embedded.inc
+SET default_storage_engine=InnoDB;
+LET $MYSQLD_DATADIR = `select @@datadir`;
+LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+
+--disable_query_log
+# This error is expected in the error log for this test.
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Error number 17 means 'File exists'");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number (17|80) in a file operation.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot create file .*t55_restart.isl");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: The link file: .* already exists.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only:");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified.");
+call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
+--enable_query_log
+
+--echo #
+--echo # A series of tests to make sure tables are opened after restart.
+--echo # Bug#13357607 Compressed file-per-table tablespaces fail to open
+--echo #
+# This bug was introduced without a regression test failing since
+# there were no tests showing that tablespaces could be created and
+# then read after reboot.
+#
+
+--disable_query_log
+let $MYSQL_DATA_DIR= `select @@datadir`;
+let $data_directory = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
+
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+--enable_query_log
+
+set global innodb_file_per_table=on;
+
+--echo #
+--echo # Create and insert records into a REDUNDANT row formatted table.
+--echo #
+CREATE TABLE t1_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
+INSERT INTO t1_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+SHOW CREATE TABLE t1_restart;
+SELECT count(*) FROM t1_restart;
+
+--echo #
+--echo # Create and insert records into a COMPACT row formatted table.
+--echo #
+CREATE TABLE t2_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=COMPACT ENGINE=InnoDB;
+INSERT INTO t2_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t2_restart;
+SELECT count(*) FROM t2_restart;
+
+--echo #
+--echo # Create and insert records into a COMPRESSED row formatted table.
+--echo #
+CREATE TABLE t3_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB;
+INSERT INTO t3_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+SHOW CREATE TABLE t3_restart;
+SELECT count(*) FROM t3_restart;
+
+--echo #
+--echo # Create and insert records into a DYNAMIC row formatted table.
+--echo #
+CREATE TABLE t4_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=DYNAMIC ENGINE=InnoDB;
+INSERT INTO t4_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SHOW CREATE TABLE t4_restart;
+SELECT count(*) FROM t4_restart;
+
+--echo #
+--echo # Create and insert records into a table that uses a remote DATA DIRECTORY.
+--echo #
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval CREATE TABLE t5_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=DYNAMIC ENGINE=InnoDB $data_directory;
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t5_restart;
+SELECT count(*) FROM t5_restart;
+
+--echo #
+--echo # Create and insert records into a partitioned table that uses
+--echo # a remote DATA DIRECTORY for each partition.
+--echo #
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval CREATE TABLE t6_restart(
+ c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB
+ PARTITION BY HASH(c1) (
+ PARTITION p0 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+ PARTITION p1 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+ PARTITION p2 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir');
+INSERT INTO t6_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t6_restart;
+SELECT count(*) FROM t6_restart;
+
+--echo #
+--echo # Create and insert records into a subpartitioned table that uses
+--echo # a remote DATA DIRECTORY for each subpartition.
+--echo #
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval CREATE TABLE t7_restart(
+ c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=DYNAMIC ENGINE=InnoDB
+ PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
+ PARTITION p0 VALUES LESS THAN (10) (
+ SUBPARTITION s0 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+ SUBPARTITION s1 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir'),
+ PARTITION p1 VALUES LESS THAN MAXVALUE (
+ SUBPARTITION s2 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+ SUBPARTITION s3 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir'));
+INSERT INTO t7_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7_restart;
+SELECT count(*) FROM t7_restart;
+
+--echo #
+--echo # Create and insert records into a table that uses a general tablespace.
+--echo #
+CREATE TABLESPACE s1_restart ADD DATAFILE 's1_restart.ibd';
+CREATE TABLE t8_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=COMPACT ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t8_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t8_restart;
+SELECT count(*) FROM t8_restart;
+CREATE TABLE t9_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ ROW_FORMAT=DYNAMIC ENGINE=InnoDB TABLESPACE=s1_restart;
+INSERT INTO t9_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+SHOW CREATE TABLE t9_restart;
+SELECT count(*) FROM t9_restart;
+
+--echo #
+--echo # Show these tables in information_schema.
+--echo #
+--source suite/innodb/include/show_i_s_tables.inc
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+--echo #
+--echo # Shutdown the server and list the tablespace OS files
+--echo #
+--source include/shutdown_mysqld.inc
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir
+--list_files $MYSQL_TMP_DIR/alt_dir
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+
+--echo #
+--echo # Start the server and show that tables are still visible and accessible.
+--echo #
+--source include/start_mysqld.inc
+
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+SHOW CREATE TABLE t1_restart;
+SHOW CREATE TABLE t2_restart;
+SHOW CREATE TABLE t3_restart;
+SHOW CREATE TABLE t4_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t5_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t6_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7_restart;
+SHOW CREATE TABLE t8_restart;
+SHOW CREATE TABLE t9_restart;
+
+INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
+INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
+INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
+INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
+INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t8_restart);
+INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t9_restart);
+
+SELECT count(*) FROM t1_restart;
+SELECT count(*) FROM t2_restart;
+SELECT count(*) FROM t3_restart;
+SELECT count(*) FROM t4_restart;
+SELECT count(*) FROM t5_restart;
+SELECT count(*) FROM t6_restart;
+SELECT count(*) FROM t7_restart;
+SELECT count(*) FROM t8_restart;
+SELECT count(*) FROM t9_restart;
+
+--echo #
+--echo # Show these tables in information_schema.
+--echo #
+--source suite/innodb/include/show_i_s_tables.inc
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+DROP TABLE t1_restart;
+DROP TABLE t2_restart;
+DROP TABLE t3_restart;
+# Tablespace for t4_restart will be moved later from default directory to a new directory
+# and an ISL file will be created not using InnoDB.
+# Table t5_restart will be expanded.
+# Tables t6_restart and t7_restart will be truncated.
+DROP TABLE t8_restart;
+DROP TABLE t9_restart;
+DROP TABLESPACE s1_restart;
+
+--echo #
+--echo # Truncate the remote tablespaces.
+--echo #
+TRUNCATE TABLE t5_restart;
+ALTER TABLE t6_restart TRUNCATE PARTITION p2;
+ALTER TABLE t7_restart TRUNCATE PARTITION p1;
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
+
+SELECT count(*) FROM t5_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t5_restart;
+
+SELECT count(*) FROM t6_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t6_restart;
+
+SELECT count(*) FROM t7_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7_restart;
+
+--echo #
+--echo # Shutdown the server and make a backup of a tablespace
+--echo #
+--source include/shutdown_mysqld.inc
+
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd $MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd.bak
+--copy_file $MYSQL_DATA_DIR/test/t5_restart.isl $MYSQL_DATA_DIR/test/t5_restart.isl.bak
+--copy_file $MYSQL_DATA_DIR/test/t5_restart.frm $MYSQL_DATA_DIR/test/t5_restart.frm.bak
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+
+--echo #
+--echo # Start the server and show the tablespaces.
+--echo #
+--source include/start_mysqld.inc
+
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+SELECT count(*) FROM t5_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t5_restart;
+
+SELECT count(*) FROM t6_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t6_restart;
+
+SELECT count(*) FROM t7_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7_restart;
+
+--echo #
+--echo # Try to rename a tablespace to a file that already exists
+--echo #
+
+--copy_file $MYSQL_DATA_DIR/test/t5_restart.frm.bak $MYSQL_DATA_DIR/test/t55_restart.frm
+--error ER_TABLE_EXISTS_ERROR
+RENAME TABLE t5_restart TO t55_restart;
+--remove_file $MYSQL_DATA_DIR/test/t55_restart.frm
+--remove_file $MYSQL_DATA_DIR/test/t5_restart.frm.bak
+
+--copy_file $MYSQL_DATA_DIR/test/t5_restart.isl.bak $MYSQL_DATA_DIR/test/t55_restart.isl
+--error ER_ERROR_ON_RENAME
+RENAME TABLE t5_restart TO t55_restart;
+--remove_file $MYSQL_DATA_DIR/test/t55_restart.isl
+--remove_file $MYSQL_DATA_DIR/test/t5_restart.isl.bak
+
+#--copy_file $MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd.bak $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+# This RENAME TABLE works of Linux but gets ER_ERROR_ON_RENAME on Windows
+#--error ER_ERROR_ON_RENAME
+#RENAME TABLE t5_restart TO t55_restart;
+#--remove_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd.bak
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+
+--echo #
+--echo # Rename file table and tablespace
+--echo #
+
+RENAME TABLE t5_restart TO t55_restart;
+RENAME TABLE t6_restart TO t66_restart;
+RENAME TABLE t7_restart TO t77_restart;
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t55_restart;
+
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t66_restart;
+
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77_restart;
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+
+--echo #
+--echo # Restart the server
+--echo #
+--source include/restart_mysqld.inc
+SHOW VARIABLES LIKE 'innodb_file_per_table';
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t55_restart;
+
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t66_restart;
+
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77_restart;
+
+--echo #
+--echo # Shutdown the server
+--echo #
+--source include/shutdown_mysqld.inc
+
+--echo #
+--echo # Move the remote tablespaces to a new location and change the ISL files
+--echo #
+--mkdir $MYSQL_TMP_DIR/new_dir
+--mkdir $MYSQL_TMP_DIR/new_dir/test
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+--echo ---- MYSQL_TMP_DIR/new_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/new_dir/test
+
+--echo # Moving tablespace 't4_restart' from MYSQL_DATA_DIR to MYSQL_TMP_DIR/new_dir
+--copy_file $MYSQL_DATA_DIR/test/t4_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+--remove_file $MYSQL_DATA_DIR/test/t4_restart.ibd
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd > $MYSQL_DATA_DIR/test/t4_restart.isl
+
+--echo # Moving tablespace 't55_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd
+--remove_file $MYSQL_DATA_DIR/test/t55_restart.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd > $MYSQL_DATA_DIR/test/t55_restart.isl
+
+--echo # Moving tablespace 't66_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p0.ibd $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p1.ibd $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p2.ibd $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p0.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p1.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t66_restart#P#p2.ibd
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd > $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
+
+--echo # Moving tablespace 't77_restart' from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s1.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p1#SP#s2.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p1#SP#s3.ibd $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s0.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p0#SP#s1.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p1#SP#s2.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77_restart#P#p1#SP#s3.ibd
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd > $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/alt_dir/test
+--echo ---- MYSQL_TMP_DIR/new_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/new_dir/test
+
+--echo #
+--echo # Start the server and check tablespaces.
+--echo #
+--source include/start_mysqld.inc
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t4_restart;
+
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t55_restart;
+
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t66_restart;
+
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77_restart;
+
+
+--echo #
+--echo # Shutdown the server
+--echo #
+--source include/shutdown_mysqld.inc
+
+--echo #
+--echo # Move the remote tablespaces back to the default datadir and delete the ISL file.
+--echo #
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/new_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/new_dir/test
+
+--echo # Moving 't4_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd $MYSQL_DATA_DIR/test/t4_restart.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd
+--remove_file $MYSQL_DATA_DIR/test/t4_restart.isl
+
+--echo # Moving 't55_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd $MYSQL_DATA_DIR/test/t55_restart.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd
+--remove_file $MYSQL_DATA_DIR/test/t55_restart.isl
+
+--echo # Moving 't66_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p0.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p1.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd $MYSQL_DATA_DIR/test/t66_restart#P#p2.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p0.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p1.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t66_restart#P#p2.ibd
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p0.isl
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p1.isl
+--remove_file $MYSQL_DATA_DIR/test/t66_restart#P#p2.isl
+
+--echo # Moving 't77_restart' from MYSQL_TMP_DIR/new_dir to MYSQL_DATA_DIR
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s0.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p0#SP#s1.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s2.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77_restart#P#p1#SP#s3.ibd
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s0.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p0#SP#s1.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s2.isl
+--remove_file $MYSQL_DATA_DIR/test/t77_restart#P#p1#SP#s3.isl
+
+--echo ---- MYSQL_DATA_DIR/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_DATA_DIR/test
+--echo ---- MYSQL_TMP_DIR/new_dir/test
+--replace_result #P# #p# #SP# #sp#
+--list_files $MYSQL_TMP_DIR/new_dir/test
+
+--echo #
+--echo # Start the server and check tablespaces.
+--echo #
+-- source include/start_mysqld.inc
+
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
+SELECT count(*) FROM t4_restart;
+SHOW CREATE TABLE t4_restart;
+
+INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
+SELECT count(*) FROM t55_restart;
+SHOW CREATE TABLE t55_restart;
+
+INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
+SELECT count(*) FROM t66_restart;
+SHOW CREATE TABLE t66_restart;
+
+INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
+SELECT count(*) FROM t77_restart;
+SHOW CREATE TABLE t77_restart;
+
+
+--echo #
+--echo # Cleanup
+--echo #
+
+DROP TABLE t4_restart;
+DROP TABLE t55_restart;
+DROP TABLE t66_restart;
+DROP TABLE t77_restart;
+
+--rmdir $MYSQL_TMP_DIR/alt_dir/test
+--rmdir $MYSQL_TMP_DIR/alt_dir
+--rmdir $MYSQL_TMP_DIR/new_dir/test
+--rmdir $MYSQL_TMP_DIR/new_dir
+
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+-- enable_query_log
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test b/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test
new file mode 100644
index 00000000000..df4e66967f7
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test
@@ -0,0 +1,135 @@
+#*******************************************************************
+# This testcase is to test the funcitionality of wl#6344
+# When the innodb_compression_level=0 create a table with page size
+# 1K and load data
+# When the innodb_compression_level=9 create a table with page size
+# 1K and load data
+# compare the size of the both tables.
+# The size of the table when compression level=0 should be
+# greater than the
+# the size of the table when compression level=9
+#*******************************************************************
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+
+USE test;
+DROP TABLE IF EXISTS tab5;
+DROP TABLE IF EXISTS tab6;
+
+--echo #set the other madatory flags before test starts
+SET GLOBAL Innodb_file_per_table=on;
+let $innodb_compression_level = `SELECT @@global.innodb_compression_level`;
+
+--echo #set the compression level=0 (No compress)
+SET global innodb_compression_level=0;
+
+-- echo #check the compression level and the compressed_pages is default
+SELECT @@innodb_compression_level;
+SELECT @@Innodb_file_per_table;
+
+-- echo #create table with 1K block size
+CREATE TABLE tab5 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+
+-- echo #create indexes
+CREATE INDEX idx1 ON tab5(col_4(10));
+CREATE INDEX idx2 ON tab5(col_5(10));
+CREATE INDEX idx3 ON tab5(col_6(10));
+CREATE INDEX idx4 ON tab5(col_7(10));
+CREATE INDEX idx5 ON tab5(col_8(10));
+CREATE INDEX idx6 ON tab5(col_11);
+
+--echo #load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+
+--echo #insert 10 records
+let $i = 10;
+while ($i) {
+
+eval INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+dec $i;
+
+}
+
+--echo #set the compression level=9 (High compress)
+SET global innodb_compression_level=9;
+
+-- echo #create table with 1K block size
+CREATE TABLE tab6 (col_1 CHAR (255) ,
+col_2 VARCHAR (255), col_3 longtext,
+col_4 longtext,col_5 longtext,
+col_6 longtext , col_7 longtext ,
+col_8 longtext ,col_9 longtext ,
+col_10 longtext ,col_11 int auto_increment primary key)
+ENGINE = innodb ROW_FORMAT=compressed key_block_size=1;
+
+-- echo #create indexes
+CREATE INDEX idx1 ON tab6(col_4(10));
+CREATE INDEX idx2 ON tab6(col_5(10));
+CREATE INDEX idx3 ON tab6(col_6(10));
+CREATE INDEX idx4 ON tab6(col_7(10));
+CREATE INDEX idx5 ON tab6(col_8(10));
+CREATE INDEX idx6 ON tab6(col_11);
+
+--echo #load the with repeat function
+SET @col_1 = repeat('a', 100);
+SET @col_2 = repeat('b', 100);
+SET @col_3 = repeat('c', 100);
+SET @col_4 = repeat('d', 100);
+SET @col_5 = repeat('e', 100);
+SET @col_6 = repeat('f', 100);
+SET @col_7 = repeat('g', 100);
+SET @col_8 = repeat('h', 100);
+SET @col_9 = repeat('i', 100);
+SET @col_10 = repeat('j', 100);
+
+--echo #insert 10 records
+let $i = 10;
+while ($i) {
+
+eval INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10)
+VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10);
+dec $i;
+}
+
+-- echo #diff the sizes of the No compressed table and high compressed table
+SET @size=(SELECT
+(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024)
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab5' AND ENGINE='InnoDB' AND table_schema='test')
+-
+(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024
+FROM INFORMATION_SCHEMA.TABLES
+WHERE table_name='tab6' AND ENGINE='InnoDB' AND table_schema='test')
+FROM DUAL);
+
+--echo #check the size of the table, it should not be Negative value
+--echo #The results of this query Test pass = 1 and fail=0
+SELECT @size >= 0;
+
+
+--echo #
+--echo # Cleanup
+--echo #
+DROP TABLE tab5;
+DROP TABLE tab6;
+
+--echo #reset back the compression_level to default.
+--disable_query_log
+eval SET GLOBAL innodb_compression_level=$innodb_compression_level;
+--enable_query_log
diff --git a/mysql-test/suite/innodb_zip/t/wl6347_comp_indx_stat.test b/mysql-test/suite/innodb_zip/t/wl6347_comp_indx_stat.test
new file mode 100644
index 00000000000..445fd812183
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6347_comp_indx_stat.test
@@ -0,0 +1,1337 @@
+--echo #******************************************************************
+--echo # Test 1: Test the interaction between stats and compression level
+--echo # and logging of compressed pages configuration
+--echo # This testcase is to verify the table/idex level compression stats
+--echo # When the flags are set as follows
+--echo # innodb_cmp_per_index_enabled=ON and innodb_compression_level=0
+--echo # page size 1K,2K,4K,8K,16K
+--echo # check the size and compression stats of the table tab5
+--echo #******************************************************************
+
+# This test case needs InnoDB.
+-- source include/have_innodb.inc
+-- source include/not_embedded.inc
+-- source include/have_innodb_16k.inc
+-- source include/big_test.inc
+
+-- vertical_results
+
+let MYSQLD_DATADIR=`SELECT @@datadir`;
+let $innodb_compression_level = `SELECT @@global.innodb_compression_level`;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_level=0;
+
+--echo #******************************************************************
+--echo # Test 1-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 1K
+--echo #******************************************************************
+
+--echo # create a table with page size=1K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=1;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for deterministic reasons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 1-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 2K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+--echo # create a table with page size=2K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=2;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=0;
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=2;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 1-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 4K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+--echo # create a table with page size=4K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=4;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 1-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 8K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+--echo # create a table with page size=8K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=8;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 1-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=0 with page size 16K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+--echo # create a table with page size=16K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=16;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 2: test the interaction between wl6347 & wl6344 (2.2)
+--echo # This testcase is to verify the table/idex level compression stats
+--echo # When the flags are set as follows
+--echo # innodb_cmp_per_index_enabled=ON and innodb_compression_level=9
+--echo # page size 1K,2K,4K,8K,16K
+--echo # check the size and compression stats of the table tab5
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+
+
+--echo #******************************************************************
+--echo # Test 2-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 1K
+--echo #******************************************************************
+
+--echo # create a table with page size=1K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=1;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 2-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 2K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=2K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=2;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 2097152
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_level=9;
+
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 2-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 4K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=4K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=4;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 159744
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 2-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 8K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=8K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=8;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 122880
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 212992
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 2-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=9 with page size 16K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=16K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=16;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 245760
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 344064
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 3: test the interaction between wl6347 & wl6344 (2.3)
+--echo # This testcase is to verify the table/idex level compression stats
+--echo # When the flags are set as follows
+--echo # innodb_cmp_per_index_enabled=ON and
+--echo # innodb_compression_level=6 (default)
+--echo # page size 1K,2K,4K,8K,16K
+--echo # check the size and compression stats of the table tab5
+--echo #******************************************************************
+
+--echo #******************************************************************
+--echo # Test 3-1K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 1K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SET GLOBAL innodb_compression_level=default;
+
+--echo # create a table with page size=1K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=1;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 3-2K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 2K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SET GLOBAL innodb_compression_level=default;
+
+--echo # create a table with page size=2K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=2;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 86016
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 3-4K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 4K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SET GLOBAL innodb_compression_level=default;
+
+--echo # create a table with page size=4K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=4;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 65536
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 86016
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 3-8K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 8K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SET GLOBAL innodb_compression_level=default;
+
+--echo # create a table with page size=8K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=8;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 122880
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 172032
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 3-16K: innodb_cmp_per_index_enabled=ON and innodb_compression_level=Def with page size 16K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+SET GLOBAL innodb_compression_level=default;
+
+--echo # create a table with page size=16K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=16;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 245760
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+--echo # The size of the file with 0 compress = 344064
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 4: test the interaction between wl6347 & wl6344 (2.5 & 2.6)
+--echo # This testcase is to verify the table/idex level compression stats
+--echo # When the flags are set as follows
+--echo # innodb_cmp_per_index_enabled=ON and
+--echo # Innodb_compression_failure_threshold_pct=0
+--echo # page size 1K,2K,4K,8K,16K
+--echo # check the size and compression stats of the table tab5
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+SELECT @@innodb_compression_failure_threshold_pct;
+SELECT @@innodb_file_per_table;
+SELECT @@innodb_compression_level;
+
+--echo #******************************************************************
+--echo # Test 4-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 1K
+--echo #******************************************************************
+
+--echo # create a table with page size=1K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=1;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=0;
+SET GLOBAL innodb_file_per_table=on;
+
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 4-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 2K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=2K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=2;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 4-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 4K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=4K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=4;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 4-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 8K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=8K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=8;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 4-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=0 with page size 16K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=16K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=16;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 5: test the interaction between wl6347 & wl6344 (2.7)
+--echo # This testcase is to verify the table/idex level compression stats
+--echo # When the flags are set as follows
+--echo # innodb_cmp_per_index_enabled=ON and
+--echo # Innodb_compression_failure_threshold_pct=10
+--echo # page size 1K,2K,4K,8K,16K
+--echo # check the size and compression stats of the table tab5
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_compression_level=Default;
+
+
+--echo # check the flags
+SELECT @@innodb_cmp_per_index_enabled;
+SELECT @@innodb_compression_failure_threshold_pct;
+SELECT @@innodb_file_per_table;
+SELECT @@innodb_compression_level;
+
+--echo #******************************************************************
+--echo # Test 5-1K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 1K
+--echo #******************************************************************
+
+--echo # create a table with page size=1K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=1;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+-- source include/restart_mysqld.inc
+
+--echo # set the flag on (default off)
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # set the flags
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+SET GLOBAL innodb_file_per_table=on;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+
+
+--echo # fetch the compressed page and check the stats
+--echo # The stats figure may be different/same for each restart.
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table
+-- echo # testcase : pass = 1 fail = 0
+SET @comp_val=0;
+SET @uncomp_val=1;
+--source suite/innodb_zip/include/innodb_stats_restart.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 5-2K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 2K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+
+--echo # create a table with page size=2K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=2;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=2;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 5-4K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 4K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=4K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=4;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 5-8K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 8K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+SET GLOBAL innodb_compression_failure_threshold_pct=10;
+
+--echo # create a table with page size=8K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=8;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 5-16K: innodb_cmp_per_index_enabled=ON and Innodb_compression_failure_threshold_pct=10 with page size 16K
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=OFF;
+SET GLOBAL innodb_cmp_per_index_enabled=ON;
+
+--echo # create a table with page size=16K
+--echo # create indexes on each column.(total 9 indexes)
+let $block_size=16;
+--source suite/innodb_zip/include/innodb_create_tab_indx.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # for determintic resons simple data should be inserted.
+--echo # insert some 100 records
+let $i = 100;
+--source suite/innodb_zip/include/innodb_load_data.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed page and check the stats
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+--echo # fetch the compressed same page once again and check the stats
+--echo # the stat figures should be same as above query
+--source suite/innodb_zip/include/innodb_fetch_records.inc
+
+--echo # check the stats of the table & size of the table
+SET @inl_val=1;
+--source suite/innodb_zip/include/innodb_stats_comp_index.inc
+
+DROP TABLE tab5;
+
+--echo #******************************************************************
+--echo # Test 6: Create multiple tables & indexes having same name in 2 diff DB's
+--echo # Check the stats of the table. (1.1)
+--echo #******************************************************************
+
+--echo # reset the stat table before starting next testcase
+SET GLOBAL innodb_cmp_per_index_enabled=0;
+SET GLOBAL innodb_cmp_per_index_enabled=1;
+
+SET GLOBAL innodb_file_per_table=ON;
+SET GLOBAL innodb_compression_level=default;
+SET GLOBAL innodb_compression_failure_threshold_pct=default;
+
+
+--echo # create a table page size=1K
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+CREATE INDEX idx1 ON tab5(col_1(10));
+
+--echo # check the stats of the table
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='test' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+
+CREATE DATABASE sb;
+USE sb;
+
+--echo # create a table page size=1K (testcase-1)
+CREATE TABLE tab5(col_1 TINYBLOB, col_2 TINYTEXT,col_3 BLOB,
+col_4 TEXT,col_5 MEDIUMBLOB,col_6 MEDIUMTEXT,
+col_7 LONGBLOB,col_8 LONGTEXT,col_9 VARCHAR(255))
+ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+
+CREATE INDEX idx1 ON tab5(col_1(10));
+
+SELECT database_name,table_name,index_name,compress_ops,compress_ops_ok
+FROM information_schema.innodb_cmp_per_index
+WHERE database_name='sb' and table_name='tab5'
+ORDER BY index_name,table_name,database_name ;
+
+DROP TABLE tab5, test.tab5;
+DROP DATABASE sb;
+
+--echo # reset the flags
+eval SET GLOBAL innodb_file_per_table=default;
+eval SET GLOBAL innodb_cmp_per_index_enabled=default;
+--disable_query_log
+eval SET GLOBAL innodb_compression_level=$innodb_compression_level;
+--enable_query_log
+eval SET GLOBAL innodb_compression_failure_threshold_pct=default;
diff --git a/mysql-test/suite/innodb_zip/t/wl6470_1.test b/mysql-test/suite/innodb_zip/t/wl6470_1.test
new file mode 100644
index 00000000000..ecf6b601d3d
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6470_1.test
@@ -0,0 +1,60 @@
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+--source include/big_test.inc
+
+####################################################################
+# TC to test temp-table DML optimization changes for correctness #
+# Sceanrio covered: #
+# 1. bulk-insert with rollback + commit: this will ensure btree #
+# node split with rollback and commit. #
+####################################################################
+
+#-------------------------------------------------------------------
+#
+# 1. bulk-insert with rollback + commit: this will ensure btree #
+# node split with rollback and commit. #
+#
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb;
+create temporary table t2
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb;
+--source suite/innodb_zip/include/innodb_dml_ops.inc
+drop table t1;
+drop table t2;
+#
+--disable_warnings
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb key_block_size = 4;
+set innodb_strict_mode=off;
+create temporary table t2
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb key_block_size = 8;
+set innodb_strict_mode=default;
+--enable_warnings
+--source suite/innodb_zip/include/innodb_dml_ops.inc
+drop table t1;
+drop table t2;
+#
+let $file_per_table = `select @@innodb_file_per_table`;
+set global innodb_file_per_table = 0;
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb;
+create temporary table t2
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb;
+--source suite/innodb_zip/include/innodb_dml_ops.inc
+drop table t1;
+drop table t2;
+eval set global innodb_file_per_table = $file_per_table;
+#
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6470_2.test b/mysql-test/suite/innodb_zip/t/wl6470_2.test
new file mode 100644
index 00000000000..020c27b97b9
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6470_2.test
@@ -0,0 +1,468 @@
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+--source include/no_valgrind_without_big.inc
+
+####################################################################
+# TC to test temp-table DML optimization changes for correctness #
+# Sceanrio covered in single testcase : #
+# - Tables with row format(redundant,compressed,dynamic,compact #
+# - Table with primary,composite,prefix,secondary index #
+# - Insert/delete/update with transactioons #
+# - Transaction with commit,rollback,savepoint statements #
+# - Concurrency by execution of two clients creating tables with #
+# same names #
+# - Inserting data using #
+# - Insert into .. , Load data infile..,insert ignore #
+# - Insert into .. on duplicate update #
+# - Check basic delete and upadte [ignore] #
+# - Check constraints like duplicate key,default value #
+# - Alter add column , add primary key #
+# - with prepare and execute statement #
+####################################################################
+
+# run for page size >= 8k
+--disable_warnings
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`)
+{
+ --skip Test requires InnoDB with page size >= 8k.
+}
+--enable_warnings
+
+
+# Save initial values of server variable
+--disable_query_log
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+--enable_query_log
+
+# Create procedure to perform
+# 1. Create temp table with row types , index , sufficent data types
+# 2. Perform DML with transaction
+delimiter |;
+create procedure populate_tables()
+ begin
+ declare n int default 20;
+ declare inner_loop int default 100;
+ set global innodb_file_per_table=on;
+ drop table if exists t1,t2,t3,t4;
+
+ create temporary table t1(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=redundant;
+
+ create temporary table t2(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=compact;
+
+ create temporary table t3(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=compressed key_block_size=4;
+
+ create temporary table t4(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=dynamic;
+
+ create temporary table t5(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb;
+
+ create temporary table t6 ( a int ) engine = innodb;
+ insert into t6 values (50),(100),(150),(190);
+
+ while (n > 0) do
+ start transaction;
+ insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
+ repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ now(),(100.55+n));
+ insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
+ repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ now(),(100.55+n));
+ insert into t3 values(n,n,repeat(concat(' tc3_',n),30),
+ repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ now(),(100.55+n));
+ insert into t4 values(n,n,repeat(concat(' tc3_',n),30),
+ repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ now(),(100.55+n));
+ insert into t5 values(n,n,repeat(concat(' tc3_',n),30),
+ repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
+ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ now(),(100.55+n));
+
+ if (n > 10) then
+ commit;
+ else
+ delete from t1 where c1 > 10 ;
+ delete from t2 where c1 > 10 ;
+ delete from t3 where c1 > 10 ;
+ delete from t4 where c1 > 10 ;
+ delete from t5 where c1 > 10 ;
+
+ rollback;
+ start transaction;
+ update t1 set c1 = c1 + 1000 where c1 > 10;
+ update t2 set c1 = c1 + 1000 where c1 > 10;
+ update t3 set c1 = c1 + 1000 where c1 > 10;
+ update t4 set c1 = c1 + 1000 where c1 > 10;
+ update t5 set c1 = c1 + 1000 where c1 > 10;
+ rollback;
+ end if;
+
+ start transaction;
+ insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t5 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+
+ delete from t1 where c1 between 100 and 110;
+ delete from t2 where c1 between 100 and 110;
+ delete from t3 where c1 between 100 and 110;
+ delete from t4 where c1 between 100 and 110;
+ delete from t5 where c1 between 100 and 110;
+
+ update t1 set c1 = c1+1 where c1>110;
+ update t2 set c1 = c1+1 where c1>110;
+ update t3 set c1 = c1+1 where c1>110;
+ update t4 set c1 = c1+1 where c1>110;
+ update t5 set c1 = c1+1 where c1>110;
+
+ savepoint a;
+
+ insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t5 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ savepoint b;
+
+ insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ insert into t5 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
+ repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
+ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ now(),(100.55+n+inner_loop));
+ savepoint c;
+ rollback to b;
+ rollback to a;
+ commit;
+ commit;
+ rollback;
+ set n = n - 1;
+ end while;
+end|
+delimiter ;|
+
+# Create two client for concurrent execution
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+--echo #---client 1 : dml operation ---"
+connection con1;
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+-- enable_query_log
+-- disable_query_log
+# call procedure
+--send call populate_tables();
+-- enable_query_log
+
+--echo #---client 2 : dml operation ---"
+connection con2;
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+-- enable_query_log
+-- disable_query_log
+# call procedure
+--send call populate_tables();
+-- enable_query_log
+
+# check data of client connection 1
+--echo # In connection 1
+connection con1;
+--reap
+# 20 rows exepceted in 5 tables
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+select count(*) from t4;
+select count(*) from t5;
+select c1 from t1;
+select c1 from t2;
+select c1 from t3;
+select c1 from t4;
+select c1 from t5;
+# check data of client connection 2
+--echo # In connection 2
+connection con2;
+--reap
+# 20 rows exepceted in 5 tables
+select count(*) from t1;
+select count(*) from t2;
+select count(*) from t3;
+select count(*) from t4;
+select count(*) from t5;
+select c1 from t1;
+select c1 from t2;
+select c1 from t3;
+select c1 from t4;
+select c1 from t5;
+
+--echo # In connection 1
+connection con1;
+
+set autocommit = 0;
+# Check duplicate key constraint + insert ignore
+--error ER_DUP_ENTRY
+insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+insert ignore into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+
+# check rollback due to duplicate value in second record of insert
+--error ER_DUP_ENTRY
+insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t3 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+--error ER_DUP_ENTRY
+insert into t5 values (1,1,'a','a','a','a','a',now(),100.55),
+(20,1,'a','a','a','a','a',now(),100.55);
+
+set autocommit = 1;
+
+select c1,c2 from t1 where c1 in (20,1);
+select c1,c2 from t2 where c1 in (20,1);
+select c1,c2 from t3 where c1 in (20,1);
+select c1,c2 from t4 where c1 in (20,1);
+select c1,c2 from t5 where c1 in (20,1);
+
+#replace statement
+replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t3 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
+replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
+# verify row is replaced from (20,20) to (20,1)
+select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
+select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
+select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20;
+select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
+select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
+
+# Update ignore. statement is gonored as 20 value exits
+update ignore t1 set c1 = 20 where c1 = 140 ;
+update ignore t2 set c1 = 20 where c1 = 140 ;
+update ignore t3 set c1 = 20 where c1 = 140 ;
+update ignore t4 set c1 = 20 where c1 = 140 ;
+update ignore t5 set c1 = 20 where c1 = 140 ;
+# see record 140 is present as last update ignored
+select count(*) from t1 where c1 = 140;
+select count(*) from t2 where c1 = 140;
+select count(*) from t3 where c1 = 140;
+select count(*) from t4 where c1 = 140;
+select count(*) from t5 where c1 = 140;
+
+# Load data infile
+--echo "running select * into outfile <file> from t1 ;
+--disable_query_log
+eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t1.outfile" from t1;
+--enable_query_log
+# Create table as select
+create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
+select count(*) from temp_1;
+--echo "running load data infile <file> into temp_1 ;
+--disable_query_log
+eval load data infile '$MYSQLTEST_VARDIR/tmp/t1.outfile' into table temp_1;
+--enable_query_log
+select count(*) from temp_1;
+
+# Alter table to add column and primary key
+alter table temp_1 add column c10 int default 99 ,
+add column c11 varchar(100) default 'test';
+alter table temp_1 add primary key (c1);
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55);
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+select count(*) from temp_1 where c10 = 99 and c11 like 'test';
+# insert on duplicate key update
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
+on duplicate key update c1=-2,c2=-2;
+select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
+
+#cleanup
+drop table t1 ,t2 ,t3,t4,t5,t6,temp_1;
+disconnect con1;
+
+connection con2;
+drop table t1 ,t2 ,t3,t4,t5,t6;
+disconnect con2;
+
+connection default;
+drop procedure populate_tables;
+
+
+# case 2 - with prepare and execute
+let $prep_loop= 5;
+create temporary table prep_1(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(6000) not null,
+ c5 blob(6000) not null,
+ c6 varchar(2000) not null,
+ c7 varchar(2000) not null,
+ c8 datetime,
+ c9 decimal(6,3),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+engine=innodb;
+PREPARE stm FROM "insert into prep_1 values(?,?,repeat(concat(' tc3_',?),30),repeat(concat(' tc4_',?),800),repeat(concat(' tc_',?),800),repeat(concat(' tc6_',?),245),repeat(concat(' tc7_',?),245),now(),(100.55+?))";
+set @var = 5;
+set @var_static = 5;
+while ($prep_loop>0)
+{
+ eval EXECUTE stm USING @var,@var,@var,@var,@var,@var,@var,@var;
+ eval EXECUTE stm USING @var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static,@var_static;
+ dec $prep_loop;
+ set @var = @var - 1;
+}
+select c1,left(c3,15) from prep_1 order by c1 ;
+select count(*) from prep_1;
+
+PREPARE stm_1 FROM "UPDATE prep_1 SET c1 = c1 + 1";
+EXECUTE stm_1;
+EXECUTE stm_1;
+select c1,left(c3,15) from prep_1 order by c1 ;
+select count(*) from prep_1;
+
+PREPARE stm_2 FROM "DELETE FROM prep_1 ORDER BY c1 LIMIT 1";
+EXECUTE stm_2;
+EXECUTE stm_2;
+select c1,left(c3,15) from prep_1 order by c1 ;
+select count(*) from prep_1;
+
+drop prepare stm;
+drop prepare stm_1;
+drop prepare stm_2;
+drop table prep_1;
+
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile
+
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+SET sql_mode = default;
+-- enable_query_log
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_1.test b/mysql-test/suite/innodb_zip/t/wl6501_1.test
new file mode 100644
index 00000000000..dd8b5f65b31
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6501_1.test
@@ -0,0 +1,451 @@
+
+####################################################################
+# TC to check truncate table statement atomicity for single #
+# tablespace #
+# Sceanrio covered: #
+# 1. Debug points added for worklog #
+# 2. Table with differnt row types #
+# 3. Transactional statement. #
+####################################################################
+
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+--source include/have_innodb_16k.inc
+
+# Valgrind would result in a "long semaphore wait" inside InnoDB
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+#-----------------------------------------------------------------------
+--disable_query_log
+let $MYSQL_DATA_DIR= `select @@datadir`;
+let $data_directory = data directory='$MYSQL_TMP_DIR/alt_dir';
+let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
+
+call mtr.add_suppression("InnoDB.*table did not exist in the InnoDB data dictionary.*");
+call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds.*");
+call mtr.add_suppression("InnoDB: Cannot create file.*");
+call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'.*");
+call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds");
+call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal");
+--enable_query_log
+
+#-----------------------------------------------------------------------
+set global innodb_file_per_table=on;
+--echo # Verify that 'TRUNCATE TABLE' statement works fine and the size
+--echo # of .ibd file is equal to the initial size after truncation.
+
+#-----------------------------------------------------------------------
+drop table if exists t1,t2,t3,t4,t6;
+let $cnt = 6;
+while ($cnt) {
+
+ # table with basic data type + primary ,secondary,composite,prefix index
+ create table t1(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(500) not null,
+ c5 blob(500) not null,
+ c6 varchar(500) not null,
+ c7 varchar(500) not null,
+ c8 datetime,
+ c9 decimal(5,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=redundant;
+
+
+ create table t2(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(500) not null,
+ c5 blob(500) not null,
+ c6 varchar(500) not null,
+ c7 varchar(500) not null,
+ c8 datetime,
+ c9 decimal(5,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=compact;
+
+
+ # with row type , key block size = 4K
+ create table t3(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(500) not null,
+ c5 blob(500) not null,
+ c6 varchar(500) not null,
+ c7 varchar(500) not null,
+ c8 datetime,
+ c9 decimal(5,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=compressed key_block_size=4;
+
+
+ create table t4(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(500) not null,
+ c5 blob(500) not null,
+ c6 varchar(500) not null,
+ c7 varchar(500) not null,
+ c8 datetime,
+ c9 decimal(5,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb row_format=dynamic;
+
+
+ create temporary table t5(c1 int not null,
+ c2 int not null,
+ c3 char(255) not null,
+ c4 text(500) not null,
+ c5 blob(500) not null,
+ c6 varchar(500) not null,
+ c7 varchar(500) not null,
+ c8 datetime,
+ c9 decimal(5,3),
+ primary key (c1),
+ index (c3,c4(50),c5(50)),
+ index (c2))
+ engine=innodb;
+
+ create table t6 ( a int ) engine = innodb;
+ insert into t6 values (50),(100),(150);
+
+ --disable_query_log
+ --disable_result_log
+ let $n=5;
+
+ # load created tables.
+ while ($n)
+ {
+ start transaction;
+
+ eval insert ignore into t1 values(
+ $n, $n,
+ repeat(concat(' tc3_',$n), 42),
+ repeat(concat(' tc4_',$n), 300),
+ repeat(concat(' tc5_',$n), 300),
+ repeat(concat(' tc6_',$n), 300),
+ repeat(concat(' tc7_',$n), 300),
+ now(), (100.55+$n));
+
+ eval insert ignore into t2 values(
+ $n, $n,
+ repeat(concat(' tc3_',$n), 42),
+ repeat(concat(' tc4_',$n), 300),
+ repeat(concat(' tc5_',$n), 300),
+ repeat(concat(' tc6_',$n), 300),
+ repeat(concat(' tc7_',$n), 300),
+ now(), (100.55+$n));
+
+ eval insert ignore into t3 values(
+ $n, $n,
+ repeat(concat(' tc3_',$n), 42),
+ repeat(concat(' tc4_',$n), 300),
+ repeat(concat(' tc5_',$n), 300),
+ repeat(concat(' tc6_',$n), 300),
+ repeat(concat(' tc7_',$n), 300),
+ now(), (100.55+$n));
+
+ eval insert ignore into t4 values(
+ $n, $n,
+ repeat(concat(' tc3_',$n), 42),
+ repeat(concat(' tc4_',$n), 300),
+ repeat(concat(' tc5_',$n), 300),
+ repeat(concat(' tc6_',$n), 300),
+ repeat(concat(' tc7_',$n), 300),
+ now(), (100.55+$n));
+
+ eval insert ignore into t5 values(
+ $n, $n,
+ repeat(concat(' tc3_',$n), 42),
+ repeat(concat(' tc4_',$n), 300),
+ repeat(concat(' tc5_',$n), 300),
+ repeat(concat(' tc6_',$n), 300),
+ repeat(concat(' tc7_',$n), 300),
+ now(), (100.55+$n));
+
+ if ($n <= 3)
+ {
+ commit;
+ }
+
+ if ($n > 3)
+ {
+ rollback;
+ }
+
+ dec $n;
+ }
+
+ # validate loading of the tables.
+ --enable_result_log
+ --enable_query_log
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ select count(*) from t5;
+ select count(*) from t6;
+
+ # set the debug crash point and exercise them.
+ if ($cnt == 6)
+ {
+ set session debug="+d,ib_trunc_crash_during_drop_index_temp_table";
+ --echo "---debug ib_trunc_crash_during_drop_index_temp_table point---"
+ }
+ if ($cnt == 5)
+ {
+ set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+ --echo "---debug ib_trunc_crash_drop_reinit_done_create_to_start---"
+ }
+
+ if ($cnt >= 5) {
+ --echo # Write file to make mysql-test-run.pl expect crash and restart
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --echo # Run the crashing query
+ --error 2013
+ truncate table t5;
+ --source include/wait_until_disconnected.inc
+ --enable_reconnect
+ --echo # Restart the MySQL server
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+ --disable_reconnect
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ --error ER_NO_SUCH_TABLE
+ select count(*) from t5;
+ select count(*) from t6;
+ }
+
+ # set the debug crash point and exercise them.
+ if ($cnt == 6)
+ {
+ set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---"
+ }
+ if ($cnt == 5)
+ {
+ set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_create_of_sec_index---"
+ }
+ if ($cnt == 4)
+ {
+ set session debug="+d,ib_trunc_crash_before_log_removal";
+ --echo "---debug ib_trunc_crash_before_log_removal point---"
+ }
+ if ($cnt == 3)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 2)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 1)
+ {
+ set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+ --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---"
+ }
+
+ --echo # Write file to make mysql-test-run.pl expect crash and restart
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --echo # Run the crashing query
+ --error 2013
+ truncate table t1;
+ --source include/wait_until_disconnected.inc
+ --enable_reconnect
+ --echo # Restart the MySQL server
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+ --disable_reconnect
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ --error ER_NO_SUCH_TABLE
+ select count(*) from t5;
+ select count(*) from t6;
+
+ if ($cnt == 6)
+ {
+ set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---"
+ }
+ if ($cnt == 5)
+ {
+ set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_create_of_sec_index---"
+ }
+ if ($cnt == 4)
+ {
+ set session debug="+d,ib_trunc_crash_before_log_removal";
+ --echo "---debug ib_trunc_crash_before_log_removal point---"
+ }
+ if ($cnt == 3)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 2)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 1)
+ {
+ set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+ --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---"
+ }
+
+
+ --echo # Write file to make mysql-test-run.pl expect crash and restart
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --echo # Run the crashing query
+ --error 2013
+ truncate table t2;
+ --source include/wait_until_disconnected.inc
+ --enable_reconnect
+ --echo # Restart the MySQL server
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+ --disable_reconnect
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ --error ER_NO_SUCH_TABLE
+ select count(*) from t5;
+ select count(*) from t6;
+
+ if ($cnt == 6)
+ {
+ set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---"
+ }
+ if ($cnt == 5)
+ {
+ set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_create_of_sec_index---"
+ }
+ if ($cnt == 4)
+ {
+ set session debug="+d,ib_trunc_crash_before_log_removal";
+ --echo "---debug ib_trunc_crash_before_log_removal point---"
+ }
+ if ($cnt == 3)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 2)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 1)
+ {
+ set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+ --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---"
+ }
+
+
+ --echo # Write file to make mysql-test-run.pl expect crash and restart
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --echo # Run the crashing query
+ --error 2013
+ truncate table t3;
+ --source include/wait_until_disconnected.inc
+ --enable_reconnect
+ --echo # Restart the MySQL server
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+ --disable_reconnect
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ --error ER_NO_SUCH_TABLE
+ select count(*) from t5;
+ select count(*) from t6;
+
+
+ if ($cnt == 6)
+ {
+ set session debug="+d,ib_trunc_crash_on_drop_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---"
+ }
+ if ($cnt == 5)
+ {
+ set session debug="+d,ib_trunc_crash_on_create_of_sec_index";
+ --echo "---debug ib_trunc_crash_on_create_of_sec_index---"
+ }
+ if ($cnt == 4)
+ {
+ set session debug="+d,ib_trunc_crash_before_log_removal";
+ --echo "---debug ib_trunc_crash_before_log_removal point---"
+ }
+ if ($cnt == 3)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 2)
+ {
+ set session debug="+d,ib_trunc_crash_after_truncate_done";
+ --echo "---debug ib_trunc_crash_after_truncate_done point---"
+ }
+ if ($cnt == 1)
+ {
+ set session debug="+d,ib_trunc_crash_after_redo_log_write_complete";
+ --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---"
+ }
+
+ --echo # Write file to make mysql-test-run.pl expect crash and restart
+ --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --echo # Run the crashing query
+ --error 2013
+ truncate table t4;
+ --source include/wait_until_disconnected.inc
+ --enable_reconnect
+ --echo # Restart the MySQL server
+ --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+ --source include/wait_until_connected_again.inc
+ --disable_reconnect
+ select count(*) from t1;
+ select count(*) from t2;
+ select count(*) from t3;
+ select count(*) from t4;
+ --error ER_NO_SUCH_TABLE
+ select count(*) from t5;
+ select count(*) from t6;
+
+ drop table t1, t2, t3, t4, t6;
+
+ dec $cnt;
+
+ --disable_query_log
+ eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+ --enable_query_log
+}
+
+
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test
new file mode 100644
index 00000000000..eb4c23aa66e
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test
@@ -0,0 +1,26 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+# TC tries to hit crash point during truncate of
+# compressed non-temp table residing in single tablespace
+# with page-size=16k
+
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+let $wl6501_file_per_table = 1;
+let $wl6501_row_fmt = compressed;
+let $wl6501_kbs = 16;
+let $wl6501_file_format = 'Barracuda';
+--source suite/innodb/include/innodb_wl6501_crash.inc
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test
new file mode 100644
index 00000000000..870af3dfc94
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test
@@ -0,0 +1,29 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+# TC tries to hit crash point during truncate of
+# compressed non-temp table residing in single tablespace.
+# with page-size=4k
+
+--source include/have_innodb.inc
+--source include/have_innodb_4k.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+let $wl6501_file_per_table = 1;
+let $wl6501_row_fmt = compressed;
+let $wl6501_kbs = 4;
+let $wl6501_file_format = 'Barracuda';
+--source suite/innodb/include/innodb_wl6501_crash.inc
+
+let $wl6501_temp = temporary;
+--source suite/innodb/include/innodb_wl6501_crash_temp.inc
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test
new file mode 100644
index 00000000000..3432a5a5c76
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test
@@ -0,0 +1,26 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+# TC tries to hit crash point during truncate of
+# compressed non-temp table residing in single tablespace.
+# with page-size=8k
+
+--source include/have_innodb.inc
+--source include/have_innodb_8k.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+let $wl6501_file_per_table = 1;
+let $wl6501_row_fmt = compressed;
+let $wl6501_kbs = 8;
+let $wl6501_file_format = 'Barracuda';
+--source suite/innodb/include/innodb_wl6501_crash.inc
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test
new file mode 100644
index 00000000000..8c746fe8abf
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test
@@ -0,0 +1,41 @@
+#
+# WL#6501: make truncate table atomic
+#
+
+# load table with some significiant amount of data
+# and then try truncate
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/big_test.inc
+--source include/have_innodb_16k.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+
+# Single-Tablespace/Non-Compressed
+let $wl6501_file_per_table = 1;
+let $wl6501_row_fmt = compact;
+let $wl6501_kbs = 16;
+let $wl6501_file_format = 'Antelope';
+--source suite/innodb_zip/include/innodb_wl6501_scale.inc
+
+# Single-Tablespace/Compressed
+let $wl6501_file_per_table = 1;
+let $wl6501_row_fmt = compressed;
+let $wl6501_kbs = 16;
+let $wl6501_file_format = 'Barracuda';
+--source suite/innodb_zip/include/innodb_wl6501_scale.inc
+
+# System-Tablespace/Non-Compressed
+let $wl6501_file_per_table = 0;
+let $wl6501_row_fmt = compact;
+let $wl6501_kbs = 16;
+let $wl6501_file_format = 'Antelope';
+--source suite/innodb_zip/include/innodb_wl6501_scale.inc
+
diff --git a/mysql-test/suite/innodb_zip/t/wl6560.test b/mysql-test/suite/innodb_zip/t/wl6560.test
new file mode 100644
index 00000000000..041dd453c72
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6560.test
@@ -0,0 +1,423 @@
+#
+# WL#6560: InnoDB: separate tablespace for innodb-temp-tables.
+#
+
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+# Embedded server does not restart of server
+--source include/not_embedded.inc
+-- source include/big_test.inc
+
+--disable_query_log
+call mtr.add_suppression("Tablespace innodb_temporary ran out of space. Please add another file or use 'autoextend' for the last file in setting innodb_temp_data_file_path.");
+call mtr.add_suppression("The table 't1' is full");
+--enable_query_log
+
+################################################################################
+#
+# Will test following scenarios:
+# 1. creation of shared temp-tablespace.
+# 2. ddl + dml operation involving temp-tablespace.
+# insert/delete/update/select
+# create/drop/alter/truncate/import-discard (though blocked).
+# 3. ddl + dml operation on compressed table.
+# (table doesn't reside in shared temp-tablespace).
+# 4. Test bulk-loading that result in auto-extension of temp-tablespace.
+# 5. re-creation of temp-tablespace on re-start.
+# also to ensure non-existence of existing temp-table.
+# 6. restart server in innodb-read-only mode. this will also
+# block creation of temp-tables.
+# 7. try starting server with shared and temp-tablespace filename same.
+# 8. try re-starting server with param so that temp-tablespace can't be
+# expanded and insert enough data to make it full.
+# 9. tests for different row format types and key block sizes for
+# compressed tables.
+# 10. try restarting server with raw device specified for temp-tablespace.
+# 11. try restarting server with temp-tablespace less than min. threshold
+# 12. no file specified for temp-tablespace.
+################################################################################
+
+#-----------------------------------------------------------------------------
+#
+# create test-bed
+#
+let $per_table = `select @@innodb_file_per_table`;
+
+set global innodb_file_per_table = off;
+let $MYSQL_TMP_DIR = `select @@tmpdir`;
+let $MYSQL_DATA_DIR = `select @@datadir`;
+let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
+let $args = --loose-console --core-file > $SEARCH_FILE 2>&1;
+let crash = --loose-console > $SEARCH_FILE 2>&1 --innodb-force-recovery-crash;
+let readonly = $args --innodb_read_only;
+let nameconflicts = $args --innodb_data_file_path="ibdata1:12M:autoextend:max:134217728" --innodb_temp_data_file_path="ibdata1:12M:autoextend";
+let rawdevice1 = $args --innodb_temp_data_file_path="/dev/hdd1:3Gnewraw;/dev/hdd2:2Gnewraw";
+let rawdevice2 = $args --innodb_temp_data_file_path="/dev/hdd1:3Graw;/dev/hdd2:2Graw";
+let sizeoftempfile1 = $args --innodb_temp_data_file_path="ibtmp1:2M:autoextend";
+let sizeoftempfile2 = $args --innodb_data_file_path="ibdata1:2M:autoextend";
+let notemptablespacefile = $args --innodb_temp_data_file_path="";
+
+#-----------------------------------------------------------------------------
+#
+# 1. creation of shared temp-tablespace.
+#
+--echo # files in MYSQL_DATA_DIR
+--list_files $MYSQL_DATA_DIR/ ibtmp*
+
+
+#-----------------------------------------------------------------------------
+#
+# 2. ddl + dml operation involving temp-tablespace.
+# insert/delete/update/select
+# create/drop/alter/truncate/import-discard (though blocked).
+#
+select @@global.innodb_file_per_table;
+create temporary table t1 (i int, f float, c char(100)) engine=innodb;
+#
+--source suite/innodb_zip/include/innodb_temp_table_dml.inc
+#
+# alter table
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 discard tablespace;
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 import tablespace;
+#
+# drop table
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 3. ddl + dml operation on compressed table.
+# (table doesn't reside in shared temp-tablespace).
+#
+--echo #files in MYSQL_TMP_DIR
+--list_files $MYSQL_TMP_DIR/ *.ibd
+set global innodb_file_per_table = 1;
+select @@global.innodb_file_per_table;
+create temporary table t1
+ (i int, f float, c char(100)) engine = innodb key_block_size = 4;
+show create table t1;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+#
+--source suite/innodb_zip/include/innodb_temp_table_dml.inc
+#
+# alter table
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 discard tablespace;
+#
+# drop table
+drop table t1;
+set global innodb_file_per_table = off;
+
+#-----------------------------------------------------------------------------
+#
+# 4. Test bulk-loading that result in auto-extension of temp-tablespace.
+#
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc)) engine = innodb;
+delimiter |;
+CREATE PROCEDURE populate_t1()
+BEGIN
+ DECLARE i INT DEFAULT 1;
+ while (i <= 20000) DO
+ insert into t1 values (i, 'a', 'b');
+ SET i = i + 1;
+ END WHILE;
+END|
+delimiter ;|
+set autocommit=0;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+select * from t1 limit 10;
+set autocommit=1;
+truncate table t1;
+select count(*) from t1;
+#
+drop procedure populate_t1;
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 5. re-creation of temp-tablespace on re-start.
+# also to ensure non-existence of existing temp-table.
+#
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+insert into t1 values (1, 'c', 'b');
+select * from t1;
+#
+--source include/restart_mysqld.inc
+#
+--echo # files in MYSQL_DATA_DIR
+--list_files $MYSQL_DATA_DIR/ ibtmp*
+use test;
+--error ER_NO_SUCH_TABLE
+select * from t1;
+
+#-----------------------------------------------------------------------------
+#
+# 6. restart server in innodb-read-only mode. this will also
+# block creation of temp-tables.
+#
+#
+--echo "testing temp-table creation in --innodb_read_only mode"
+let $restart_parameters = restart: --innodb-read-only;
+--source include/restart_mysqld.inc
+#
+use test;
+show tables;
+--error ER_INNODB_READ_ONLY
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+
+#-----------------------------------------------------------------------------
+#
+# 7. try starting server with shared and temp-tablespace filename same.
+#
+--source include/shutdown_mysqld.inc
+--echo "testing system and temp tablespace name conflict"
+--error 1
+--exec $MYSQLD_CMD $nameconflicts
+let SEARCH_PATTERN = innodb_temporary and innodb_system file names seem to be the same;
+--source ./include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+--echo "restarting server in normal mode"
+--enable_reconnect
+let $restart_parameters = restart;
+--source include/start_mysqld.inc
+#
+show tables;
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 8. try re-starting server with param so that temp-tablespace can't be expanded
+# and insert enough data to make it full.
+#
+--echo # test condition of full-temp-tablespace
+let $restart_parameters = restart: --innodb_temp_data_file_path=ibtmp1:12M;
+--source include/restart_mysqld.inc
+#
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc)) engine = innodb;
+delimiter |;
+CREATE PROCEDURE populate_t1()
+BEGIN
+ DECLARE i INT DEFAULT 1;
+ while (i <= 20000) DO
+ insert into t1 values (i, 'a', 'b');
+ SET i = i + 1;
+ END WHILE;
+END|
+delimiter ;|
+set autocommit=0;
+select count(*) from t1;
+--error ER_RECORD_FILE_FULL
+call populate_t1();
+#
+drop procedure populate_t1;
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 9. tests for different row format types and key block sizes for
+# compressed tables.
+#
+set innodb_strict_mode = off;
+--disable_warnings
+set global innodb_file_per_table = 0;
+set global innodb_file_format = 'Antelope';
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed key_block_size = 8;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+#
+drop table t;
+set global innodb_file_per_table = 1;
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed key_block_size = 8;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+set innodb_strict_mode = on;
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+--replace_regex /[0-9]+/NUMBER/
+drop table t;
+#
+set global innodb_file_format = 'Barracuda';
+set innodb_strict_mode = off;
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed key_block_size = 8;
+--replace_regex /[0-9]+/NUMBER/
+# explicitly disabling it else it will generate warning of ignoring
+# key_block_size when suite is run with innodb-page-size=4k
+#show warnings;
+set innodb_strict_mode = default;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+#
+drop table t;
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+set innodb_strict_mode = on;
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+drop table t;
+set innodb_strict_mode = off;
+#
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic key_block_size = 4;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = compact;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb key_block_size = 4;
+--replace_regex /[0-9]+/NUMBER/
+show warnings;
+--echo #files in MYSQL_TMP_DIR
+--replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
+--list_files $MYSQL_TMP_DIR/ *.ibd
+drop table t;
+#
+
+#-----------------------------------------------------------------------------
+#
+# 10. try restarting server with raw device specified for temp-tablespace.
+#
+--source include/shutdown_mysqld.inc
+--echo "testing temp tablespace non-support for raw device"
+--error 1
+--exec $MYSQLD_CMD $rawdevice1
+let SEARCH_PATTERN = support raw device;
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+--echo "testing temp tablespace non-support for raw device"
+--error 1
+--exec $MYSQLD_CMD $rawdevice2
+let SEARCH_PATTERN = support raw device;
+--source include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+
+let $restart_parameters = restart;
+--source include/start_mysqld.inc
+
+show tables;
+create temporary table t1 (
+ keyc int, c1 char(100), c2 char(100)
+ ) engine = innodb;
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 11. try restarting server with temp-tablespace less than min. threshold
+#
+--source include/shutdown_mysqld.inc
+--echo "try starting server with temp-tablespace size < min. threshold"
+--error 1
+--exec $MYSQLD_CMD $sizeoftempfile1
+let SEARCH_PATTERN = Tablespace size must be at least;
+--source ./include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+--echo "try starting server with sys-tablespace size < min. threshold"
+--error 1
+--exec $MYSQLD_CMD $sizeoftempfile2
+let SEARCH_PATTERN = Tablespace size must be at least;
+--source ./include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+
+--source include/start_mysqld.inc
+
+show tables;
+create temporary table t1 (
+ keyc int, c1 char(100), c2 char(100)
+ ) engine = innodb;
+drop table t1;
+
+#-----------------------------------------------------------------------------
+#
+# 12. no file specified for temp-tablespace.
+#
+--source include/shutdown_mysqld.inc
+
+--echo "try starting server with no file specified for temp-tablespace"
+--error 1
+--exec $MYSQLD_CMD $notemptablespacefile
+let SEARCH_PATTERN = init function returned error;
+--source ./include/search_pattern_in_file.inc
+--remove_file $SEARCH_FILE
+
+--source include/start_mysqld.inc
+
+show tables;
+create temporary table t1 (
+ keyc int, c1 char(100), c2 char(100)
+ ) engine = innodb;
+drop table t1;
diff --git a/mysql-test/suite/innodb_zip/t/wl6915_1.test b/mysql-test/suite/innodb_zip/t/wl6915_1.test
new file mode 100644
index 00000000000..625c8a36db2
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/wl6915_1.test
@@ -0,0 +1,650 @@
+--source include/have_innodb.inc
+--source include/have_innodb_zip.inc
+--source include/have_no_undo_tablespaces.inc
+--source include/big_test.inc
+
+# Embedded server does not support restarting
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+####################################################################
+# TC to test temp-table undolog changes correctness #
+# Sceanrio covered in single testcase : #
+# - Tables with row format(redundant,compressed,dynamic,compact #
+# - Table with primary,composite,prefix,secondary INDEX #
+# - Insert/delete/update with transactioons #
+# - Transaction with COMMIT,rollback,savepoint statements #
+# - Transaction having temporary table and normal table #
+# - Concurrency by execution of two clients creating tables with #
+# same names #
+# - Inserting data using #
+# - Insert into .. , Load data infile..,insert ignore #
+# - Insert into .. on duplicate update #
+# - Check basic delete and upadte [ignore] #
+# - Check constraints like duplicate key,default value #
+# - Alter ADD COLUMN , ADD PRIMARY KEY #
+# - Flush Tables, logs command #
+# - Vary innodb_undo_tablespaces=0,innodb_undo_logs #
+# innodb_log_files_in_group #
+# - Verify rseg message from server log #
+####################################################################
+
+# run for page size >= 8k
+--disable_warnings
+if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`)
+{
+ --skip Test requires InnoDB with page size >= 8k.
+}
+--enable_warnings
+
+call mtr.ADD_suppression(".*Resizing redo log.*");
+call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*");
+call mtr.ADD_suppression(".*New log files created.*");
+# Save initial VALUES of server variable
+--disable_query_log
+let $innodb_file_per_table_orig=`SELECT @@innodb_file_per_table`;
+--enable_query_log
+
+SELECT @@global.innodb_undo_tablespaces;
+
+# Create procedure to perform
+# 1. Create temp table with row types , INDEX , sufficent data types
+# 2. Perform DML with transaction
+delimiter |;
+CREATE PROCEDURE populate_tables(IN id VARCHAR(10))
+ begin
+ declare n int default 20;
+ set global innodb_file_per_table=on;
+ DROP TABLE IF EXISTS t1,t2,t3,t4;
+
+ CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 char(255) NOT NULL,
+ c4 text(600) NOT NULL,
+ c5 blob(600) NOT NULL,
+ c6 varchar(600) NOT NULL,
+ c7 varchar(600) NOT NULL,
+ c8 datetime,
+ c9 decimal(6,3),
+ PRIMARY KEY (c1),
+ INDEX (c3,c4(50),c5(50)),
+ INDEX (c2))
+ ENGINE=InnoDB ROW_FORMAT=redundant;
+
+ set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;");
+ PREPARE createTable FROM @s;
+ EXECUTE createTable;
+ DEALLOCATE PREPARE createTable;
+
+
+ CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 char(255) NOT NULL,
+ c4 text(600) NOT NULL,
+ c5 blob(600) NOT NULL,
+ c6 varchar(600) NOT NULL,
+ c7 varchar(600) NOT NULL,
+ c8 datetime,
+ c9 decimal(6,3),
+ PRIMARY KEY (c1),
+ INDEX (c3,c4(50),c5(50)),
+ INDEX (c2))
+ ENGINE=InnoDB ROW_FORMAT=compact;
+
+ set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;");
+ PREPARE createTable FROM @s;
+ EXECUTE createTable;
+ DEALLOCATE PREPARE createTable;
+
+ CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 char(255) NOT NULL,
+ c4 text(600) NOT NULL,
+ c5 blob(600) NOT NULL,
+ c6 varchar(600) NOT NULL,
+ c7 varchar(600) NOT NULL,
+ c8 datetime,
+ c9 decimal(6,3),
+ PRIMARY KEY (c1),
+ INDEX (c3,c4(50),c5(50)),
+ INDEX (c2))
+ ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;
+
+ set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;");
+ PREPARE createTable FROM @s;
+ EXECUTE createTable;
+ DEALLOCATE PREPARE createTable;
+
+ CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL,
+ c2 int NOT NULL,
+ c3 char(255) NOT NULL,
+ c4 text(600) NOT NULL,
+ c5 blob(600) NOT NULL,
+ c6 varchar(600) NOT NULL,
+ c7 varchar(600) NOT NULL,
+ c8 datetime,
+ c9 decimal(6,3),
+ PRIMARY KEY (c1),
+ INDEX (c3,c4(50),c5(50)),
+ INDEX (c2))
+ ENGINE=InnoDB ROW_FORMAT=dynamic;
+
+ set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;");
+ PREPARE createTable FROM @s;
+ EXECUTE createTable;
+ DEALLOCATE PREPARE createTable;
+
+ while (n > 0) do
+ START TRANSACTION;
+ set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+ REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+ REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+ NOW(),(100.55+n));
+
+ set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+
+ INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+ REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+ REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+ NOW(),(100.55+n));
+
+ savepoint a;
+
+ set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+
+ INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+ REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+ REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+ NOW(),(100.55+n));
+
+ savepoint b;
+
+ set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+
+ INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
+ REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
+ REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
+ NOW(),(100.55+n));
+
+
+ if (n > 10) then
+ if (n > 10 and n <=12) then
+ ROLLBACK TO SAVEPOINT a;
+ COMMIT;
+ end if;
+ if (n > 12 and n < 15) then
+ ROLLBACK TO SAVEPOINT b;
+ COMMIT;
+ end if;
+ if (n > 15) then
+ COMMIT;
+ end if;
+
+ else
+ if (n > 5) then
+ START TRANSACTION;
+ DELETE FROM t1_temp WHERE c1 > 10 ;
+ DELETE FROM t2_temp WHERE c1 > 10 ;
+ DELETE FROM t3_temp WHERE c1 > 10 ;
+ DELETE FROM t4_temp WHERE c1 > 10 ;
+
+ rollback;
+ START TRANSACTION;
+ update t1_temp set c1 = c1 + 1000 WHERE c1 > 10;
+ update t2_temp set c1 = c1 + 1000 WHERE c1 > 10;
+ update t3_temp set c1 = c1 + 1000 WHERE c1 > 10;
+ update t4_temp set c1 = c1 + 1000 WHERE c1 > 10;
+ rollback;
+ end if;
+ end if;
+
+ if (n < 5) then
+ rollback;
+ end if;
+
+ FLUSH logs;
+ ALTER TABLE t1_temp DROP PRIMARY KEY;
+ ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ ALTER TABLE t2_temp DROP PRIMARY KEY;
+ ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ ALTER TABLE t3_temp DROP PRIMARY KEY;
+ ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ ALTER TABLE t4_temp DROP PRIMARY KEY;
+ ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
+ FLUSH tables;
+
+ START TRANSACTION;
+ set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+
+
+ DELETE FROM t1_temp WHERE c1 between 100 and 110;
+ DELETE FROM t2_temp WHERE c1 between 100 and 110;
+ DELETE FROM t3_temp WHERE c1 between 100 and 110;
+ DELETE FROM t4_temp WHERE c1 between 100 and 110;
+
+ update t1_temp set c1 = c1+1 WHERE c1>110;
+ update t2_temp set c1 = c1+1 WHERE c1>110;
+ update t3_temp set c1 = c1+1 WHERE c1>110;
+ update t4_temp set c1 = c1+1 WHERE c1>110;
+
+ savepoint a;
+
+ set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ savepoint b;
+
+ set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
+ PREPARE insertIntoTable FROM @s;
+ EXECUTE insertIntoTable;
+ DEALLOCATE PREPARE insertIntoTable;
+ INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
+ REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
+ REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
+ NOW(),(100.55+n+100));
+ savepoint c;
+ rollback to b;
+ rollback to a;
+ COMMIT;
+ COMMIT;
+ rollback;
+ set n = n - 1;
+ end while;
+end|
+delimiter ;|
+
+# Create two client for concurrent execution
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+--echo #---client 1 : dml operation ---"
+connection con1;
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+
+-- enable_query_log
+-- disable_query_log
+# call procedure
+--send call populate_tables('_1');
+-- enable_query_log
+
+--echo #---client 2 : dml operation ---"
+connection con2;
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+-- enable_query_log
+-- disable_query_log
+# call procedure
+--send call populate_tables('_2');
+
+-- enable_query_log
+
+# check data of client connection 1
+--echo # In connection 1
+connection con1;
+--reap
+# 20 rows exepceted in 5 tables
+SELECT count(*) FROM t1_1;
+SELECT count(*) FROM t2_1;
+SELECT count(*) FROM t3_1;
+SELECT count(*) FROM t4_1;
+SELECT c1 FROM t1_1;
+SELECT c1 FROM t2_1;
+SELECT c1 FROM t3_1;
+SELECT c1 FROM t4_1;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+# check data of client connection 2
+--echo # In connection 2
+connection con2;
+--reap
+# 20 rows exepceted in 5 tables
+SELECT count(*) FROM t1_2;
+SELECT count(*) FROM t2_2;
+SELECT count(*) FROM t3_2;
+SELECT count(*) FROM t4_2;
+SELECT c1 FROM t1_2;
+SELECT c1 FROM t2_2;
+SELECT c1 FROM t3_2;
+SELECT c1 FROM t4_2;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+
+--echo # In connection 1
+connection con1;
+
+set AUTOCOMMIT = 0;
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t2_temp DROP PRIMARY KEY;
+ALTER TABLE t2_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t3_temp DROP PRIMARY KEY;
+ALTER TABLE t3_temp ADD PRIMARY KEY (c1);
+ALTER TABLE t4_temp DROP PRIMARY KEY;
+ALTER TABLE t4_temp ADD PRIMARY KEY (c1);
+# Check duplicate key constraint + insert ignore
+--error ER_DUP_ENTRY
+INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+
+# check rollback due to duplicate value in second record of insert
+--error ER_DUP_ENTRY
+INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+--error ER_DUP_ENTRY
+INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
+(20,1,'a','a','a','a','a',NOW(),100.55);
+
+set AUTOCOMMIT = 1;
+
+SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1);
+SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1);
+SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1);
+SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1);
+
+#replace statement
+REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
+# verify row is replaced FROM (20,20) to (20,1)
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
+
+# Update ignore. statement is gonored as 20 value exits
+update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
+update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
+update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
+update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
+# see record 140 is present as last update ignored
+SELECT count(*) FROM t1_temp WHERE c1 = 140;
+SELECT count(*) FROM t2_temp WHERE c1 = 140;
+SELECT count(*) FROM t3_temp WHERE c1 = 140;
+SELECT count(*) FROM t4_temp WHERE c1 = 140;
+
+# Alter table to ADD COLUMN and PRIMARY KEY
+ALTER TABLE t1_temp ADD COLUMN c10 int default 99 ,
+ADD COLUMN c11 varchar(100) default 'test';
+ALTER TABLE t1_temp DROP PRIMARY KEY;
+ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55);
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test';
+# insert on duplicate key update
+INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55)
+ON DUPLICATE KEY UPDATE c1=-2,c2=-2;
+SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
+
+#
+
+#cleanup
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
+
+connection con2;
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+disconnect con2;
+
+
+connection default;
+#
+## trying with VALUES innodb_undo_tablespaces, innodb_undo_logs ,innodb_log_files_in_group
+##
+let $restart_parameters = restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
+--source include/restart_mysqld.inc
+
+# Create two client for concurrent execution
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+#
+#
+connection con1;
+--send call populate_tables('_1');
+connection con2;
+--send call populate_tables('_2');
+--echo "#connection 1 - verify tables"
+connection con1;
+--reap
+SELECT count(*) FROM t1_1;
+SELECT count(*) FROM t2_1;
+SELECT count(*) FROM t3_1;
+SELECT count(*) FROM t4_1;
+SELECT c1 FROM t1_1;
+SELECT c1 FROM t2_1;
+SELECT c1 FROM t3_1;
+SELECT c1 FROM t4_1;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
+--echo "#connection 2 - verify tables"
+connection con2;
+--reap
+SELECT count(*) FROM t1_2;
+SELECT count(*) FROM t2_2;
+SELECT count(*) FROM t3_2;
+SELECT count(*) FROM t4_2;
+SELECT c1 FROM t1_2;
+SELECT c1 FROM t2_2;
+SELECT c1 FROM t3_2;
+SELECT c1 FROM t4_2;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+disconnect con2;
+
+connection default;
+# innodb_undo_logs > non redo rsegment
+let $restart_parameters = restart: --innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
+--source include/restart_mysqld.inc
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con1;
+--send call populate_tables('_1');
+connection con2;
+--send call populate_tables('_2');
+--echo "#connection 1 - verify tables"
+connection con1;
+--reap
+SELECT count(*) FROM t1_1;
+SELECT count(*) FROM t2_1;
+SELECT count(*) FROM t3_1;
+SELECT count(*) FROM t4_1;
+SELECT c1 FROM t1_1;
+SELECT c1 FROM t2_1;
+SELECT c1 FROM t3_1;
+SELECT c1 FROM t4_1;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
+disconnect con1;
+--echo "#connection 2 - verify tables"
+connection con2;
+--reap
+SELECT count(*) FROM t1_2;
+SELECT count(*) FROM t2_2;
+SELECT count(*) FROM t3_2;
+SELECT count(*) FROM t4_2;
+SELECT c1 FROM t1_2;
+SELECT c1 FROM t2_2;
+SELECT c1 FROM t3_2;
+SELECT c1 FROM t4_2;
+SELECT count(*) FROM t1_temp;
+SELECT count(*) FROM t2_temp;
+SELECT count(*) FROM t3_temp;
+SELECT count(*) FROM t4_temp;
+SELECT c1 FROM t1_temp;
+SELECT c1 FROM t2_temp;
+SELECT c1 FROM t3_temp;
+SELECT c1 FROM t4_temp;
+DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
+disconnect con2;
+
+#
+
+connection default;
+DROP PROCEDURE populate_tables;
+
+# check message in log
+let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
+let SEARCH_FILE= $error_log;
+# We get depending on the platform either "./ibdata1" or ".\ibdata1".
+let SEARCH_PATTERN=redo rollback segment.*found.*redo rollback segment.*active
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=non-redo rollback.*active
+--source include/search_pattern_in_file.inc
+
+
+SHOW TABLES;
+
+-- disable_query_log
+eval set global innodb_file_per_table=$innodb_file_per_table_orig;
+-- enable_query_log
+
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index de3091a56e5..c8799474e21 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -13,3 +13,6 @@
rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
+
+
+
diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_parts_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_parts_basic.result
new file mode 100644
index 00000000000..965e2efedf3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_parts_basic.result
@@ -0,0 +1,48 @@
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts)
+1
+1 Expected
+SET @@GLOBAL.innodb_adaptive_hash_index_parts=1;
+ERROR HY000: Variable 'innodb_adaptive_hash_index_parts' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts)
+1
+1 Expected
+SELECT @@GLOBAL.innodb_adaptive_hash_index_parts = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
+@@GLOBAL.innodb_adaptive_hash_index_parts = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+SELECT @@innodb_adaptive_hash_index_parts = @@GLOBAL.innodb_adaptive_hash_index_parts;
+@@innodb_adaptive_hash_index_parts = @@GLOBAL.innodb_adaptive_hash_index_parts
+1
+1 Expected
+SELECT COUNT(@@innodb_adaptive_hash_index_parts);
+COUNT(@@innodb_adaptive_hash_index_parts)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_adaptive_hash_index_parts);
+ERROR HY000: Variable 'innodb_adaptive_hash_index_parts' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_adaptive_hash_index_parts);
+ERROR HY000: Variable 'innodb_adaptive_hash_index_parts' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts)
+1
+1 Expected
+SELECT innodb_adaptive_hash_index_parts = @@SESSION.innodb_adaptive_hash_index_parts;
+ERROR 42S22: Unknown column 'innodb_adaptive_hash_index_parts' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
index 54b1c1e78b4..b3ba28a4411 100644
--- a/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_adaptive_max_sleep_delay_basic.result
@@ -3,6 +3,18 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
150000
150000 Expected
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100;
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=0;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+@@GLOBAL.innodb_adaptive_max_sleep_delay
+0
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100000;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+@@GLOBAL.innodb_adaptive_max_sleep_delay
+100000
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000000;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+@@GLOBAL.innodb_adaptive_max_sleep_delay
+1000000
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000001;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '1000001'
@@ -10,6 +22,13 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
1000000
1000000 Expected
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=4294967295;
+Warnings:
+Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '4294967295'
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+@@GLOBAL.innodb_adaptive_max_sleep_delay
+1000000
+1000000 Expected
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1;
Warnings:
Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1'
@@ -17,6 +36,13 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
@@GLOBAL.innodb_adaptive_max_sleep_delay
0
0 Expected
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_adaptive_max_sleep_delay value: '-1024'
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+@@GLOBAL.innodb_adaptive_max_sleep_delay
+0
+0 Expected
SELECT COUNT(@@GLOBAL.innodb_adaptive_max_sleep_delay);
COUNT(@@GLOBAL.innodb_adaptive_max_sleep_delay)
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_additional_mem_pool_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_additional_mem_pool_size_basic.result
deleted file mode 100644
index fb062d62bc6..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_additional_mem_pool_size_basic.result
+++ /dev/null
@@ -1,53 +0,0 @@
-'#---------------------BS_STVARS_020_01----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
-COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
-1
-1 Expected
-'#---------------------BS_STVARS_020_02----------------------#'
-SET @@GLOBAL.innodb_additional_mem_pool_size=1;
-ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
-COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
-1
-1 Expected
-'#---------------------BS_STVARS_020_03----------------------#'
-SELECT @@GLOBAL.innodb_additional_mem_pool_size = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
-@@GLOBAL.innodb_additional_mem_pool_size = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
-COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
-1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_020_04----------------------#'
-SELECT @@innodb_additional_mem_pool_size = @@GLOBAL.innodb_additional_mem_pool_size;
-@@innodb_additional_mem_pool_size = @@GLOBAL.innodb_additional_mem_pool_size
-1
-1 Expected
-'#---------------------BS_STVARS_020_05----------------------#'
-SELECT COUNT(@@innodb_additional_mem_pool_size);
-COUNT(@@innodb_additional_mem_pool_size)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_additional_mem_pool_size);
-ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_additional_mem_pool_size);
-ERROR HY000: Variable 'innodb_additional_mem_pool_size' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
-COUNT(@@GLOBAL.innodb_additional_mem_pool_size)
-1
-1 Expected
-SELECT innodb_additional_mem_pool_size = @@SESSION.innodb_additional_mem_pool_size;
-ERROR 42S22: Unknown column 'innodb_additional_mem_pool_size' in 'field list'
-Expected error 'Readonly variable'
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
index d2773b7da69..0bc17e10b06 100644
--- 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
@@ -42,6 +42,42 @@ 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;
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1
+SET global innodb_api_bk_commit_interval=100000;
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+100000
+SET global innodb_api_bk_commit_interval=1073741824;
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1073741824
+SET global innodb_api_bk_commit_interval=0;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '0'
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1
+SET global innodb_api_bk_commit_interval=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '-1024'
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1
+SET global innodb_api_bk_commit_interval=1073741825;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '1073741825'
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1073741824
+SET global innodb_api_bk_commit_interval=4294967295;
+Warnings:
+Warning 1292 Truncated incorrect innodb_api_bk_commit_interval value: '4294967295'
+SELECT @@global.innodb_api_bk_commit_interval;
+@@global.innodb_api_bk_commit_interval
+1073741824
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;
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 900f0167261..6bcca056278 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
@@ -53,6 +53,12 @@ Warning 1292 Truncated incorrect innodb_autoextend_increment value: '1001'
SELECT @@global.innodb_autoextend_increment;
@@global.innodb_autoextend_increment
1000
+SET @@global.innodb_autoextend_increment = 2000 ;
+Warnings:
+Warning 1292 Truncated incorrect innodb_autoextend_increment value: '2000'
+SELECT @@global.innodb_autoextend_increment;
+@@global.innodb_autoextend_increment
+1000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_autoextend_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_chunk_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_chunk_size_basic.result
new file mode 100644
index 00000000000..e9fd5519066
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_chunk_size_basic.result
@@ -0,0 +1,48 @@
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size)
+1
+1 Expected
+SET @@GLOBAL.innodb_buffer_pool_chunk_size=1;
+ERROR HY000: Variable 'innodb_buffer_pool_chunk_size' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size)
+1
+1 Expected
+SELECT @@GLOBAL.innodb_buffer_pool_chunk_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_buffer_pool_chunk_size';
+@@GLOBAL.innodb_buffer_pool_chunk_size = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_buffer_pool_chunk_size';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+SELECT @@innodb_buffer_pool_chunk_size = @@GLOBAL.innodb_buffer_pool_chunk_size;
+@@innodb_buffer_pool_chunk_size = @@GLOBAL.innodb_buffer_pool_chunk_size
+1
+1 Expected
+SELECT COUNT(@@innodb_buffer_pool_chunk_size);
+COUNT(@@innodb_buffer_pool_chunk_size)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_buffer_pool_chunk_size);
+ERROR HY000: Variable 'innodb_buffer_pool_chunk_size' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_buffer_pool_chunk_size);
+ERROR HY000: Variable 'innodb_buffer_pool_chunk_size' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size)
+1
+1 Expected
+SELECT innodb_buffer_pool_chunk_size = @@SESSION.innodb_buffer_pool_chunk_size;
+ERROR 42S22: Unknown column 'innodb_buffer_pool_chunk_size' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
index 26bb44b4587..ad329cd336f 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_at_shutdown_basic.result
@@ -1,7 +1,7 @@
SET @orig = @@global.innodb_buffer_pool_dump_at_shutdown;
SELECT @orig;
@orig
-0
+1
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = OFF;
SELECT @@global.innodb_buffer_pool_dump_at_shutdown;
@@global.innodb_buffer_pool_dump_at_shutdown
@@ -16,3 +16,4 @@ SET GLOBAL innodb_buffer_pool_dump_at_shutdown = "string";
Got one of the listed errors
SET GLOBAL innodb_buffer_pool_dump_at_shutdown = 5;
Got one of the listed errors
+SET GLOBAL innodb_buffer_pool_dump_at_shutdown = default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result
index 51c72cfe791..b2cc55ce71e 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_dump_pct_basic.result
@@ -1,20 +1,35 @@
-SET @orig = @@global.innodb_buffer_pool_dump_pct;
-SELECT @orig;
-@orig
-100
-SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON;
-SET GLOBAL innodb_buffer_pool_dump_pct=0;
+SELECT @@global.innodb_buffer_pool_dump_pct;
+@@global.innodb_buffer_pool_dump_pct
+25
+SET GLOBAL innodb_buffer_pool_dump_pct=20;
+SELECT @@global.innodb_buffer_pool_dump_pct;
+@@global.innodb_buffer_pool_dump_pct
+20
+SET GLOBAL innodb_buffer_pool_dump_pct=1;
SELECT @@global.innodb_buffer_pool_dump_pct;
@@global.innodb_buffer_pool_dump_pct
1
-SHOW WARNINGS;
-Level Code Message
-Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '0'
-SET GLOBAL innodb_buffer_pool_dump_pct=101;
+SET GLOBAL innodb_buffer_pool_dump_pct=100;
SELECT @@global.innodb_buffer_pool_dump_pct;
@@global.innodb_buffer_pool_dump_pct
100
-SHOW WARNINGS;
-Level Code Message
+SET GLOBAL innodb_buffer_pool_dump_pct=101;
+Warnings:
Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '101'
-SET GLOBAL innodb_buffer_pool_dump_pct=@orig;
+SELECT @@global.innodb_buffer_pool_dump_pct;
+@@global.innodb_buffer_pool_dump_pct
+100
+SET GLOBAL innodb_buffer_pool_dump_pct=-1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_buffer_pool_dump_pct value: '-1'
+SELECT @@global.innodb_buffer_pool_dump_pct;
+@@global.innodb_buffer_pool_dump_pct
+1
+SET GLOBAL innodb_buffer_pool_dump_pct=Default;
+SELECT @@global.innodb_buffer_pool_dump_pct;
+@@global.innodb_buffer_pool_dump_pct
+25
+SET GLOBAL innodb_buffer_pool_dump_pct='foo';
+ERROR 42000: Incorrect argument type to variable 'innodb_buffer_pool_dump_pct'
+SET innodb_buffer_pool_dump_pct=50;
+ERROR HY000: Variable 'innodb_buffer_pool_dump_pct' is a GLOBAL variable and should be set with SET GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result
deleted file mode 100644
index 5e50a715307..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_filename_basic.result
+++ /dev/null
@@ -1,7 +0,0 @@
-SET @orig = @@global.innodb_buffer_pool_filename;
-SELECT @orig;
-@orig
-ib_buffer_pool
-SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';
-SET GLOBAL innodb_buffer_pool_dump_now = ON;
-SET GLOBAL innodb_buffer_pool_filename = @orig;
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result
index 1dad72baefd..cd4c924b425 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_load_at_startup_basic.result
@@ -1,7 +1,7 @@
SET @orig = @@global.innodb_buffer_pool_load_at_startup;
SELECT @orig;
@orig
-0
+1
SET GLOBAL innodb_buffer_pool_load_at_startup = OFF;
ERROR HY000: Variable 'innodb_buffer_pool_load_at_startup' is a read only variable
SET GLOBAL innodb_buffer_pool_load_at_startup = ON;
diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
index 27e6cae41ef..e6210165436 100644
--- a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result
@@ -1,12 +1,12 @@
+SET @start_buffer_pool_size = @@GLOBAL.innodb_buffer_pool_size;
'#---------------------BS_STVARS_022_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
1 Expected
'#---------------------BS_STVARS_022_02----------------------#'
-SET @@GLOBAL.innodb_buffer_pool_size=1;
-ERROR HY000: Variable 'innodb_buffer_pool_size' is a read only variable
-Expected error 'Read only variable'
+SET @@GLOBAL.innodb_buffer_pool_size=10485760;
+Expected succeeded
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
COUNT(@@GLOBAL.innodb_buffer_pool_size)
1
@@ -51,3 +51,4 @@ COUNT(@@GLOBAL.innodb_buffer_pool_size)
SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size;
ERROR 42S22: Unknown column 'innodb_buffer_pool_size' in 'field list'
Expected error 'Readonly variable'
+SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size;
diff --git a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
index 8e05db129dc..9c2e95b3c7c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result
@@ -1,47 +1,47 @@
SET @orig = @@global.innodb_checksum_algorithm;
SELECT @orig;
@orig
-INNODB
+crc32
SET GLOBAL innodb_checksum_algorithm = 'crc32';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-CRC32
+crc32
SET GLOBAL innodb_checksum_algorithm = 'strict_crc32';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_CRC32
+strict_crc32
SET GLOBAL innodb_checksum_algorithm = 'innodb';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-INNODB
+innodb
SET GLOBAL innodb_checksum_algorithm = 'strict_innodb';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_INNODB
+strict_innodb
SET GLOBAL innodb_checksum_algorithm = 'none';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-NONE
+none
SET GLOBAL innodb_checksum_algorithm = 'strict_none';
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_NONE
+strict_none
SET GLOBAL innodb_checksum_algorithm = '';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of ''
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_NONE
+strict_none
SET GLOBAL innodb_checksum_algorithm = 'foobar';
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of 'foobar'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_NONE
+strict_none
SET GLOBAL innodb_checksum_algorithm = 123;
ERROR 42000: Variable 'innodb_checksum_algorithm' can't be set to the value of '123'
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-STRICT_NONE
+strict_none
SET GLOBAL innodb_checksum_algorithm = @orig;
SELECT @@global.innodb_checksum_algorithm;
@@global.innodb_checksum_algorithm
-INNODB
+crc32
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
index 3ee9448bdab..31bc11de717 100644
--- 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
@@ -21,7 +21,6 @@ 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);
@@ -61,5 +60,4 @@ 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_commit_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
index 85a4b008ff0..474818829c5 100644
--- a/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_commit_concurrency_basic.result
@@ -28,14 +28,34 @@ SELECT @@global.innodb_commit_concurrency;
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_commit_concurrency = 1;
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
SET @@global.innodb_commit_concurrency = -1;
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '-1'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
SET @@global.innodb_commit_concurrency = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
SET @@global.innodb_commit_concurrency = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
+SET @@global.innodb_commit_concurrency = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_commit_concurrency'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
SET @@global.innodb_commit_concurrency = 1001;
ERROR 42000: Variable 'innodb_commit_concurrency' can't be set to the value of '1001'
+SELECT @@global.innodb_commit_concurrency;
+@@global.innodb_commit_concurrency
+0
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_commit_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
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
index 9f85eccdb7a..ae556ceedb2 100644
--- 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
@@ -45,6 +45,11 @@ ERROR 42000: Incorrect argument type to variable 'innodb_compression_failure_thr
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
0
+SET @@global.innodb_compression_failure_threshold_pct = 1.1;
+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;
@@ -56,6 +61,16 @@ Warning 1292 Truncated incorrect innodb_compression_failure_thres value: '101'
SELECT @@global.innodb_compression_failure_threshold_pct;
@@global.innodb_compression_failure_threshold_pct
100
+SET @@global.innodb_compression_failure_threshold_pct = " ";
+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 = ' ';
+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_05------------------------#'
SELECT @@global.innodb_compression_failure_threshold_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
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
index 628993ef873..6735d877c6b 100644
--- 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
@@ -40,12 +40,27 @@ 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 = 1.1;
+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
+SET @@global.innodb_compression_pad_pct_max = " ";
+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 = ' ';
+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_05------------------------#'
SELECT @@global.innodb_compression_pad_pct_max =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
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 0b790fb3557..dd4488a97b3 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
@@ -38,12 +38,31 @@ SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
4294967295
'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_concurrency_tickets = 4294967296;
+SELECT @@global.innodb_concurrency_tickets IN (4294967296,4294967295);
+@@global.innodb_concurrency_tickets IN (4294967296,4294967295)
+1
+SET @@global.innodb_concurrency_tickets = 12345678901;
+SELECT @@global.innodb_concurrency_tickets IN (12345678901,4294967295);
+@@global.innodb_concurrency_tickets IN (12345678901,4294967295)
+1
+SET @@global.innodb_concurrency_tickets = 18446744073709551615;
+SELECT @@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295);
+@@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295)
+1
+'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_concurrency_tickets = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
1
+SET @@global.innodb_concurrency_tickets = -1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_concurrency_tickets value: '-1024'
+SELECT @@global.innodb_concurrency_tickets;
+@@global.innodb_concurrency_tickets
+1
SET @@global.innodb_concurrency_tickets = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@ -54,11 +73,22 @@ ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
1
-SET @@global.innodb_concurrency_tickets = 1001;
+SET @@global.innodb_concurrency_tickets = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
+1
+SET @@global.innodb_concurrency_tickets = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
+SELECT @@global.innodb_concurrency_tickets;
+@@global.innodb_concurrency_tickets
+1
+SET @@global.innodb_concurrency_tickets = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
+SELECT @@global.innodb_concurrency_tickets;
+@@global.innodb_concurrency_tickets
+1
+'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT @@global.innodb_concurrency_tickets =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
@@ -67,23 +97,23 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1001
+1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
+1
+'#---------------------FN_DYNVARS_046_07-------------------------#'
SET @@global.innodb_concurrency_tickets = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1001
+1
SET @@global.innodb_concurrency_tickets = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_concurrency_tickets'
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
+1
+'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_concurrency_tickets = TRUE;
SELECT @@global.innodb_concurrency_tickets;
@@global.innodb_concurrency_tickets
diff --git a/mysql-test/suite/sys_vars/r/innodb_default_row_format_basic.result b/mysql-test/suite/sys_vars/r/innodb_default_row_format_basic.result
new file mode 100644
index 00000000000..9710c3ef364
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_default_row_format_basic.result
@@ -0,0 +1,48 @@
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format = 'redundant';
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+redundant
+SET GLOBAL innodb_default_row_format = 'dynamic';
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format = 'compact';
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+compact
+SET GLOBAL innodb_default_row_format = 'compressed';
+ERROR 42000: Variable 'innodb_default_row_format' can't be set to the value of 'compressed'
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+compact
+SET GLOBAL innodb_default_row_format = 'foobar';
+ERROR 42000: Variable 'innodb_default_row_format' can't be set to the value of 'foobar'
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+compact
+SET GLOBAL innodb_default_row_format = 0;
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+redundant
+SET GLOBAL innodb_default_row_format = 1;
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+compact
+SET GLOBAL innodb_default_row_format = 2;
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format = 3;
+ERROR 42000: Variable 'innodb_default_row_format' can't be set to the value of '3'
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format = 123;
+ERROR 42000: Variable 'innodb_default_row_format' can't be set to the value of '123'
+SELECT @@global.innodb_default_row_format;
+@@global.innodb_default_row_format
+dynamic
+SET GLOBAL innodb_default_row_format = default;
diff --git a/mysql-test/suite/sys_vars/r/innodb_disable_resize_buffer_pool_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_disable_resize_buffer_pool_debug_basic.result
new file mode 100644
index 00000000000..bbac9a4cde6
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_disable_resize_buffer_pool_debug_basic.result
@@ -0,0 +1,60 @@
+#
+# Basic test for innodb_disable_resize_buffer_pool_debug
+#
+SET @start_global_value = @@global.innodb_disable_resize_buffer_pool_debug;
+SET @@global.innodb_disable_resize_buffer_pool_debug = 0;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+@@global.innodb_disable_resize_buffer_pool_debug
+0
+SET @@global.innodb_disable_resize_buffer_pool_debug ='On' ;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+@@global.innodb_disable_resize_buffer_pool_debug
+1
+SET @@global.innodb_disable_resize_buffer_pool_debug ='Off' ;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+@@global.innodb_disable_resize_buffer_pool_debug
+0
+SET @@global.innodb_disable_resize_buffer_pool_debug = 1;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+@@global.innodb_disable_resize_buffer_pool_debug
+1
+SELECT IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
+IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
+COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+SELECT @@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug;
+@@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug
+1
+1 Expected
+SELECT COUNT(@@innodb_disable_resize_buffer_pool_debug);
+COUNT(@@innodb_disable_resize_buffer_pool_debug)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_disable_resize_buffer_pool_debug);
+ERROR HY000: Variable 'innodb_disable_resize_buffer_pool_debug' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_disable_resize_buffer_pool_debug);
+ERROR HY000: Variable 'innodb_disable_resize_buffer_pool_debug' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
+COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug)
+1
+1 Expected
+SELECT innodb_disable_resize_buffer_pool_debug = @@SESSION.innodb_disable_resize_buffer_pool_debug;
+ERROR 42S22: Unknown column 'innodb_disable_resize_buffer_pool_debug' in 'field list'
+SET @@global.innodb_disable_resize_buffer_pool_debug = @start_global_value;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+@@global.innodb_disable_resize_buffer_pool_debug
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result b/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
index fe09a652700..38d5365b3f3 100644
--- a/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_fast_shutdown_basic.result
@@ -85,6 +85,21 @@ ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
SELECT @@global.innodb_fast_shutdown;
@@global.innodb_fast_shutdown
0
+SET @@global.innodb_fast_shutdown = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
+SELECT @@global.innodb_fast_shutdown;
+@@global.innodb_fast_shutdown
+0
+SET @@global.innodb_fast_shutdown = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
+SELECT @@global.innodb_fast_shutdown;
+@@global.innodb_fast_shutdown
+0
+SET @@global.innodb_fast_shutdown = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_fast_shutdown'
+SELECT @@global.innodb_fast_shutdown;
+@@global.innodb_fast_shutdown
+0
'#-------------------FN_DYNVARS_042_05----------------------------#'
SET @@session.innodb_fast_shutdown = 0;
ERROR HY000: Variable 'innodb_fast_shutdown' is a GLOBAL variable and should be set with SET GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_basic.result
index 58e009ea705..c330bbf5c16 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_format_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_format_basic.result
@@ -1,29 +1,31 @@
SET @start_global_value = @@global.innodb_file_format;
SELECT @start_global_value;
@start_global_value
-Antelope
+Barracuda
Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
@@global.innodb_file_format in ('Antelope', 'Barracuda')
1
select @@global.innodb_file_format;
@@global.innodb_file_format
-Antelope
+Barracuda
select @@session.innodb_file_format;
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
show global variables like 'innodb_file_format';
Variable_name Value
-innodb_file_format Antelope
+innodb_file_format Barracuda
show session variables like 'innodb_file_format';
Variable_name Value
-innodb_file_format Antelope
+innodb_file_format Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FILE_FORMAT Antelope
+INNODB_FILE_FORMAT Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FILE_FORMAT Antelope
+INNODB_FILE_FORMAT Barracuda
set global innodb_file_format='Antelope';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
@@ -34,6 +36,8 @@ select * from information_schema.session_variables where variable_name='innodb_f
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
set @@global.innodb_file_format='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_file_format;
@@global.innodb_file_format
Barracuda
@@ -54,6 +58,8 @@ ERROR 42000: Incorrect argument type to variable 'innodb_file_format'
set global innodb_file_format='Salmon';
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format = @start_global_value;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format;
@@global.innodb_file_format
-Antelope
+Barracuda
diff --git a/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
index 32b2262c091..5402e16a424 100644
--- a/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_file_format_max_basic.result
@@ -1,31 +1,33 @@
SET @start_global_value = @@global.innodb_file_format_max;
SELECT @start_global_value;
@start_global_value
-Antelope
+Barracuda
Valid values are 'Antelope' and 'Barracuda'
SELECT @@global.innodb_file_format_max in ('Antelope', 'Barracuda');
@@global.innodb_file_format_max in ('Antelope', 'Barracuda')
1
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
-Antelope
+Barracuda
SELECT @@session.innodb_file_format_max;
ERROR HY000: Variable 'innodb_file_format_max' is a GLOBAL variable
SHOW global variables LIKE 'innodb_file_format_max';
Variable_name Value
-innodb_file_format_max Antelope
+innodb_file_format_max Barracuda
SHOW session variables LIKE 'innodb_file_format_max';
Variable_name Value
-innodb_file_format_max Antelope
+innodb_file_format_max Barracuda
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FILE_FORMAT_MAX Antelope
+INNODB_FILE_FORMAT_MAX Barracuda
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_FILE_FORMAT_MAX Antelope
+INNODB_FILE_FORMAT_MAX Barracuda
SET global innodb_file_format_max='Antelope';
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Antelope
@@ -38,6 +40,8 @@ WHERE variable_name='innodb_file_format_max';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT_MAX Antelope
SET @@global.innodb_file_format_max='Barracuda';
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
Barracuda
@@ -60,6 +64,8 @@ ERROR 42000: Incorrect argument type to variable 'innodb_file_format_max'
SET global innodb_file_format_max='Salmon';
ERROR 42000: Variable 'innodb_file_format_max' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format_max = @start_global_value;
+Warnings:
+Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_file_format_max;
@@global.innodb_file_format_max
-Antelope
+Barracuda
diff --git a/mysql-test/suite/sys_vars/r/innodb_fill_factor_basic.result b/mysql-test/suite/sys_vars/r/innodb_fill_factor_basic.result
new file mode 100644
index 00000000000..7a4cef2906f
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_fill_factor_basic.result
@@ -0,0 +1,42 @@
+select @@global.innodb_fill_factor;
+@@global.innodb_fill_factor
+100
+select @@session.innodb_fill_factor;
+ERROR HY000: Variable 'innodb_fill_factor' is a GLOBAL variable
+show global variables like 'innodb_fill_factor';
+Variable_name Value
+innodb_fill_factor 100
+show session variables like 'innodb_fill_factor';
+Variable_name Value
+innodb_fill_factor 100
+select * from information_schema.global_variables where variable_name='innodb_fill_factor';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FILL_FACTOR 100
+select * from information_schema.session_variables where variable_name='innodb_fill_factor';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FILL_FACTOR 100
+set global innodb_fill_factor=9;
+Warnings:
+Warning 1292 Truncated incorrect innodb_fill_factor value: '9'
+select @@innodb_fill_factor;
+@@innodb_fill_factor
+10
+set global innodb_fill_factor=10;
+select @@innodb_fill_factor;
+@@innodb_fill_factor
+10
+set global innodb_fill_factor=75;
+select @@innodb_fill_factor;
+@@innodb_fill_factor
+75
+set global innodb_fill_factor=100;
+select @@innodb_fill_factor;
+@@innodb_fill_factor
+100
+set global innodb_fill_factor=101;
+Warnings:
+Warning 1292 Truncated incorrect innodb_fill_factor value: '101'
+select @@innodb_fill_factor;
+@@innodb_fill_factor
+100
+set global innodb_fill_factor=100;
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
index 60a4081849f..79455e22b53 100644
--- 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
@@ -56,6 +56,21 @@ 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
+SET @@global.innodb_flush_log_at_timeout = ' ';
+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 = " ";
+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 = 1.1;
+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_05------------------------#'
SELECT @@global.innodb_flush_log_at_timeout =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
index 268d40c1be3..0d990d746a9 100644
--- a/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_log_at_trx_commit_basic.result
@@ -9,6 +9,11 @@ SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
1
'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_flush_log_at_trx_commit = 1;
+ERROR HY000: Variable 'innodb_flush_log_at_trx_commit' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_flush_log_at_trx_commit;
+@@innodb_flush_log_at_trx_commit
+1
SELECT local.innodb_flush_log_at_trx_commit;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_flush_log_at_trx_commit = 0;
@@ -51,6 +56,27 @@ Warning 1292 Truncated incorrect innodb_flush_log_at_trx_commit value: '1001'
SELECT @@global.innodb_flush_log_at_trx_commit;
@@global.innodb_flush_log_at_trx_commit
3
+SET @@global.innodb_flush_log_at_trx_commit = 100156787;
+Warnings:
+Warning 1292 Truncated incorrect innodb_flush_log_at_trx_commit value: '100156787'
+SELECT @@global.innodb_flush_log_at_trx_commit;
+@@global.innodb_flush_log_at_trx_commit
+3
+SET @@global.innodb_flush_log_at_trx_commit = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
+SELECT @@global.innodb_flush_log_at_trx_commit;
+@@global.innodb_flush_log_at_trx_commit
+3
+SET @@global.innodb_flush_log_at_trx_commit = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
+SELECT @@global.innodb_flush_log_at_trx_commit;
+@@global.innodb_flush_log_at_trx_commit
+3
+SET @@global.innodb_flush_log_at_trx_commit = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_log_at_trx_commit'
+SELECT @@global.innodb_flush_log_at_trx_commit;
+@@global.innodb_flush_log_at_trx_commit
+3
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_flush_log_at_trx_commit =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result b/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
new file mode 100644
index 00000000000..9e3f7d95eb9
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_flush_sync_basic.result
@@ -0,0 +1,92 @@
+SET @start_global_value = @@global.innodb_flush_sync;
+SELECT @start_global_value;
+@start_global_value
+1
+Valid values are 'ON' and 'OFF'
+select @@global.innodb_flush_sync in (0, 1);
+@@global.innodb_flush_sync in (0, 1)
+1
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+1
+select @@session.innodb_flush_sync;
+ERROR HY000: Variable 'innodb_flush_sync' is a GLOBAL variable
+show global variables like 'innodb_flush_sync';
+Variable_name Value
+innodb_flush_sync ON
+show session variables like 'innodb_flush_sync';
+Variable_name Value
+innodb_flush_sync ON
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+set global innodb_flush_sync='OFF';
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+0
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC OFF
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC OFF
+set @@global.innodb_flush_sync=1;
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+1
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+set global innodb_flush_sync=0;
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+0
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC OFF
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC OFF
+set @@global.innodb_flush_sync='ON';
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+1
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+set session innodb_flush_sync='OFF';
+ERROR HY000: Variable 'innodb_flush_sync' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_flush_sync='ON';
+ERROR HY000: Variable 'innodb_flush_sync' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_flush_sync=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_sync'
+set global innodb_flush_sync=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_flush_sync'
+set global innodb_flush_sync=2;
+ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of '2'
+set global innodb_flush_sync=-3;
+ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of '-3'
+select @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+1
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_FLUSH_SYNC ON
+set global innodb_flush_sync='AUTO';
+ERROR 42000: Variable 'innodb_flush_sync' can't be set to the value of 'AUTO'
+SET @@global.innodb_flush_sync = @start_global_value;
+SELECT @@global.innodb_flush_sync;
+@@global.innodb_flush_sync
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result b/mysql-test/suite/sys_vars/r/innodb_flushing_avg_loops_basic.result
index caa41bd64ed..e024581955a 100644
--- 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
@@ -56,6 +56,16 @@ Warning 1292 Truncated incorrect innodb_flushing_avg_loops value: '1001'
SELECT @@global.innodb_flushing_avg_loops;
@@global.innodb_flushing_avg_loops
1000
+SET @@global.innodb_flushing_avg_loops = ' ';
+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 = " ";
+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_05------------------------#'
SELECT @@global.innodb_flushing_avg_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result
index 0aefabd48f7..59f6431a65e 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result
@@ -25,8 +25,14 @@ set global innodb_ft_result_cache_limit=1000000;
select @@innodb_ft_result_cache_limit;
@@innodb_ft_result_cache_limit
1000000
-set global innodb_ft_result_cache_limit=4000000000;
+set global innodb_ft_result_cache_limit=4294967295;
select @@innodb_ft_result_cache_limit;
@@innodb_ft_result_cache_limit
-4000000000
+4294967295
+set global innodb_ft_result_cache_limit=4*1024*1024*1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_ft_result_cache_limit value: '4294967296'
+select @@innodb_ft_result_cache_limit;
+@@innodb_ft_result_cache_limit
+4294967295
set global innodb_ft_result_cache_limit=2000000000;
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result
index 044e8f80951..1851c078e5c 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_server_stopword_table_basic.result
@@ -16,6 +16,7 @@ INNODB_FT_SERVER_STOPWORD_TABLE
select * from information_schema.session_variables where variable_name='innodb_ft_server_stopword_table';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_SERVER_STOPWORD_TABLE
+call mtr.add_suppression("\\[ERROR\\] InnoDB: user stopword table Salmon does not exist.");
set session innodb_ft_server_stopword_table='Salmon';
ERROR HY000: Variable 'innodb_ft_server_stopword_table' is a GLOBAL variable and should be set with SET GLOBAL
set @@session.innodb_ft_server_stopword_table='Salmon';
diff --git a/mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result
index 66298481693..ca54f5f7521 100644
--- a/mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_ft_user_stopword_table_basic.result
@@ -17,6 +17,7 @@ INNODB_FT_USER_STOPWORD_TABLE
select * from information_schema.session_variables where variable_name='innodb_ft_user_stopword_table';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FT_USER_STOPWORD_TABLE
+call mtr.add_suppression("\\[ERROR\\] InnoDB: user stopword table Salmon does not exist.");
set session innodb_ft_user_stopword_table='Salmon';
ERROR 42000: Variable 'innodb_ft_user_stopword_table' can't be set to the value of 'Salmon'
set @@session.innodb_ft_user_stopword_table='Salmon';
@@ -27,4 +28,3 @@ set global innodb_ft_user_stopword_table=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_ft_user_stopword_table'
set global innodb_ft_user_stopword_table='Salmon';
ERROR 42000: Variable 'innodb_ft_user_stopword_table' can't be set to the value of 'Salmon'
-SET @@session.innodb_ft_user_stopword_table=@start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
index 3877988bbee..c6e803ffef8 100644
--- a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result
@@ -1,29 +1,31 @@
SET @start_global_value = @@global.innodb_large_prefix;
SELECT @start_global_value;
@start_global_value
-0
+1
Valid values are 'ON' and 'OFF'
select @@global.innodb_large_prefix in (0, 1);
@@global.innodb_large_prefix in (0, 1)
1
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
-0
+1
select @@session.innodb_large_prefix;
ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable
show global variables like 'innodb_large_prefix';
Variable_name Value
-innodb_large_prefix OFF
+innodb_large_prefix ON
show session variables like 'innodb_large_prefix';
Variable_name Value
-innodb_large_prefix OFF
+innodb_large_prefix ON
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_LARGE_PREFIX OFF
+INNODB_LARGE_PREFIX ON
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_LARGE_PREFIX OFF
+INNODB_LARGE_PREFIX ON
set global innodb_large_prefix='OFF';
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
0
@@ -34,6 +36,8 @@ select * from information_schema.session_variables where variable_name='innodb_l
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
set @@global.innodb_large_prefix=1;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
@@ -44,6 +48,8 @@ select * from information_schema.session_variables where variable_name='innodb_l
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX ON
set global innodb_large_prefix=0;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
0
@@ -54,6 +60,8 @@ select * from information_schema.session_variables where variable_name='innodb_l
VARIABLE_NAME VARIABLE_VALUE
INNODB_LARGE_PREFIX OFF
set @@global.innodb_large_prefix='ON';
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
select @@global.innodb_large_prefix;
@@global.innodb_large_prefix
1
@@ -87,6 +95,8 @@ INNODB_LARGE_PREFIX ON
set global innodb_large_prefix='AUTO';
ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of 'AUTO'
SET @@global.innodb_large_prefix = @start_global_value;
+Warnings:
+Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_large_prefix;
@@global.innodb_large_prefix
-0
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
index 1dcc2d554ce..74b1d21d475 100644
--- a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result
@@ -55,6 +55,104 @@ COUNT(@@GLOBAL.innodb_lock_wait_timeout)
1 Expected
SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout;
ERROR 42S22: Unknown column 'innodb_lock_wait_timeout' in 'field list'
+set @@global.innodb_lock_wait_timeout=100;
+set @@global.innodb_lock_wait_timeout=DEFAULT;
+select @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+50
+set @@session.innodb_lock_wait_timeout=100;
+set @@session.innodb_lock_wait_timeout=DEFAULT;
+select @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+50
+SET @@global.innodb_lock_wait_timeout=1;
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1
+SET @@global.innodb_lock_wait_timeout=1024;
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1024
+SET @@global.innodb_lock_wait_timeout=1073741824;
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout=1;
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1
+SET @@session.innodb_lock_wait_timeout=1024;
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1024
+SET @@session.innodb_lock_wait_timeout=1073741824;
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
+SET @@global.innodb_lock_wait_timeout="t";
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@global.innodb_lock_wait_timeout=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '-1024'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1
+SET @@global.innodb_lock_wait_timeout=1073741825;
+Warnings:
+Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073741825'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@global.innodb_lock_wait_timeout=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@global.innodb_lock_wait_timeout=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@global.innodb_lock_wait_timeout=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@global.innodb_lock_wait_timeout;
+@@global.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout="T";
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '-1024'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1
+SET @@session.innodb_lock_wait_timeout=1073999999;
+Warnings:
+Warning 1292 Truncated incorrect innodb_lock_wait_timeout value: '1073999999'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
+SET @@session.innodb_lock_wait_timeout=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_lock_wait_timeout'
+SELECT @@session.innodb_lock_wait_timeout;
+@@session.innodb_lock_wait_timeout
+1073741824
SET @@global.innodb_lock_wait_timeout = @start_global_value;
SELECT @@global.innodb_lock_wait_timeout;
@@global.innodb_lock_wait_timeout
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_checkpoint_now_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_checkpoint_now_basic.result
index d9d067c2cf9..4774c2fe1d7 100644
--- a/mysql-test/suite/sys_vars/r/innodb_log_checkpoint_now_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_log_checkpoint_now_basic.result
@@ -1 +1,80 @@
-XtraDB extension
+SET @start_global_value = @@global.innodb_log_checkpoint_now;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.innodb_log_checkpoint_now in (0, 1);
+@@global.innodb_log_checkpoint_now in (0, 1)
+1
+select @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
+select @@session.innodb_log_checkpoint_now;
+ERROR HY000: Variable 'innodb_log_checkpoint_now' is a GLOBAL variable
+show global variables like 'innodb_log_checkpoint_now';
+Variable_name Value
+innodb_log_checkpoint_now OFF
+show session variables like 'innodb_log_checkpoint_now';
+Variable_name Value
+innodb_log_checkpoint_now OFF
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+set global innodb_log_checkpoint_now=1;
+select @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+set @@global.innodb_log_checkpoint_now=0;
+select @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+set global innodb_log_checkpoint_now=ON;
+select @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+set global innodb_log_checkpoint_now=OFF;
+select @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_CHECKPOINT_NOW OFF
+set session innodb_log_checkpoint_now='some';
+ERROR HY000: Variable 'innodb_log_checkpoint_now' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_log_checkpoint_now='some';
+ERROR HY000: Variable 'innodb_log_checkpoint_now' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_log_checkpoint_now=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_checkpoint_now'
+set global innodb_log_checkpoint_now='foo';
+ERROR 42000: Variable 'innodb_log_checkpoint_now' can't be set to the value of 'foo'
+set global innodb_log_checkpoint_now=-2;
+ERROR 42000: Variable 'innodb_log_checkpoint_now' can't be set to the value of '-2'
+set global innodb_log_checkpoint_now=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_checkpoint_now'
+SET @@global.innodb_log_checkpoint_now = @start_global_value;
+SELECT @@global.innodb_log_checkpoint_now;
+@@global.innodb_log_checkpoint_now
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result
new file mode 100644
index 00000000000..6679ca87249
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_log_checksums_basic.result
@@ -0,0 +1,42 @@
+SET @orig = @@global.innodb_log_checksums;
+SELECT @orig;
+@orig
+1
+SET GLOBAL innodb_log_checksums = 'crc32';
+ERROR 42000: Variable 'innodb_log_checksums' can't be set to the value of 'crc32'
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET GLOBAL innodb_log_checksums = 2;
+ERROR 42000: Variable 'innodb_log_checksums' can't be set to the value of '2'
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET GLOBAL innodb_log_checksums = 1e2;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_checksums'
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET GLOBAL innodb_log_checksums = 1.0;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_checksums'
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET innodb_log_checksums = OFF;
+ERROR HY000: Variable 'innodb_log_checksums' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET GLOBAL innodb_log_checksums = OFF;
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+0
+SET GLOBAL innodb_log_checksums = default;
+SET GLOBAL innodb_log_checksums = ON;
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
+SET GLOBAL innodb_log_checksums = @orig;
+SELECT @@global.innodb_log_checksums;
+@@global.innodb_log_checksums
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result
new file mode 100644
index 00000000000..5c9eb69de50
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_log_write_ahead_size_basic.result
@@ -0,0 +1,88 @@
+SET @start_global_value = @@global.innodb_log_write_ahead_size;
+SET global innodb_log_write_ahead_size=4096;
+Valid values are positive number
+SELECT @@global.innodb_log_write_ahead_size >= 512;
+@@global.innodb_log_write_ahead_size >= 512
+1
+SELECT @@global.innodb_log_write_ahead_size <= 16*1024;
+@@global.innodb_log_write_ahead_size <= 16*1024
+1
+SELECT @@session.innodb_log_write_ahead_size;
+ERROR HY000: Variable 'innodb_log_write_ahead_size' is a GLOBAL variable
+SHOW global variables LIKE 'innodb_log_write_ahead_size';
+Variable_name Value
+innodb_log_write_ahead_size 4096
+SHOW session variables LIKE 'innodb_log_write_ahead_size';
+Variable_name Value
+innodb_log_write_ahead_size 4096
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_WRITE_AHEAD_SIZE 4096
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_WRITE_AHEAD_SIZE 4096
+SET global innodb_log_write_ahead_size=1024;
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+1024
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_WRITE_AHEAD_SIZE 1024
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_WRITE_AHEAD_SIZE 1024
+SET session innodb_log_write_ahead_size=2048;
+ERROR HY000: Variable 'innodb_log_write_ahead_size' is a GLOBAL variable and should be set with SET GLOBAL
+SET global innodb_log_write_ahead_size=512;
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+512
+SET global innodb_log_write_ahead_size=2048;
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+2048
+SET global innodb_log_write_ahead_size=4096;
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+4096
+SET global innodb_log_write_ahead_size=0;
+Warnings:
+Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '0'
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+512
+SET global innodb_log_write_ahead_size=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '-1024'
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+512
+SET global innodb_log_write_ahead_size=3000;
+Warnings:
+Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '3000'
+Warning 1210 innodb_log_write_ahead_size should be set 2^n value and larger than 512.
+Warning 1210 Setting innodb_log_write_ahead_size to 4096
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+4096
+SET global innodb_log_write_ahead_size=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size'
+SET global innodb_log_write_ahead_size=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size'
+SET global innodb_log_write_ahead_size="foo";
+ERROR 42000: Incorrect argument type to variable 'innodb_log_write_ahead_size'
+SET global innodb_log_write_ahead_size=-7;
+Warnings:
+Warning 1292 Truncated incorrect innodb_log_write_ahead_size value: '-7'
+SELECT @@global.innodb_log_write_ahead_size;
+@@global.innodb_log_write_ahead_size
+512
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_LOG_WRITE_AHEAD_SIZE 512
+SET @@global.innodb_log_write_ahead_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
index d705624eb53..13ae9821752 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_basic.result
@@ -2,11 +2,17 @@ SET @global_start_value = @@global.innodb_max_dirty_pages_pct;
SELECT @global_start_value;
@global_start_value
75
+SET @global_start_max_dirty_lwm_value = @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT @global_start_max_dirty_lwm_value;
+@global_start_max_dirty_lwm_value
+0
+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.000000
'#--------------------FN_DYNVARS_046_01------------------------#'
SET @@global.innodb_max_dirty_pages_pct = 0;
-Warnings:
-Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '0'
-SET @@global.innodb_max_dirty_pages_pct = @global_start_value;
+SET @@global.innodb_max_dirty_pages_pct = DEFAULT;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
75.000000
@@ -19,18 +25,14 @@ SELECT @@innodb_max_dirty_pages_pct;
SELECT local.innodb_max_dirty_pages_pct;
ERROR 42S02: Unknown table 'local' in field list
SET global innodb_max_dirty_pages_pct = 0;
-Warnings:
-Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '0'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
'#--------------------FN_DYNVARS_046_03------------------------#'
-SET @@global.innodb_max_dirty_pages_pct = 0;
-Warnings:
-Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '0'
+SET @@global.innodb_max_dirty_pages_pct = 0.0;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
SET @@global.innodb_max_dirty_pages_pct = 1;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
@@ -39,30 +41,94 @@ SET @@global.innodb_max_dirty_pages_pct = 99;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
99.000000
-'#--------------------FN_DYNVARS_046_04-------------------------#'
+'#--------------------FN_DYNVARS_046_04------------------------#'
+SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_value - 1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+74.000000
+SET @@global.innodb_max_dirty_pages_pct = @global_start_value - 2;
+Warnings:
+Warning 1210 innodb_max_dirty_pages_pct cannot be set lower than innodb_max_dirty_pages_pct_lwm.
+Warning 1210 Lowering innodb_max_dirty_page_pct_lwm to 73.000000
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+73.000000
+'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_max_dirty_pages_pct = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '-1'
+Warning 1210 innodb_max_dirty_pages_pct cannot be set lower than innodb_max_dirty_pages_pct_lwm.
+Warning 1210 Lowering innodb_max_dirty_page_pct_lwm to 0.000000
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+0.000000
+SET @@global.innodb_max_dirty_pages_pct = -1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '-1024'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
SET @@global.innodb_max_dirty_pages_pct = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
SET @@global.innodb_max_dirty_pages_pct = "Y";
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
+SET @@global.innodb_max_dirty_pages_pct = 100;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '100'
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
SET @@global.innodb_max_dirty_pages_pct = 1001;
Warnings:
Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '1001'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
99.999000
-'#----------------------FN_DYNVARS_046_05------------------------#'
+SET @@global.innodb_max_dirty_pages_pct = 100000;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '100000'
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
+SET @@global.innodb_max_dirty_pages_pct = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
+SET @@global.innodb_max_dirty_pages_pct = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
+SET @@global.innodb_max_dirty_pages_pct = 1.1;
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+1.100000
+set global innodb_max_dirty_pages_pct = 0.1;
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+0.100000
+set global innodb_max_dirty_pages_pct = 31.34;
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+31.340000
+set global innodb_max_dirty_pages_pct = 100;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '100'
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
+set global innodb_max_dirty_pages_pct = 99.999;
+SELECT @@global.innodb_max_dirty_pages_pct;
+@@global.innodb_max_dirty_pages_pct
+99.999000
+'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT @@global.innodb_max_dirty_pages_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct';
@@ -76,7 +142,7 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct';
VARIABLE_VALUE
99.999000
-'#---------------------FN_DYNVARS_046_06-------------------------#'
+'#---------------------FN_DYNVARS_046_07-------------------------#'
SET @@global.innodb_max_dirty_pages_pct = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@ -87,18 +153,20 @@ ERROR 42000: Incorrect argument type to variable 'innodb_max_dirty_pages_pct'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
99.999000
-'#---------------------FN_DYNVARS_046_07----------------------#'
+'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_max_dirty_pages_pct = TRUE;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
1.000000
SET @@global.innodb_max_dirty_pages_pct = FALSE;
-Warnings:
-Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct value: '0'
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
-0.001000
+0.000000
SET @@global.innodb_max_dirty_pages_pct = @global_start_value;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
75.000000
+SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_max_dirty_lwm_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0.000000
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
index eb0de047df1..8b68f182789 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
@@ -1,19 +1,26 @@
SET @innodb_max_dirty_pages_pct = @@global.innodb_max_dirty_pages_pct;
'#--------------------FN_DYNVARS_044_02-------------------------#'
SET @@global.innodb_max_dirty_pages_pct = 80;
+'connect (con1,localhost,root,,,,)'
connect con1,localhost,root,,,,;
+'connection con1'
connection con1;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
80.000000
SET @@global.innodb_max_dirty_pages_pct = 70;
+'connect (con2,localhost,root,,,,)'
connect con2,localhost,root,,,,;
+'connection con2'
connection con2;
SELECT @@global.innodb_max_dirty_pages_pct;
@@global.innodb_max_dirty_pages_pct
70.000000
+'connection default'
connection default;
+'disconnect con2'
disconnect con2;
+'disconnect con1'
disconnect con1;
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
'#--------------------FN_DYNVARS_044_02-------------------------#'
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
index 676ec103664..b6394d03b46 100644
--- 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
@@ -1,23 +1,23 @@
SET @pct_lwm_start_value = @@global.innodb_max_dirty_pages_pct_lwm;
SELECT @pct_lwm_start_value;
@pct_lwm_start_value
-0.001
+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 = @pct_lwm_start_value;
+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.001000
+0.000000
'#---------------------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.001000
+0.000000
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;
@@ -57,6 +57,18 @@ Warning 1210 Setting innodb_max_dirty_page_pct_lwm to 75.000000
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75.000000
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0.0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+0.000000
+SET @@global.innodb_max_dirty_pages_pct_lwm = 1.1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+1.100000
+SET @@global.innodb_max_dirty_pages_pct_lwm = 51.12;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+@@global.innodb_max_dirty_pages_pct_lwm
+51.120000
SET @@global.innodb_max_dirty_pages_pct_lwm = 100;
Warnings:
Warning 1292 Truncated incorrect innodb_max_dirty_pages_pct_lwm value: '100'
@@ -65,6 +77,16 @@ Warning 1210 Setting innodb_max_dirty_page_pct_lwm to 75.000000
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
@@global.innodb_max_dirty_pages_pct_lwm
75.000000
+SET @@global.innodb_max_dirty_pages_pct_lwm = " ";
+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.000000
+SET @@global.innodb_max_dirty_pages_pct_lwm = ' ';
+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.000000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_max_dirty_pages_pct_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
@@ -106,4 +128,4 @@ 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;
@@global.innodb_max_dirty_pages_pct_lwm
-0.001000
+0.000000
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result
index a01d2f2dd0c..bf526fc1c3d 100644
--- a/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_max_purge_lag_basic.result
@@ -33,13 +33,32 @@ SET @@global.innodb_max_purge_lag = 4294967295;
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
4294967295
-'#--------------------FN_DYNVARS_046_04-------------------------#'
+'#--------------------FN_DYNVARS_046_04------------------------#'
+SET @@global.innodb_max_purge_lag = 4294967296;
+SELECT @@global.innodb_max_purge_lag IN (4294967296,4294967295);
+@@global.innodb_max_purge_lag IN (4294967296,4294967295)
+1
+SET @@global.innodb_max_purge_lag = 12345678901;
+SELECT @@global.innodb_max_purge_lag IN (12345678901,4294967295);
+@@global.innodb_max_purge_lag IN (12345678901,4294967295)
+1
+SET @@global.innodb_max_purge_lag = 18446744073709551615;
+SELECT @@global.innodb_max_purge_lag IN (18446744073709551615,4294967295);
+@@global.innodb_max_purge_lag IN (18446744073709551615,4294967295)
+1
+'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_max_purge_lag = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_max_purge_lag value: '-1'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
0
+SET @@global.innodb_max_purge_lag = -1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_max_purge_lag value: '-1024'
+SELECT @@global.innodb_max_purge_lag;
+@@global.innodb_max_purge_lag
+0
SET @@global.innodb_max_purge_lag = "T";
ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@ -50,11 +69,22 @@ ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
0
-SET @@global.innodb_max_purge_lag = 1001;
+SET @@global.innodb_max_purge_lag = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
+0
+SET @@global.innodb_max_purge_lag = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
+SELECT @@global.innodb_max_purge_lag;
+@@global.innodb_max_purge_lag
+0
+SET @@global.innodb_max_purge_lag = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
+SELECT @@global.innodb_max_purge_lag;
+@@global.innodb_max_purge_lag
+0
+'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT @@global.innodb_max_purge_lag =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
@@ -63,23 +93,23 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-1001
+0
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
+0
+'#---------------------FN_DYNVARS_046_07-------------------------#'
SET @@global.innodb_max_purge_lag = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-1001
+0
SET @@global.innodb_max_purge_lag = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_max_purge_lag'
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
+0
+'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_max_purge_lag = TRUE;
SELECT @@global.innodb_max_purge_lag;
@@global.innodb_max_purge_lag
diff --git a/mysql-test/suite/sys_vars/r/innodb_max_undo_log_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_max_undo_log_size_basic.result
new file mode 100644
index 00000000000..3854060b33b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_max_undo_log_size_basic.result
@@ -0,0 +1,54 @@
+'#---------------------BS_STVARS_035_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
+COUNT(@@GLOBAL.innodb_max_undo_log_size)
+1
+1 Expected
+'#---------------------BS_STVARS_035_02----------------------#'
+SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
+COUNT(@@GLOBAL.innodb_max_undo_log_size)
+1
+1 Expected
+SET @@GLOBAL.innodb_max_undo_log_size=18446744073709551615;
+SELECT @@GLOBAL.innodb_max_undo_log_size;
+@@GLOBAL.innodb_max_undo_log_size
+18446744073709551615
+18446744073709551615 Expected
+SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
+'#---------------------BS_STVARS_035_03----------------------#'
+SELECT @@GLOBAL.innodb_max_undo_log_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_max_undo_log_size';
+@@GLOBAL.innodb_max_undo_log_size = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
+COUNT(@@GLOBAL.innodb_max_undo_log_size)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_max_undo_log_size';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_035_04----------------------#'
+SELECT @@innodb_max_undo_log_size = @@GLOBAL.innodb_max_undo_log_size;
+@@innodb_max_undo_log_size = @@GLOBAL.innodb_max_undo_log_size
+1
+1 Expected
+'#---------------------BS_STVARS_035_05----------------------#'
+SELECT COUNT(@@innodb_max_undo_log_size);
+COUNT(@@innodb_max_undo_log_size)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_max_undo_log_size);
+ERROR HY000: Variable 'innodb_max_undo_log_size' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_max_undo_log_size);
+ERROR HY000: Variable 'innodb_max_undo_log_size' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
+COUNT(@@GLOBAL.innodb_max_undo_log_size)
+1
+1 Expected
diff --git a/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result
new file mode 100644
index 00000000000..6e325d0be38
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_merge_threshold_set_all_debug_basic.result
@@ -0,0 +1,28 @@
+#
+# Basic test for innodb_merge_threshold_set_all_debug
+#
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+@@global.innodb_merge_threshold_set_all_debug
+50
+set global innodb_merge_threshold_set_all_debug = 1;
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+@@global.innodb_merge_threshold_set_all_debug
+1
+set global innodb_merge_threshold_set_all_debug = 51;
+Warnings:
+Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '51'
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+@@global.innodb_merge_threshold_set_all_debug
+50
+set global innodb_merge_threshold_set_all_debug = 0;
+Warnings:
+Warning 1292 Truncated incorrect innodb_merge_threshold_set_all_d value: '0'
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+@@global.innodb_merge_threshold_set_all_debug
+1
+set innodb_merge_threshold_set_all_debug = 50;
+ERROR HY000: Variable 'innodb_merge_threshold_set_all_debug' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_merge_threshold_set_all_debug = 50;
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+@@global.innodb_merge_threshold_set_all_debug
+50
diff --git a/mysql-test/suite/sys_vars/r/innodb_mirrored_log_groups_basic.result b/mysql-test/suite/sys_vars/r/innodb_mirrored_log_groups_basic.result
deleted file mode 100644
index 1645d8163ae..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_mirrored_log_groups_basic.result
+++ /dev/null
@@ -1,53 +0,0 @@
-'#---------------------BS_STVARS_037_01----------------------#'
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
-COUNT(@@GLOBAL.innodb_mirrored_log_groups)
-1
-1 Expected
-'#---------------------BS_STVARS_037_02----------------------#'
-SET @@GLOBAL.innodb_mirrored_log_groups=1;
-ERROR HY000: Variable 'innodb_mirrored_log_groups' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
-COUNT(@@GLOBAL.innodb_mirrored_log_groups)
-1
-1 Expected
-'#---------------------BS_STVARS_037_03----------------------#'
-SELECT @@GLOBAL.innodb_mirrored_log_groups = VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_mirrored_log_groups';
-@@GLOBAL.innodb_mirrored_log_groups = VARIABLE_VALUE
-1
-1 Expected
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
-COUNT(@@GLOBAL.innodb_mirrored_log_groups)
-1
-1 Expected
-SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_mirrored_log_groups';
-COUNT(VARIABLE_VALUE)
-1
-1 Expected
-'#---------------------BS_STVARS_037_04----------------------#'
-SELECT @@innodb_mirrored_log_groups = @@GLOBAL.innodb_mirrored_log_groups;
-@@innodb_mirrored_log_groups = @@GLOBAL.innodb_mirrored_log_groups
-1
-1 Expected
-'#---------------------BS_STVARS_037_05----------------------#'
-SELECT COUNT(@@innodb_mirrored_log_groups);
-COUNT(@@innodb_mirrored_log_groups)
-1
-1 Expected
-SELECT COUNT(@@local.innodb_mirrored_log_groups);
-ERROR HY000: Variable 'innodb_mirrored_log_groups' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@SESSION.innodb_mirrored_log_groups);
-ERROR HY000: Variable 'innodb_mirrored_log_groups' is a GLOBAL variable
-Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
-COUNT(@@GLOBAL.innodb_mirrored_log_groups)
-1
-1 Expected
-SELECT innodb_mirrored_log_groups = @@SESSION.innodb_mirrored_log_groups;
-ERROR 42S22: Unknown column 'innodb_mirrored_log_groups' in 'field list'
-Expected error 'Readonly variable'
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 6c7051dc3d0..3764b00688b 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
@@ -4,7 +4,6 @@ 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
@@ -47,7 +46,6 @@ 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_rescan disabled
buffer_flush_batch_total_pages disabled
buffer_flush_batches disabled
buffer_flush_batch_pages disabled
@@ -55,6 +53,19 @@ buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
+buffer_flush_n_to_flush_by_age disabled
+buffer_flush_adaptive_avg_time_slot disabled
+buffer_LRU_batch_flush_avg_time_slot disabled
+buffer_flush_adaptive_avg_time_thread disabled
+buffer_LRU_batch_flush_avg_time_thread disabled
+buffer_flush_adaptive_avg_time_est disabled
+buffer_LRU_batch_flush_avg_time_est disabled
+buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_pass disabled
+buffer_LRU_batch_flush_avg_pass disabled
+buffer_flush_avg_pass disabled
+buffer_LRU_get_free_loops disabled
+buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -157,12 +168,13 @@ 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_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled
+log_padded disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
compression_pad_increments disabled
@@ -223,10 +235,13 @@ innodb_dblwr_pages_written disabled
innodb_page_size disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
dml_reads disabled
dml_inserts disabled
dml_deletes disabled
@@ -239,6 +254,8 @@ ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
ddl_online_create_index disabled
ddl_pending_alter_table disabled
+ddl_sort_file_alter_table disabled
+ddl_log_file_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
@@ -280,10 +297,13 @@ lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
@@ -408,7 +428,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
@@ -419,7 +438,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
@@ -429,7 +447,6 @@ 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
metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = module_trx;
begin;
insert into monitor_test values(9);
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 6c7051dc3d0..3764b00688b 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
@@ -4,7 +4,6 @@ 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
@@ -47,7 +46,6 @@ 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_rescan disabled
buffer_flush_batch_total_pages disabled
buffer_flush_batches disabled
buffer_flush_batch_pages disabled
@@ -55,6 +53,19 @@ buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
+buffer_flush_n_to_flush_by_age disabled
+buffer_flush_adaptive_avg_time_slot disabled
+buffer_LRU_batch_flush_avg_time_slot disabled
+buffer_flush_adaptive_avg_time_thread disabled
+buffer_LRU_batch_flush_avg_time_thread disabled
+buffer_flush_adaptive_avg_time_est disabled
+buffer_LRU_batch_flush_avg_time_est disabled
+buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_pass disabled
+buffer_LRU_batch_flush_avg_pass disabled
+buffer_flush_avg_pass disabled
+buffer_LRU_get_free_loops disabled
+buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -157,12 +168,13 @@ 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_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled
+log_padded disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
compression_pad_increments disabled
@@ -223,10 +235,13 @@ innodb_dblwr_pages_written disabled
innodb_page_size disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
dml_reads disabled
dml_inserts disabled
dml_deletes disabled
@@ -239,6 +254,8 @@ ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
ddl_online_create_index disabled
ddl_pending_alter_table disabled
+ddl_sort_file_alter_table disabled
+ddl_log_file_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
@@ -280,10 +297,13 @@ lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
@@ -408,7 +428,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
@@ -419,7 +438,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
@@ -429,7 +447,6 @@ 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
metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = module_trx;
begin;
insert into monitor_test values(9);
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 6c7051dc3d0..3764b00688b 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
@@ -4,7 +4,6 @@ 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
@@ -47,7 +46,6 @@ 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_rescan disabled
buffer_flush_batch_total_pages disabled
buffer_flush_batches disabled
buffer_flush_batch_pages disabled
@@ -55,6 +53,19 @@ buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
+buffer_flush_n_to_flush_by_age disabled
+buffer_flush_adaptive_avg_time_slot disabled
+buffer_LRU_batch_flush_avg_time_slot disabled
+buffer_flush_adaptive_avg_time_thread disabled
+buffer_LRU_batch_flush_avg_time_thread disabled
+buffer_flush_adaptive_avg_time_est disabled
+buffer_LRU_batch_flush_avg_time_est disabled
+buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_pass disabled
+buffer_LRU_batch_flush_avg_pass disabled
+buffer_flush_avg_pass disabled
+buffer_LRU_get_free_loops disabled
+buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -157,12 +168,13 @@ 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_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled
+log_padded disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
compression_pad_increments disabled
@@ -223,10 +235,13 @@ innodb_dblwr_pages_written disabled
innodb_page_size disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
dml_reads disabled
dml_inserts disabled
dml_deletes disabled
@@ -239,6 +254,8 @@ ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
ddl_online_create_index disabled
ddl_pending_alter_table disabled
+ddl_sort_file_alter_table disabled
+ddl_log_file_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
@@ -280,10 +297,13 @@ lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
@@ -408,7 +428,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
@@ -419,7 +438,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
@@ -429,7 +447,6 @@ 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
metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = module_trx;
begin;
insert into monitor_test values(9);
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 6c7051dc3d0..3764b00688b 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
@@ -4,7 +4,6 @@ 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
@@ -47,7 +46,6 @@ 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_rescan disabled
buffer_flush_batch_total_pages disabled
buffer_flush_batches disabled
buffer_flush_batch_pages disabled
@@ -55,6 +53,19 @@ buffer_flush_neighbor_total_pages disabled
buffer_flush_neighbor disabled
buffer_flush_neighbor_pages disabled
buffer_flush_n_to_flush_requested disabled
+buffer_flush_n_to_flush_by_age disabled
+buffer_flush_adaptive_avg_time_slot disabled
+buffer_LRU_batch_flush_avg_time_slot disabled
+buffer_flush_adaptive_avg_time_thread disabled
+buffer_LRU_batch_flush_avg_time_thread disabled
+buffer_flush_adaptive_avg_time_est disabled
+buffer_LRU_batch_flush_avg_time_est disabled
+buffer_flush_avg_time disabled
+buffer_flush_adaptive_avg_pass disabled
+buffer_LRU_batch_flush_avg_pass disabled
+buffer_flush_avg_pass disabled
+buffer_LRU_get_free_loops disabled
+buffer_LRU_get_free_waits disabled
buffer_flush_avg_page_rate disabled
buffer_flush_lsn_avg_rate disabled
buffer_flush_pct_for_dirty disabled
@@ -157,12 +168,13 @@ 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_log_flushes disabled
log_pending_checkpoint_writes disabled
log_num_log_io disabled
log_waits disabled
log_write_requests disabled
log_writes disabled
+log_padded disabled
compress_pages_compressed disabled
compress_pages_decompressed disabled
compression_pad_increments disabled
@@ -223,10 +235,13 @@ innodb_dblwr_pages_written disabled
innodb_page_size disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
dml_reads disabled
dml_inserts disabled
dml_deletes disabled
@@ -239,6 +254,8 @@ ddl_background_drop_indexes disabled
ddl_background_drop_tables disabled
ddl_online_create_index disabled
ddl_pending_alter_table disabled
+ddl_sort_file_alter_table disabled
+ddl_log_file_alter_table disabled
icp_attempts disabled
icp_no_match disabled
icp_out_of_range disabled
@@ -280,10 +297,13 @@ lock_row_lock_waits disabled
lock_row_lock_time_avg disabled
innodb_rwlock_s_spin_waits disabled
innodb_rwlock_x_spin_waits disabled
+innodb_rwlock_sx_spin_waits disabled
innodb_rwlock_s_spin_rounds disabled
innodb_rwlock_x_spin_rounds disabled
+innodb_rwlock_sx_spin_rounds disabled
innodb_rwlock_s_os_waits disabled
innodb_rwlock_x_os_waits disabled
+innodb_rwlock_sx_os_waits disabled
set global innodb_monitor_enable = "%lock*";
ERROR 42000: Variable 'innodb_monitor_enable' can't be set to the value of '%lock*'
set global innodb_monitor_enable="%%%%%%%%%%%%%%%%%%%%%%%%%%%";
@@ -408,7 +428,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 2 NULL 2 enabled
metadata_table_handles_closed 1 NULL 1 1 NULL 1 enabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_disable = module_metadata;
set global innodb_monitor_reset = module_metadata;
select name, max_count, min_count, count,
@@ -419,7 +438,6 @@ name max_count min_count count max_count_reset min_count_reset count_reset statu
metadata_table_handles_opened 2 NULL 2 NULL NULL 0 disabled
metadata_table_handles_closed 1 NULL 1 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_reset_all = module_metadata;
select name, max_count, min_count, count,
max_count_reset, min_count_reset, count_reset, status
@@ -429,7 +447,6 @@ 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
metadata_table_handles_closed NULL NULL 0 NULL NULL 0 disabled
metadata_table_reference_count NULL NULL 0 NULL NULL 0 disabled
-metadata_mem_pool_size NULL NULL 0 NULL NULL 0 disabled
set global innodb_monitor_enable = module_trx;
begin;
insert into monitor_test values(9);
diff --git a/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result b/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result
new file mode 100644
index 00000000000..6f6fb359b3d
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_numa_interleave_basic.result
@@ -0,0 +1,10 @@
+SELECT @@GLOBAL.innodb_numa_interleave;
+@@GLOBAL.innodb_numa_interleave
+1
+SET @@GLOBAL.innodb_numa_interleave=off;
+ERROR HY000: Variable 'innodb_numa_interleave' is a read only variable
+SELECT @@GLOBAL.innodb_use_native_aio;
+@@GLOBAL.innodb_use_native_aio
+0
+SELECT @@SESSION.innodb_use_native_aio;
+ERROR HY000: Variable 'innodb_use_native_aio' is a GLOBAL variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result b/mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result
index bbcc2dabb22..6309ffc8cb0 100644
--- a/mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_old_blocks_pct_basic.result
@@ -35,12 +35,20 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_OLD_BLOCKS_PCT 10
set session innodb_old_blocks_pct=1;
ERROR HY000: Variable 'innodb_old_blocks_pct' is a GLOBAL variable and should be set with SET GLOBAL
+set @@global.innodb_old_blocks_pct=DEFAULT;
+select @@global.innodb_old_blocks_pct;
+@@global.innodb_old_blocks_pct
+37
set global innodb_old_blocks_pct=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
+set global innodb_old_blocks_pct=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
+set global innodb_old_blocks_pct='';
+ERROR 42000: Incorrect argument type to variable 'innodb_old_blocks_pct'
set global innodb_old_blocks_pct=4;
Warnings:
Warning 1292 Truncated incorrect innodb_old_blocks_pct value: '4'
diff --git a/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result b/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result
new file mode 100644
index 00000000000..5a89af5ca88
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_page_cleaners_basic.result
@@ -0,0 +1,41 @@
+SELECT COUNT(@@GLOBAL.innodb_page_cleaners);
+COUNT(@@GLOBAL.innodb_page_cleaners)
+1
+1 Expected
+SELECT COUNT(@@innodb_page_cleaners);
+COUNT(@@innodb_page_cleaners)
+1
+1 Expected
+SET @@GLOBAL.innodb_page_cleaners=1;
+ERROR HY000: Variable 'innodb_page_cleaners' is a read only variable
+Expected error 'Read-only variable'
+SELECT innodb_page_cleaners = @@SESSION.innodb_page_cleaners;
+ERROR 42S22: Unknown column 'innodb_page_cleaners' in 'field list'
+Expected error 'Read-only variable'
+SELECT @@GLOBAL.innodb_page_cleaners = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_page_cleaners';
+@@GLOBAL.innodb_page_cleaners = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_page_cleaners';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+SELECT @@innodb_page_cleaners = @@GLOBAL.innodb_page_cleaners;
+@@innodb_page_cleaners = @@GLOBAL.innodb_page_cleaners
+1
+1 Expected
+SELECT COUNT(@@local.innodb_page_cleaners);
+ERROR HY000: Variable 'innodb_page_cleaners' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_page_cleaners);
+ERROR HY000: Variable 'innodb_page_cleaners' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT VARIABLE_NAME, VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME = 'innodb_page_cleaners';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_PAGE_CLEANERS 1
diff --git a/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result
index d9d067c2cf9..f1a90f0d561 100644
--- a/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_page_size_basic.result
@@ -1 +1,8 @@
-XtraDB extension
+SET @orig = @@global.innodb_page_size;
+SELECT @orig;
+@orig
+{valid_page_size}
+SET GLOBAL innodb_page_size = 4k;
+ERROR HY000: Variable 'innodb_page_size' is a read only variable
+SET GLOBAL innodb_page_size = 8k;
+ERROR HY000: Variable 'innodb_page_size' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result
index 8f81df74d5b..6279cd143cf 100644
--- a/mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_batch_size_basic.result
@@ -29,10 +29,12 @@ SET @@global.innodb_purge_batch_size = 5000;
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
-SET @@global.innodb_purge_batch_size = 1000;
+SET @@global.innodb_purge_batch_size = 4294967295;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_batch_size value: '4294967295'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
-1000
+5000
'#--------------------FN_DYNVARS_046_04-------------------------#'
SET @@global.innodb_purge_batch_size = 0;
Warnings:
@@ -50,9 +52,24 @@ ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
1
-SET @@global.innodb_purge_batch_size = 5001;
+SET @@global.innodb_purge_batch_size = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
+SELECT @@global.innodb_purge_batch_size;
+@@global.innodb_purge_batch_size
+1
+SET @@global.innodb_purge_batch_size = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
+SELECT @@global.innodb_purge_batch_size;
+@@global.innodb_purge_batch_size
+1
+SET @@global.innodb_purge_batch_size = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_batch_size'
+SELECT @@global.innodb_purge_batch_size;
+@@global.innodb_purge_batch_size
+1
+SET @@global.innodb_purge_batch_size = 4294967297;
Warnings:
-Warning 1292 Truncated incorrect innodb_purge_batch_size value: '5001'
+Warning 1292 Truncated incorrect innodb_purge_batch_size value: '4294967297'
SELECT @@global.innodb_purge_batch_size;
@@global.innodb_purge_batch_size
5000
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result
new file mode 100644
index 00000000000..79eb0743dfa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result
@@ -0,0 +1,113 @@
+SET @global_start_value = @@global.innodb_purge_rseg_truncate_frequency;
+SELECT @global_start_value;
+@global_start_value
+128
+'#--------------------FN_DYNVARS_046_01------------------------#'
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SET @@global.innodb_purge_rseg_truncate_frequency = DEFAULT;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+128
+'#---------------------FN_DYNVARS_046_02-------------------------#'
+SET innodb_purge_rseg_truncate_frequency = 1;
+ERROR HY000: Variable 'innodb_purge_rseg_truncate_frequency' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@innodb_purge_rseg_truncate_frequency;
+@@innodb_purge_rseg_truncate_frequency
+128
+SELECT local.innodb_purge_rseg_truncate_frequency;
+ERROR 42S02: Unknown table 'local' in field list
+SET global innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+'#--------------------FN_DYNVARS_046_03------------------------#'
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = 128;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+128
+'#--------------------FN_DYNVARS_046_05-------------------------#'
+SET @@global.innodb_purge_rseg_truncate_frequency = -1;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = -1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '-1024'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = "T";
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = "Y";
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+'#----------------------FN_DYNVARS_046_06------------------------#'
+SELECT @@global.innodb_purge_rseg_truncate_frequency =
+VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_purge_rseg_truncate_frequency';
+@@global.innodb_purge_rseg_truncate_frequency =
+VARIABLE_VALUE
+1
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_purge_rseg_truncate_frequency';
+VARIABLE_VALUE
+1
+'#---------------------FN_DYNVARS_046_07-------------------------#'
+SET @@global.innodb_purge_rseg_truncate_frequency = OFF;
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = ON;
+ERROR 42000: Incorrect argument type to variable 'innodb_purge_rseg_truncate_frequency'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+'#---------------------FN_DYNVARS_046_08----------------------#'
+SET @@global.innodb_purge_rseg_truncate_frequency = TRUE;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = FALSE;
+Warnings:
+Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_frequ value: '0'
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+1
+SET @@global.innodb_purge_rseg_truncate_frequency = @global_start_value;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+@@global.innodb_purge_rseg_truncate_frequency
+128
diff --git a/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result b/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
index e3358a14ea2..2cb697acb6d 100644
--- a/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_purge_threads_basic.result
@@ -1,53 +1,41 @@
-'#---------------------BS_STVARS_035_01----------------------#'
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
COUNT(@@GLOBAL.innodb_purge_threads)
1
1 Expected
-'#---------------------BS_STVARS_035_02----------------------#'
-SET @@GLOBAL.innodb_purge_threads=1;
-ERROR HY000: Variable 'innodb_purge_threads' is a read only variable
-Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
-COUNT(@@GLOBAL.innodb_purge_threads)
+SELECT COUNT(@@innodb_purge_threads);
+COUNT(@@innodb_purge_threads)
1
1 Expected
-'#---------------------BS_STVARS_035_03----------------------#'
+SET @@GLOBAL.innodb_purge_threads=1;
+ERROR HY000: Variable 'innodb_purge_threads' is a read only variable
+Expected error 'Read-only variable'
+SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
+ERROR 42S22: Unknown column 'innodb_purge_threads' in 'field list'
+Expected error 'Read-only variable'
SELECT @@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
@@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
1
1 Expected
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
-COUNT(@@GLOBAL.innodb_purge_threads)
-1
-1 Expected
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
COUNT(VARIABLE_VALUE)
1
1 Expected
-'#---------------------BS_STVARS_035_04----------------------#'
SELECT @@innodb_purge_threads = @@GLOBAL.innodb_purge_threads;
@@innodb_purge_threads = @@GLOBAL.innodb_purge_threads
1
1 Expected
-'#---------------------BS_STVARS_035_05----------------------#'
-SELECT COUNT(@@innodb_purge_threads);
-COUNT(@@innodb_purge_threads)
-1
-1 Expected
SELECT COUNT(@@local.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
SELECT COUNT(@@SESSION.innodb_purge_threads);
ERROR HY000: Variable 'innodb_purge_threads' is a GLOBAL variable
Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
-COUNT(@@GLOBAL.innodb_purge_threads)
-1
-1 Expected
-SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
-ERROR 42S22: Unknown column 'innodb_purge_threads' in 'field list'
-Expected error 'Readonly variable'
+SELECT VARIABLE_NAME, VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME = 'innodb_purge_threads';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_PURGE_THREADS 4
diff --git a/mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result b/mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result
index 65a1a8e319f..8ca5862ac09 100644
--- a/mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_read_ahead_threshold_basic.result
@@ -35,12 +35,26 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_READ_AHEAD_THRESHOLD 10
set session innodb_read_ahead_threshold=1;
ERROR HY000: Variable 'innodb_read_ahead_threshold' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_read_ahead_threshold=DEFAULT;
+select @@global.innodb_read_ahead_threshold;
+@@global.innodb_read_ahead_threshold
+56
set global innodb_read_ahead_threshold=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
set global innodb_read_ahead_threshold=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
set global innodb_read_ahead_threshold="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
+set global innodb_read_ahead_threshold=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
+select @@global.innodb_read_ahead_threshold;
+@@global.innodb_read_ahead_threshold
+56
+set global innodb_read_ahead_threshold=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_read_ahead_threshold'
+select @@global.innodb_read_ahead_threshold;
+@@global.innodb_read_ahead_threshold
+56
set global innodb_read_ahead_threshold=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_read_ahead_threshold value: '-7'
diff --git a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
index fa00baa218e..5e0fb425f6b 100644
--- a/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_replication_delay_basic.result
@@ -35,21 +35,65 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 10
set session innodb_replication_delay=1;
ERROR HY000: Variable 'innodb_replication_delay' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_replication_delay=DEFAULT;
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+0
+set global innodb_replication_delay=0;
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+0
+set global innodb_replication_delay=65535;
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+65535
+set global innodb_replication_delay=4294967295;
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+4294967295
set global innodb_replication_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
set global innodb_replication_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
+set global innodb_replication_delay=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+4294967295
+set global innodb_replication_delay=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_replication_delay'
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+4294967295
set global innodb_replication_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_replication_delay value: '-7'
select @@global.innodb_replication_delay;
@@global.innodb_replication_delay
0
+set global innodb_replication_delay=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_replication_delay value: '-1024'
+select @@global.innodb_replication_delay;
+@@global.innodb_replication_delay
+0
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_REPLICATION_DELAY 0
+SET @@global.innodb_replication_delay = 4294967296;
+SELECT @@global.innodb_replication_delay IN (4294967296,4294967295);
+@@global.innodb_replication_delay IN (4294967296,4294967295)
+1
+SET @@global.innodb_replication_delay = 12345678901;
+SELECT @@global.innodb_replication_delay IN (12345678901,4294967295);
+@@global.innodb_replication_delay IN (12345678901,4294967295)
+1
+SET @@global.innodb_replication_delay = 18446744073709551615;
+SELECT @@global.innodb_replication_delay IN (18446744073709551615,4294967295);
+@@global.innodb_replication_delay IN (18446744073709551615,4294967295)
+1
SET @@global.innodb_replication_delay = @start_global_value;
SELECT @@global.innodb_replication_delay;
@@global.innodb_replication_delay
diff --git a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result
index 05672cbb966..621ef56f61f 100644
--- a/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_spin_wait_delay_basic.result
@@ -35,21 +35,65 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 10
set session innodb_spin_wait_delay=1;
ERROR HY000: Variable 'innodb_spin_wait_delay' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_spin_wait_delay=DEFAULT;
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+6
+set global innodb_spin_wait_delay=0;
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+0
+set global innodb_spin_wait_delay=65535;
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+65535
+set global innodb_spin_wait_delay=4294967295;
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+4294967295
set global innodb_spin_wait_delay=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
set global innodb_spin_wait_delay=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
set global innodb_spin_wait_delay="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
+set global innodb_spin_wait_delay=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+4294967295
+set global innodb_spin_wait_delay=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_spin_wait_delay'
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+4294967295
set global innodb_spin_wait_delay=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '-7'
select @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
0
+set global innodb_spin_wait_delay=-1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_spin_wait_delay value: '-1024'
+select @@global.innodb_spin_wait_delay;
+@@global.innodb_spin_wait_delay
+0
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
VARIABLE_NAME VARIABLE_VALUE
INNODB_SPIN_WAIT_DELAY 0
+SET @@global.innodb_spin_wait_delay = 4294967296;
+SELECT @@global.innodb_spin_wait_delay IN (4294967296,4294967295);
+@@global.innodb_spin_wait_delay IN (4294967296,4294967295)
+1
+SET @@global.innodb_spin_wait_delay = 12345678901;
+SELECT @@global.innodb_spin_wait_delay IN (12345678901,4294967295);
+@@global.innodb_spin_wait_delay IN (12345678901,4294967295)
+1
+SET @@global.innodb_spin_wait_delay = 18446744073709551615;
+SELECT @@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295);
+@@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295)
+1
SET @@global.innodb_spin_wait_delay = @start_global_value;
SELECT @@global.innodb_spin_wait_delay;
@@global.innodb_spin_wait_delay
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
index 1cbdd16afdf..94de032a0fd 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_basic.result
@@ -21,4 +21,4 @@ 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;
+SET GLOBAL innodb_stats_persistent=OFF;
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result
index d2e848621dd..ec211b693df 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_persistent_sample_pages_basic.result
@@ -29,7 +29,7 @@ SET global innodb_stats_persistent_sample_pages=10;
SELECT @@global.innodb_stats_persistent_sample_pages;
@@global.innodb_stats_persistent_sample_pages
10
-SELECT * FROM information_schema.global_variables
+SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_PERSISTENT_SAMPLE_PAGES 10
@@ -39,12 +39,36 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_PERSISTENT_SAMPLE_PAGES 10
SET session innodb_stats_persistent_sample_pages=1;
ERROR HY000: Variable 'innodb_stats_persistent_sample_pages' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_stats_persistent_sample_pages=DEFAULT;
+select @@global.innodb_stats_persistent_sample_pages;
+@@global.innodb_stats_persistent_sample_pages
+20
+SET global innodb_stats_persistent_sample_pages=0;
+Warnings:
+Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '0'
+SELECT @@global.innodb_stats_persistent_sample_pages;
+@@global.innodb_stats_persistent_sample_pages
+1
+SET global innodb_stats_persistent_sample_pages=10;
+SELECT @@global.innodb_stats_persistent_sample_pages;
+@@global.innodb_stats_persistent_sample_pages
+10
SET global innodb_stats_persistent_sample_pages=1.1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_persistent_sample_pages'
SET global innodb_stats_persistent_sample_pages=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_persistent_sample_pages'
SET global innodb_stats_persistent_sample_pages="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_stats_persistent_sample_pages'
+SET global innodb_stats_persistent_sample_pages=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_stats_persistent_sample_pages'
+SELECT @@global.innodb_stats_persistent_sample_pages;
+@@global.innodb_stats_persistent_sample_pages
+10
+SET global innodb_stats_persistent_sample_pages=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_stats_persistent_sample_pages'
+SELECT @@global.innodb_stats_persistent_sample_pages;
+@@global.innodb_stats_persistent_sample_pages
+10
SET global innodb_stats_persistent_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_persistent_sample_p value: '-7'
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result
index e490773b63a..8618d602922 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_sample_pages_basic.result
@@ -37,12 +37,28 @@ VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_SAMPLE_PAGES 10
set session innodb_stats_sample_pages=1;
ERROR HY000: Variable 'innodb_stats_sample_pages' is a GLOBAL variable and should be set with SET GLOBAL
-set global innodb_stats_sample_pages=1.1;
+set global innodb_stats_sample_pages=DEFAULT;
+Warnings:
+Warning 131 Using innodb_stats_sample_pages is deprecated and the variable may be removed in future releases. Please use innodb_stats_transient_sample_pages instead.
+select @@global.innodb_stats_sample_pages;
+@@global.innodb_stats_sample_pages
+8
+set global innodb_stats_sample_pages = 1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
+set global innodb_stats_sample_pages = 1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-set global innodb_stats_sample_pages=1e1;
+set global innodb_stats_sample_pages = "foo";
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
-set global innodb_stats_sample_pages="foo";
+set global innodb_stats_sample_pages=' ';
ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
+select @@global.innodb_stats_sample_pages;
+@@global.innodb_stats_sample_pages
+8
+set global innodb_stats_sample_pages=" ";
+ERROR 42000: Incorrect argument type to variable 'innodb_stats_sample_pages'
+select @@global.innodb_stats_sample_pages;
+@@global.innodb_stats_sample_pages
+8
set global innodb_stats_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_sample_pages value: '-7'
diff --git a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
index 4c60dd5a697..1ea5ac3d3bc 100644
--- a/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_stats_transient_sample_pages_basic.result
@@ -25,6 +25,10 @@ SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STATS_TRANSIENT_SAMPLE_PAGES 8
+set global innodb_stats_transient_sample_pages=DEFAULT;
+select @@global.innodb_stats_transient_sample_pages;
+@@global.innodb_stats_transient_sample_pages
+8
SET global innodb_stats_transient_sample_pages=10;
SELECT @@global.innodb_stats_transient_sample_pages;
@@global.innodb_stats_transient_sample_pages
@@ -45,6 +49,8 @@ SET global innodb_stats_transient_sample_pages=1e1;
ERROR 42000: Incorrect argument type to variable 'innodb_stats_transient_sample_pages'
SET global innodb_stats_transient_sample_pages="foo";
ERROR 42000: Incorrect argument type to variable 'innodb_stats_transient_sample_pages'
+SET global innodb_stats_transient_sample_pages=' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_stats_transient_sample_pages'
SET global innodb_stats_transient_sample_pages=-7;
Warnings:
Warning 1292 Truncated incorrect innodb_stats_transient_sample_pa value: '-7'
diff --git a/mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result b/mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result
index 9c5e62d2684..8bddb6a1694 100644
--- a/mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_strict_mode_basic.result
@@ -1,32 +1,32 @@
SET @start_global_value = @@global.innodb_strict_mode;
SELECT @start_global_value;
@start_global_value
-0
+1
Valid values are 'ON' and 'OFF'
select @@global.innodb_strict_mode in (0, 1);
@@global.innodb_strict_mode in (0, 1)
1
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
-0
+1
select @@session.innodb_strict_mode in (0, 1);
@@session.innodb_strict_mode in (0, 1)
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
-0
+1
show global variables like 'innodb_strict_mode';
Variable_name Value
-innodb_strict_mode OFF
+innodb_strict_mode ON
show session variables like 'innodb_strict_mode';
Variable_name Value
-innodb_strict_mode OFF
+innodb_strict_mode ON
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_STRICT_MODE OFF
+INNODB_STRICT_MODE ON
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
-INNODB_STRICT_MODE OFF
+INNODB_STRICT_MODE ON
set global innodb_strict_mode='OFF';
set session innodb_strict_mode='OFF';
select @@global.innodb_strict_mode;
@@ -118,4 +118,4 @@ INNODB_STRICT_MODE ON
SET @@global.innodb_strict_mode = @start_global_value;
SELECT @@global.innodb_strict_mode;
@@global.innodb_strict_mode
-0
+1
diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_sync_debug_basic.result
new file mode 100644
index 00000000000..72420c8595b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_sync_debug_basic.result
@@ -0,0 +1,11 @@
+#
+# Basic test for innodb_sync_debug
+#
+SELECT @@global.innodb_sync_debug;
+@@global.innodb_sync_debug
+0
+set global innodb_sync_debug = 1;
+ERROR HY000: Variable 'innodb_sync_debug' is a read only variable
+SELECT @@global.innodb_sync_debug;
+@@global.innodb_sync_debug
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result
index ba45d4f2ed0..3377b690e49 100644
--- a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic.result
@@ -25,15 +25,28 @@ SET @@global.innodb_sync_spin_loops = 0;
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
0
-SET @@global.innodb_sync_spin_loops = 1;
+SET @@global.innodb_sync_spin_loops = 65535;
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1
-SET @@global.innodb_sync_spin_loops = 1000;
+65535
+SET @@global.innodb_sync_spin_loops = 4294967295;
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1000
+4294967295
'#--------------------FN_DYNVARS_046_04-------------------------#'
+SET @@global.innodb_sync_spin_loops = 4294967296;
+SELECT @@global.innodb_sync_spin_loops IN (4294967296,4294967295);
+@@global.innodb_sync_spin_loops IN (4294967296,4294967295)
+1
+SET @@global.innodb_sync_spin_loops = 12345678901;
+SELECT @@global.innodb_sync_spin_loops IN (12345678901,4294967295);
+@@global.innodb_sync_spin_loops IN (12345678901,4294967295)
+1
+SET @@global.innodb_sync_spin_loops = 18446744073709551615;
+SELECT @@global.innodb_sync_spin_loops IN (18446744073709551615,4294967295);
+@@global.innodb_sync_spin_loops IN (18446744073709551615,4294967295)
+1
+'#--------------------FN_DYNVARS_046_05-------------------------#'
SET @@global.innodb_sync_spin_loops = -1;
Warnings:
Warning 1292 Truncated incorrect innodb_sync_spin_loops value: '-1'
@@ -50,11 +63,28 @@ ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
0
-SET @@global.innodb_sync_spin_loops = 1001;
+SET @@global.innodb_sync_spin_loops = 65535.01;
+ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
+SELECT @@global.innodb_sync_spin_loops;
+@@global.innodb_sync_spin_loops
+0
+SET @@global.innodb_sync_spin_loops = -1024;
+Warnings:
+Warning 1292 Truncated incorrect innodb_sync_spin_loops value: '-1024'
+SELECT @@global.innodb_sync_spin_loops;
+@@global.innodb_sync_spin_loops
+0
+SET @@global.innodb_sync_spin_loops = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
+SELECT @@global.innodb_sync_spin_loops;
+@@global.innodb_sync_spin_loops
+0
+SET @@global.innodb_sync_spin_loops = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1001
-'#----------------------FN_DYNVARS_046_05------------------------#'
+0
+'#----------------------FN_DYNVARS_046_06------------------------#'
SELECT @@global.innodb_sync_spin_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
@@ -63,23 +93,23 @@ VARIABLE_VALUE
1
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1001
+0
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
VARIABLE_VALUE
-1001
-'#---------------------FN_DYNVARS_046_06-------------------------#'
+0
+'#---------------------FN_DYNVARS_046_07-------------------------#'
SET @@global.innodb_sync_spin_loops = OFF;
ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1001
+0
SET @@global.innodb_sync_spin_loops = ON;
ERROR 42000: Incorrect argument type to variable 'innodb_sync_spin_loops'
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
-1001
-'#---------------------FN_DYNVARS_046_07----------------------#'
+0
+'#---------------------FN_DYNVARS_046_08----------------------#'
SET @@global.innodb_sync_spin_loops = TRUE;
SELECT @@global.innodb_sync_spin_loops;
@@global.innodb_sync_spin_loops
diff --git a/mysql-test/suite/sys_vars/r/innodb_table_locks_func.result b/mysql-test/suite/sys_vars/r/innodb_table_locks_func.result
index 8e7806ad7e0..0f9e1e8ccf0 100644
--- a/mysql-test/suite/sys_vars/r/innodb_table_locks_func.result
+++ b/mysql-test/suite/sys_vars/r/innodb_table_locks_func.result
@@ -4,7 +4,9 @@ SELECT @start_value;
@start_value
1
SET @@global.innodb_table_locks = OFF;
+'connect (con1,localhost,root,,,,)'
connect con1,localhost,root,,,,;
+'connection con1'
connection con1;
SELECT @@global.innodb_table_locks;
@@global.innodb_table_locks
@@ -15,7 +17,9 @@ SELECT @@session.innodb_table_locks;
disconnect con1;
'#--------------------FN_DYNVARS_048_02-------------------------#'
'----check when innodb_table_locks = ON and autocommit = OFF---'
+'connect (con2,localhost,root,,,,)'
connect con2,localhost,root,,,,;
+'connection default'
connection default;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT) ENGINE=INNODB;
@@ -26,12 +30,15 @@ INSERT INTO t1 VALUES(1);
SELECT * FROM t1 FOR UPDATE;
a
1
+'CONNECTION con2'
connection con2;
SET @@innodb_table_locks = ON;
SET @@autocommit = OFF;
LOCK TABLES t1 WRITE;
+'CONNECTION default'
connection default;
COMMIT;
+'CONNECTION con2'
connection con2;
UNLOCK tables;
DROP TABLE t1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_temp_data_file_path_basic.result b/mysql-test/suite/sys_vars/r/innodb_temp_data_file_path_basic.result
new file mode 100644
index 00000000000..2357a07e3ab
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_temp_data_file_path_basic.result
@@ -0,0 +1,53 @@
+'#---------------------BS_STVARS_024_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
+COUNT(@@GLOBAL.innodb_temp_data_file_path)
+1
+1 Expected
+'#---------------------BS_STVARS_024_02----------------------#'
+SET @@GLOBAL.innodb_temp_data_file_path=1;
+ERROR HY000: Variable 'innodb_temp_data_file_path' is a read only variable
+Expected error 'Read only variable'
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
+COUNT(@@GLOBAL.innodb_temp_data_file_path)
+1
+1 Expected
+'#---------------------BS_STVARS_024_03----------------------#'
+SELECT @@GLOBAL.innodb_temp_data_file_path = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_temp_data_file_path';
+@@GLOBAL.innodb_temp_data_file_path = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
+COUNT(@@GLOBAL.innodb_temp_data_file_path)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_temp_data_file_path';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_024_04----------------------#'
+SELECT @@innodb_temp_data_file_path = @@GLOBAL.innodb_temp_data_file_path;
+@@innodb_temp_data_file_path = @@GLOBAL.innodb_temp_data_file_path
+1
+1 Expected
+'#---------------------BS_STVARS_024_05----------------------#'
+SELECT COUNT(@@innodb_temp_data_file_path);
+COUNT(@@innodb_temp_data_file_path)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_temp_data_file_path);
+ERROR HY000: Variable 'innodb_temp_data_file_path' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_temp_data_file_path);
+ERROR HY000: Variable 'innodb_temp_data_file_path' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
+COUNT(@@GLOBAL.innodb_temp_data_file_path)
+1
+1 Expected
+SELECT innodb_temp_data_file_path = @@SESSION.innodb_temp_data_file_path;
+ERROR 42S22: Unknown column 'innodb_temp_data_file_path' in 'field list'
+Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
index c7af96bb22a..ca3c253604a 100644
--- a/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_thread_concurrency_basic.result
@@ -50,12 +50,27 @@ ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
0
+SET @@global.innodb_thread_concurrency = ' ';
+ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
+SELECT @@global.innodb_thread_concurrency;
+@@global.innodb_thread_concurrency
+0
+SET @@global.innodb_thread_concurrency = " ";
+ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
+SELECT @@global.innodb_thread_concurrency;
+@@global.innodb_thread_concurrency
+0
SET @@global.innodb_thread_concurrency = 1001;
Warnings:
Warning 1292 Truncated incorrect innodb_thread_concurrency value: '1001'
SELECT @@global.innodb_thread_concurrency;
@@global.innodb_thread_concurrency
1000
+SET @@global.innodb_thread_concurrency = 255.01;
+ERROR 42000: Incorrect argument type to variable 'innodb_thread_concurrency'
+SELECT @@global.innodb_thread_concurrency;
+@@global.innodb_thread_concurrency
+1000
'#----------------------FN_DYNVARS_046_05------------------------#'
SELECT @@global.innodb_thread_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result b/mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result
index e7d7cef67c7..fbafe653d29 100644
--- a/mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_undo_directory_basic.result
@@ -1,7 +1,7 @@
-SELECT @@GLOBAL.innodb_undo_directory;
-@@GLOBAL.innodb_undo_directory
-.
-. Expected
+SELECT COUNT(@@GLOBAL.innodb_undo_directory);
+COUNT(@@GLOBAL.innodb_undo_directory)
+1
+1 Expected
SET @@GLOBAL.innodb_undo_directory="/tmp";
ERROR HY000: Variable 'innodb_undo_directory' is a read only variable
Expected error 'Read only variable'
@@ -9,12 +9,12 @@ SELECT COUNT(@@GLOBAL.innodb_undo_directory);
COUNT(@@GLOBAL.innodb_undo_directory)
1
1 Expected
-SELECT VARIABLE_VALUE
+SELECT @@GLOBAL.innodb_undo_directory = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_undo_directory';
-VARIABLE_VALUE
-.
-. Expected
+@@GLOBAL.innodb_undo_directory = VARIABLE_VALUE
+1
+1 Expected
SELECT COUNT(@@GLOBAL.innodb_undo_directory);
COUNT(@@GLOBAL.innodb_undo_directory)
1
diff --git a/mysql-test/suite/sys_vars/r/innodb_undo_log_truncate_basic.result b/mysql-test/suite/sys_vars/r/innodb_undo_log_truncate_basic.result
new file mode 100644
index 00000000000..eb42f4965ea
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_undo_log_truncate_basic.result
@@ -0,0 +1,69 @@
+SET @start_global_value = @@global.innodb_undo_log_truncate;
+SELECT @start_global_value;
+@start_global_value
+0
+'#---------------------BS_STVARS_028_01----------------------#'
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+COUNT(@@GLOBAL.innodb_undo_log_truncate)
+1
+1 Expected
+'#---------------------BS_STVARS_028_02----------------------#'
+SET @@global.innodb_undo_log_truncate = 0;
+SELECT @@global.innodb_undo_log_truncate;
+@@global.innodb_undo_log_truncate
+0
+SET @@global.innodb_undo_log_truncate ='On' ;
+SELECT @@global.innodb_undo_log_truncate;
+@@global.innodb_undo_log_truncate
+1
+SET @@global.innodb_undo_log_truncate ='Off' ;
+SELECT @@global.innodb_undo_log_truncate;
+@@global.innodb_undo_log_truncate
+0
+SET @@global.innodb_undo_log_truncate = 1;
+SELECT @@global.innodb_undo_log_truncate;
+@@global.innodb_undo_log_truncate
+1
+'#---------------------BS_STVARS_028_03----------------------#'
+SELECT IF(@@GLOBAL.innodb_undo_log_truncate,'ON','OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_undo_log_truncate';
+IF(@@GLOBAL.innodb_undo_log_truncate,'ON','OFF') = VARIABLE_VALUE
+1
+1 Expected
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+COUNT(@@GLOBAL.innodb_undo_log_truncate)
+1
+1 Expected
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_undo_log_truncate';
+COUNT(VARIABLE_VALUE)
+1
+1 Expected
+'#---------------------BS_STVARS_028_04----------------------#'
+SELECT @@innodb_undo_log_truncate = @@GLOBAL.innodb_undo_log_truncate;
+@@innodb_undo_log_truncate = @@GLOBAL.innodb_undo_log_truncate
+1
+1 Expected
+'#---------------------BS_STVARS_028_05----------------------#'
+SELECT COUNT(@@innodb_undo_log_truncate);
+COUNT(@@innodb_undo_log_truncate)
+1
+1 Expected
+SELECT COUNT(@@local.innodb_undo_log_truncate);
+ERROR HY000: Variable 'innodb_undo_log_truncate' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@SESSION.innodb_undo_log_truncate);
+ERROR HY000: Variable 'innodb_undo_log_truncate' is a GLOBAL variable
+Expected error 'Variable is a GLOBAL variable'
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+COUNT(@@GLOBAL.innodb_undo_log_truncate)
+1
+1 Expected
+SELECT innodb_undo_log_truncate = @@SESSION.innodb_undo_log_truncate;
+ERROR 42S22: Unknown column 'innodb_undo_log_truncate' in 'field list'
+SET @@global.innodb_undo_log_truncate = @start_global_value;
+SELECT @@global.innodb_undo_log_truncate;
+@@global.innodb_undo_log_truncate
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result b/mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result
index 6130484ad86..c7e0b21a12b 100644
--- a/mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_undo_tablespaces_basic.result
@@ -1,7 +1,6 @@
-SELECT @@GLOBAL.innodb_undo_tablespaces;
-@@GLOBAL.innodb_undo_tablespaces
-0
-0 Expected
+SELECT @@GLOBAL.innodb_undo_tablespaces >= 0;
+@@GLOBAL.innodb_undo_tablespaces >= 0
+1
SET @@GLOBAL.innodb_undo_tablespaces=128;
ERROR HY000: Variable 'innodb_undo_tablespaces' is a read only variable
Expected error 'Read only variable'
@@ -9,10 +8,7 @@ SELECT COUNT(@@GLOBAL.innodb_undo_tablespaces);
COUNT(@@GLOBAL.innodb_undo_tablespaces)
1
1 Expected
-SELECT VARIABLE_VALUE
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_undo_tablespaces';
-VARIABLE_VALUE
+DIFFERENCE
0
0 Expected
SELECT @@innodb_undo_tablespaces = @@GLOBAL.innodb_undo_tablespaces;
diff --git a/mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result
deleted file mode 100644
index 70ecef72042..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result
+++ /dev/null
@@ -1,22 +0,0 @@
-Valid values are 'ON' and 'OFF'
-select @@global.innodb_use_sys_malloc;
-@@global.innodb_use_sys_malloc
-1
-select @@session.innodb_use_sys_malloc;
-ERROR HY000: Variable 'innodb_use_sys_malloc' is a GLOBAL variable
-show global variables like 'innodb_use_sys_malloc';
-Variable_name Value
-innodb_use_sys_malloc ON
-show session variables like 'innodb_use_sys_malloc';
-Variable_name Value
-innodb_use_sys_malloc ON
-select * from information_schema.global_variables where variable_name='innodb_use_sys_malloc';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_USE_SYS_MALLOC ON
-select * from information_schema.session_variables where variable_name='innodb_use_sys_malloc';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_USE_SYS_MALLOC ON
-set global innodb_use_sys_malloc=1;
-ERROR HY000: Variable 'innodb_use_sys_malloc' is a read only variable
-set session innodb_use_sys_malloc=1;
-ERROR HY000: Variable 'innodb_use_sys_malloc' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 9f92ea99437..1a7a0188b1c 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -47,6 +47,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Number of InnoDB Adapative Hash Index Partitions. (default = 8).
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 512
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
SESSION_VALUE NULL
GLOBAL_VALUE 150000
@@ -61,20 +75,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_ADDITIONAL_MEM_POOL_SIZE
-SESSION_VALUE NULL
-GLOBAL_VALUE 8388608
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 8388608
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
-VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.
-NUMERIC_MIN_VALUE 524288
-NUMERIC_MAX_VALUE 9223372036854775807
-NUMERIC_BLOCK_SIZE 1024
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_API_BK_COMMIT_INTERVAL
SESSION_VALUE NULL
GLOBAL_VALUE 5
@@ -166,7 +166,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT
-VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility) 1 => New style AUTOINC locking 2 => No AUTOINC locking (unsafe for SBR)
+VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility); 1 => New style AUTOINC locking; 2 => No AUTOINC locking (unsafe for SBR)
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 2
NUMERIC_BLOCK_SIZE 0
@@ -229,11 +229,25 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_BUFFER_POOL_CHUNK_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 8388608
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 134217728
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Size of a single memory chunk within each buffer pool instance for resizing buffer pool. Online buffer pool resizing happens at this granularity. 0 means disable resizing buffer pool.
+NUMERIC_MIN_VALUE 1048576
+NUMERIC_MAX_VALUE 9223372036854775807
+NUMERIC_BLOCK_SIZE 1048576
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_AT_SHUTDOWN
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
+GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
+DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Dump the buffer pool into a file named @@innodb_buffer_pool_filename
@@ -259,12 +273,12 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_PCT
SESSION_VALUE NULL
-GLOBAL_VALUE 100
+GLOBAL_VALUE 25
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 100
+DEFAULT_VALUE 25
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 100
+VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 25
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 100
NUMERIC_BLOCK_SIZE 0
@@ -301,15 +315,15 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_INSTANCES
SESSION_VALUE NULL
-GLOBAL_VALUE 8
+GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
+VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 64
-NUMERIC_BLOCK_SIZE 1
+NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
@@ -329,9 +343,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_AT_STARTUP
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
+GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
+DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Load the buffer pool from a file named @@innodb_buffer_pool_filename
@@ -367,7 +381,7 @@ NUMERIC_MIN_VALUE 5242880
NUMERIC_MAX_VALUE 9223372036854775807
NUMERIC_BLOCK_SIZE 1048576
ENUM_VALUE_LIST NULL
-READ_ONLY YES
+READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUF_DUMP_STATUS_FREQUENCY
SESSION_VALUE NULL
@@ -455,16 +469,16 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_CHECKSUM_ALGORITHM
SESSION_VALUE NULL
-GLOBAL_VALUE INNODB
+GLOBAL_VALUE crc32
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE INNODB
+DEFAULT_VALUE crc32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Files updated when this option is set to crc32 or strict_crc32 will not be readable by MySQL versions older than 5.6.3
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
+ENUM_VALUE_LIST crc32,strict_crc32,innodb,strict_innodb,none,strict_none
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
@@ -551,6 +565,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_COMPRESS_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE none
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE none
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT Compress all tables, without specifying the COMRPESS table attribute
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST none,zlib,lz4,lz4hc
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CONCURRENCY_TICKETS
SESSION_VALUE NULL
GLOBAL_VALUE 5000
@@ -621,6 +649,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_DEFAULT_ROW_FORMAT
+SESSION_VALUE NULL
+GLOBAL_VALUE dynamic
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE dynamic
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE ENUM
+VARIABLE_COMMENT The default ROW FORMAT for all innodb tables created without explicit ROW_FORMAT. Possible values are REDUNDANT, COMPACT, and DYNAMIC. The ROW_FORMAT value COMPRESSED is not allowed
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST redundant,compact,dynamic
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -719,6 +761,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Disable resizing buffer pool to make assertion code not expensive.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_SORT_FILE_CACHE
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -861,9 +917,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FILE_FORMAT
SESSION_VALUE NULL
-GLOBAL_VALUE Antelope
+GLOBAL_VALUE Barracuda
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE Antelope
+DEFAULT_VALUE Barracuda
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT File format to use for new tables in .ibd files.
@@ -889,7 +945,7 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FILE_FORMAT_MAX
SESSION_VALUE NULL
-GLOBAL_VALUE Antelope
+GLOBAL_VALUE Barracuda
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE Antelope
VARIABLE_SCOPE GLOBAL
@@ -915,6 +971,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_FILL_FACTOR
+SESSION_VALUE NULL
+GLOBAL_VALUE 100
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 100
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT
+VARIABLE_COMMENT Percentage of B-tree page filled during bulk insert
+NUMERIC_MIN_VALUE 10
+NUMERIC_MAX_VALUE 100
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FIL_MAKE_PAGE_DIRTY_DEBUG
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -999,6 +1069,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_FLUSH_SYNC
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Allow IO bursts at the checkpoints ignoring io_capacity setting.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1050,7 +1134,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Kills the server during crash recovery.
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 10
+NUMERIC_MAX_VALUE 100
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -1068,7 +1152,7 @@ NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
-COMMAND_LINE_ARGUMENT NONE
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_CACHE_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 8000000
@@ -1295,9 +1379,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LARGE_PREFIX
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
+GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
+DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Support large index prefix length of REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes.
@@ -1377,6 +1461,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_CHECKSUMS
+SESSION_VALUE NULL
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Whether to compute and require checksums for InnoDB redo log blocks
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1433,6 +1531,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME INNODB_LOG_WRITE_AHEAD_SIZE
+SESSION_VALUE NULL
+GLOBAL_VALUE 8192
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8192
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Redo log write ahead unit size to avoid read-on-write, it should match the OS cache block IO size
+NUMERIC_MIN_VALUE 512
+NUMERIC_MAX_VALUE 16384
+NUMERIC_BLOCK_SIZE 512
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LRU_SCAN_DEPTH
SESSION_VALUE NULL
GLOBAL_VALUE 100
@@ -1455,7 +1567,7 @@ DEFAULT_VALUE 75.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Percentage of dirty pages allowed in bufferpool.
-NUMERIC_MIN_VALUE 0.001
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 99.999
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
@@ -1463,9 +1575,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT_LWM
SESSION_VALUE NULL
-GLOBAL_VALUE 0.001000
+GLOBAL_VALUE 0.000000
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0.001000
+DEFAULT_VALUE 0.000000
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE DOUBLE
VARIABLE_COMMENT Percentage of dirty pages at which flushing kicks in.
@@ -1503,19 +1615,33 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_MIRRORED_LOG_GROUPS
+VARIABLE_NAME INNODB_MAX_UNDO_LOG_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 1
+GLOBAL_VALUE 1073741824
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
+DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT
-VARIABLE_COMMENT Number of identical copies of log groups we keep for the database. Currently this should be set to 1.
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 10
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum size of UNDO tablespace in MB (If UNDO tablespace grows beyond this size it will be truncated in due course).
+NUMERIC_MIN_VALUE 10485760
+NUMERIC_MAX_VALUE 18446744073709551615
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
-READ_ONLY YES
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_MERGE_THRESHOLD_SET_ALL_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE 50
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 50
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Override current MERGE_THRESHOLD setting for all indexes at dictionary cache by the specified value dynamically, at the time.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 50
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_MONITOR_DISABLE
SESSION_VALUE NULL
@@ -1657,6 +1783,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_PAGE_CLEANERS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 4
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Page cleaner threads can be from 1 to 64. Default is 4.
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PAGE_HASH_LOCKS
SESSION_VALUE NULL
GLOBAL_VALUE 16
@@ -1727,6 +1867,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PURGE_RSEG_TRUNCATE_FREQUENCY
+SESSION_VALUE NULL
+GLOBAL_VALUE 128
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 128
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Dictates rate at which UNDO records are purged. Value N means purge rollback segment(s) on every Nth iteration of purge invocation
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 128
+NUMERIC_BLOCK_SIZE 0
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_RUN_NOW
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -1757,12 +1911,12 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 1
+GLOBAL_VALUE 4
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1
+DEFAULT_VALUE 4
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 1.
+VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 4.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 32
NUMERIC_BLOCK_SIZE 0
@@ -2147,6 +2301,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_SYNC_DEBUG
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable the sync debug checks
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_SPIN_LOOPS
SESSION_VALUE NULL
GLOBAL_VALUE 30
@@ -2175,6 +2343,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_TEMP_DATA_FILE_PATH
+SESSION_VALUE NULL
+GLOBAL_VALUE ibtmp1:12M:autoextend
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Path to files and their sizes making temp-tablespace.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_THREAD_CONCURRENCY
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -2247,9 +2429,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INNODB_UNDO_DIRECTORY
SESSION_VALUE NULL
-GLOBAL_VALUE .
+GLOBAL_VALUE PATH
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE .
+DEFAULT_VALUE
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE VARCHAR
VARIABLE_COMMENT Directory where undo tablespace files live, this path can be absolute.
@@ -2273,6 +2455,20 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_UNDO_LOG_TRUNCATE
+SESSION_VALUE NULL
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Enable or Disable Truncate of UNDO tablespace.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_UNDO_TABLESPACES
SESSION_VALUE NULL
GLOBAL_VALUE 0
@@ -2282,7 +2478,7 @@ VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of undo tablespaces to use.
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 126
+NUMERIC_MAX_VALUE 95
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
@@ -2329,20 +2525,6 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
-VARIABLE_NAME INNODB_USE_SYS_MALLOC
-SESSION_VALUE NULL
-GLOBAL_VALUE ON
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE ON
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the InnoDB's internal memory allocator. Use OS memory allocator instead of InnoDB's internal memory allocator
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_TRIM
SESSION_VALUE NULL
GLOBAL_VALUE OFF
@@ -2359,7 +2541,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE 5.6.31
+GLOBAL_VALUE 5.7.9
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test
new file mode 100644
index 00000000000..3f4a9283339
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_parts_basic.test
@@ -0,0 +1,75 @@
+--source include/have_innodb.inc
+
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+--echo 1 Expected
+
+
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_adaptive_hash_index_parts=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+--echo 1 Expected
+
+
+
+
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+--disable_warnings
+SELECT @@GLOBAL.innodb_adaptive_hash_index_parts = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_adaptive_hash_index_parts';
+--echo 1 Expected
+--enable_warnings
+
+
+
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_adaptive_hash_index_parts = @@GLOBAL.innodb_adaptive_hash_index_parts;
+--echo 1 Expected
+
+
+
+################################################################################
+# Check if innodb_adaptive_hash_index_parts can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_adaptive_hash_index_parts);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_adaptive_hash_index_parts);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_adaptive_hash_index_parts);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_adaptive_hash_index_parts);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_adaptive_hash_index_parts = @@SESSION.innodb_adaptive_hash_index_parts;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test
index a2508b073eb..49349d86713 100644
--- a/mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_adaptive_max_sleep_delay_basic.test
@@ -32,22 +32,40 @@ SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
# Check if value can be set
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100;
+# Check for valid values
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=0;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=100000;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000000;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+
# Check for out of bounds
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=1000001;
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
--echo 1000000 Expected
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=4294967295;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+--echo 1000000 Expected
+
SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1;
SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
--echo 0 Expected
+SET @@GLOBAL.innodb_adaptive_max_sleep_delay=-1024;
+SELECT @@GLOBAL.innodb_adaptive_max_sleep_delay;
+--echo 0 Expected
+
SELECT COUNT(@@GLOBAL.innodb_adaptive_max_sleep_delay);
--echo 1 Expected
# Check if the value in GLOBAL table matches value in variable
+--disable_warnings
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_adaptive_max_sleep_delay';
+--enable_warnings
--echo 100 Expected
# Check if accessing variable with and without GLOBAL point to same
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
index b3a7aebce4e..7c9ae6395be 100644
--- 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
@@ -19,22 +19,47 @@ SELECT @@global.innodb_api_bk_commit_interval;
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';
+--disable_warnings
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';
+--enable_warnings
#
# show that it's writable
#
SET global innodb_api_bk_commit_interval=100;
SELECT @@global.innodb_api_bk_commit_interval;
+--disable_warnings
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';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_api_bk_commit_interval=1;
+#
+# Valid values
+#
+SET global innodb_api_bk_commit_interval=1;
+SELECT @@global.innodb_api_bk_commit_interval;
+SET global innodb_api_bk_commit_interval=100000;
+SELECT @@global.innodb_api_bk_commit_interval;
+SET global innodb_api_bk_commit_interval=1073741824;
+SELECT @@global.innodb_api_bk_commit_interval;
+
+#
+# Invalid values
+#
+SET global innodb_api_bk_commit_interval=0;
+SELECT @@global.innodb_api_bk_commit_interval;
+SET global innodb_api_bk_commit_interval=-1024;
+SELECT @@global.innodb_api_bk_commit_interval;
+SET global innodb_api_bk_commit_interval=1073741825;
+SELECT @@global.innodb_api_bk_commit_interval;
+SET global innodb_api_bk_commit_interval=4294967295;
+SELECT @@global.innodb_api_bk_commit_interval;
#
# incorrect types
@@ -47,8 +72,10 @@ SET global innodb_api_bk_commit_interval=1e1;
SET global innodb_api_bk_commit_interval="foo";
SET global innodb_api_bk_commit_interval=-7;
SELECT @@global.innodb_api_bk_commit_interval;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_bk_commit_interval';
+--enable_warnings
#
# cleanup
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
index c9c04a27229..42e9903df5e 100644
--- 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
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_api_disable_rowlock, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_disable_rowlock);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_disable_rowlock';
+--enable_warnings
--echo 1 Expected
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
index 637541ef621..e88d8ecac5c 100644
--- 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
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_api_enable_binlog, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_binlog);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_binlog';
+--enable_warnings
--echo 1 Expected
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
index 0e440a72cce..d3086878d6a 100644
--- 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
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_api_enable_mdl, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_api_enable_mdl);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_api_enable_mdl';
+--enable_warnings
--echo 1 Expected
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
index 49c34b647fd..c77f8471d7b 100644
--- 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
@@ -19,20 +19,24 @@ SELECT @@global.innodb_api_trx_level;
SELECT @@session.innodb_api_trx_level;
SHOW global variables LIKE 'innodb_api_trx_level';
SHOW session variables LIKE 'innodb_api_trx_level';
+--disable_warnings
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';
+--enable_warnings
#
# show that it's writable
#
SET global innodb_api_trx_level=100;
SELECT @@global.innodb_api_trx_level;
+--disable_warnings
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';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_api_trx_level=1;
@@ -47,8 +51,10 @@ SET global innodb_api_trx_level=1e1;
SET global innodb_api_trx_level="foo";
SET global innodb_api_trx_level=-7;
SELECT @@global.innodb_api_trx_level;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_api_trx_level';
+--enable_warnings
#
# cleanup
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 cbe62a105ff..864dd732ec7 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
@@ -94,18 +94,25 @@ SET @@global.innodb_autoextend_increment = 1001;
SELECT @@global.innodb_autoextend_increment;
+SET @@global.innodb_autoextend_increment = 2000 ;
+SELECT @@global.innodb_autoextend_increment;
+
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_autoextend_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
+--enable_warnings
SELECT @@global.innodb_autoextend_increment ;
+--disable_warnings
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoextend_increment ';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
index e07234a9152..81e63ddf858 100644
--- a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test
@@ -75,13 +75,17 @@ SELECT @@global.innodb_autoinc_lock_mode;
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_autoinc_lock_mode = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoinc_lock_mode';
+--enable_warnings
SELECT @@global.innodb_autoinc_lock_mode;
+--disable_warnings
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_autoinc_lock_mode';
+--enable_warnings
###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt
index f0b6727d6d8..ab9fcb75678 100644
--- a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt
+++ b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_func-master.opt
@@ -1,2 +1,2 @@
---loose-innodb-autoinc-lock-mode=1
+--innodb-autoinc-lock-mode=1
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_chunk_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_chunk_size_basic.test
new file mode 100644
index 00000000000..561786ee6e5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_chunk_size_basic.test
@@ -0,0 +1,75 @@
+--source include/have_innodb.inc
+
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+--echo 1 Expected
+
+
+####################################################################
+# Check if Value can set #
+####################################################################
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_buffer_pool_chunk_size=1;
+--echo Expected error 'Read only variable'
+
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+--echo 1 Expected
+
+
+
+
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+--disable_warnings
+SELECT @@GLOBAL.innodb_buffer_pool_chunk_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_buffer_pool_chunk_size';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_buffer_pool_chunk_size';
+--echo 1 Expected
+--enable_warnings
+
+
+
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_buffer_pool_chunk_size = @@GLOBAL.innodb_buffer_pool_chunk_size;
+--echo 1 Expected
+
+
+
+################################################################################
+# Check if innodb_buffer_pool_chunk_size can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_buffer_pool_chunk_size);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_buffer_pool_chunk_size);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_buffer_pool_chunk_size);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_buffer_pool_chunk_size);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_buffer_pool_chunk_size = @@SESSION.innodb_buffer_pool_chunk_size;
+--echo Expected error 'Readonly variable'
+
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
index b69e856be5a..feb7bf05638 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_at_shutdown_basic.test
@@ -40,3 +40,5 @@ SET GLOBAL innodb_buffer_pool_dump_at_shutdown = 5;
-- source include/restart_mysqld.inc
-- file_exists $file
+
+SET GLOBAL innodb_buffer_pool_dump_at_shutdown = default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test
index d2f5cb4a0de..ae45be7f2a3 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_dump_pct_basic.test
@@ -1,34 +1,57 @@
-#
-# Basic test for innodb_buffer_pool_dump_pct
-#
+############################################
+# Variable Name: innodb_buffer_pool_dump_pct
+# Scope: GLOBAL
+# Access Type: Dynamic
+# Data Type: Integer
+# Default Value: 100
+# Range: 1-100
+############################################
-- source include/have_innodb.inc
# Check the default value
-SET @orig = @@global.innodb_buffer_pool_dump_pct;
-SELECT @orig;
+SELECT @@global.innodb_buffer_pool_dump_pct;
+
+# Set the valid value
+SET GLOBAL innodb_buffer_pool_dump_pct=20;
+
+# Check the value is 20
+SELECT @@global.innodb_buffer_pool_dump_pct;
-# Do the dump
-SET GLOBAL innodb_buffer_pool_dump_pct=3, GLOBAL innodb_buffer_pool_dump_now = ON;
+# Set the lower Boundary value
+SET GLOBAL innodb_buffer_pool_dump_pct=1;
-# Wait for the dump to complete
-let $wait_condition =
- SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at '
- FROM information_schema.global_status
- WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
--- source include/wait_condition.inc
+# Check the value is 1
+SELECT @@global.innodb_buffer_pool_dump_pct;
-# Confirm that the dump file has been created
--- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
--- file_exists $file
+# Set the upper boundary value
+SET GLOBAL innodb_buffer_pool_dump_pct=100;
---disable_warnings
-SET GLOBAL innodb_buffer_pool_dump_pct=0;
+# Check the value is 100
SELECT @@global.innodb_buffer_pool_dump_pct;
-SHOW WARNINGS;
+
+# Set the beyond upper boundary value
SET GLOBAL innodb_buffer_pool_dump_pct=101;
+
+# Check the value is 100
SELECT @@global.innodb_buffer_pool_dump_pct;
-SHOW WARNINGS;
---enable_warnings
-SET GLOBAL innodb_buffer_pool_dump_pct=@orig;
+# Set the beyond lower boundary value
+SET GLOBAL innodb_buffer_pool_dump_pct=-1;
+
+# Check the value is 1
+SELECT @@global.innodb_buffer_pool_dump_pct;
+
+# Set the Default value
+SET GLOBAL innodb_buffer_pool_dump_pct=Default;
+
+# Check the default value
+SELECT @@global.innodb_buffer_pool_dump_pct;
+
+# Set with some invalid value
+--error ER_WRONG_TYPE_FOR_VAR
+SET GLOBAL innodb_buffer_pool_dump_pct='foo';
+
+# Set without using Global
+--error ER_GLOBAL_VARIABLE
+SET innodb_buffer_pool_dump_pct=50;
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
deleted file mode 100644
index c50d2d66dff..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_filename_basic.test
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Basic test for innodb_buffer_pool_filename
-#
-
--- source include/have_innodb.inc
-
-# Check the default value and save for later restoration
-SET @orig = @@global.innodb_buffer_pool_filename;
-SELECT @orig;
-
-let $old_val=query_get_value(SHOW STATUS LIKE 'innodb_buffer_pool_dump_status', Value, 1);
-sleep 1; # to ensure that the previous and the next dumps are at least a second apart
-
-# Try with a non-default filename
-
-SET GLOBAL innodb_buffer_pool_filename = 'innodb_foobar_dump';
-
-SET GLOBAL innodb_buffer_pool_dump_now = ON;
--- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
-
-# Wait for the dump to complete
-let $wait_condition =
- SELECT variable_value LIKE 'Buffer pool(s) dump completed at %'
- AND variable_value <> '$old_val'
- FROM information_schema.global_status
- WHERE variable_name = 'innodb_buffer_pool_dump_status';
--- source include/wait_condition.inc
-
--- file_exists $file
-
-# Restore the env
-SET GLOBAL innodb_buffer_pool_filename = @orig;
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
index 0960f1fb38b..8785272e10d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_instances_basic.test
@@ -53,17 +53,21 @@ SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_buffer_pool_instances = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_instances);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_instances';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
index a0409901865..701d6a8a96a 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_load_now_basic.test
@@ -20,13 +20,11 @@ let $old_status= `SELECT variable_value FROM information_schema.global_status
# let $wait_condition =
# SELECT TRIM(SUBSTR('$old_status', -8)) != DATE_FORMAT(CURTIME(), '%k:%i:%s');
# -- source include/wait_condition.inc
-
if (`SELECT variable_value LIKE '%dump completed at%' FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status'`)
{
-- sleep 2
}
-
# Do the dump
SET GLOBAL innodb_buffer_pool_dump_now = ON;
@@ -36,7 +34,9 @@ let $wait_condition =
AND SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) dump completed at '
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_dump_status';
+--disable_warnings
-- source include/wait_condition.inc
+--enable_warnings
# Confirm the file is really created
-- let $file = `SELECT CONCAT(@@datadir, @@global.innodb_buffer_pool_filename)`
@@ -50,10 +50,15 @@ let $wait_condition =
SELECT SUBSTR(variable_value, 1, 33) = 'Buffer pool(s) load completed at '
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
+--disable_warnings
-- source include/wait_condition.inc
+--enable_warnings
# Show the status, interesting if the above timed out
+--disable_warnings
-- replace_regex /[0-9]{6}[[:space:]]+[0-9]{1,2}:[0-9]{2}:[0-9]{2}/TIMESTAMP_NOW/
SELECT variable_value
FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_buffer_pool_load_status';
+--enable_warnings
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic-master.opt b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic-master.opt
new file mode 100644
index 00000000000..aa536bf0070
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic-master.opt
@@ -0,0 +1 @@
+--innodb-buffer-pool-chunk-size=2M
diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test
index 190b2d19bc4..c5b4c118da2 100644
--- a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test
@@ -24,6 +24,21 @@
--source include/have_innodb.inc
+--disable_query_log
+if (`select (version() like '%debug%') > 0`)
+{
+ set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
+ set global innodb_disable_resize_buffer_pool_debug = OFF;
+}
+--enable_query_log
+
+let $wait_condition =
+ SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at '
+ FROM information_schema.global_status
+ WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status';
+
+SET @start_buffer_pool_size = @@GLOBAL.innodb_buffer_pool_size;
+
--echo '#---------------------BS_STVARS_022_01----------------------#'
####################################################################
# Displaying default value #
@@ -37,9 +52,9 @@ SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
# Check if Value can set #
####################################################################
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_buffer_pool_size=1;
---echo Expected error 'Read only variable'
+SET @@GLOBAL.innodb_buffer_pool_size=10485760;
+--echo Expected succeeded
+--source include/wait_condition.inc
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
--echo 1 Expected
@@ -52,17 +67,21 @@ SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_buffer_pool_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_size';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_buffer_pool_size);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_buffer_pool_size';
+--enable_warnings
--echo 1 Expected
@@ -100,3 +119,12 @@ SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size;
--echo Expected error 'Readonly variable'
+SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size;
+--source include/wait_condition.inc
+
+--disable_query_log
+if (`select (version() like '%debug%') > 0`)
+{
+ set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
+}
+--enable_query_log
diff --git a/mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test
index 5e081b1a0a4..2094ef3dc0b 100644
--- a/mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_change_buffer_max_size_basic.test
@@ -18,16 +18,20 @@ select @@global.innodb_change_buffer_max_size;
select @@session.innodb_change_buffer_max_size;
show global variables like 'innodb_change_buffer_max_size';
show session variables like 'innodb_change_buffer_max_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffer_max_size';
select * from information_schema.session_variables where variable_name='innodb_change_buffer_max_size';
+--enable_warnings
#
# show that it's writable
#
set global innodb_change_buffer_max_size=10;
select @@global.innodb_change_buffer_max_size;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffer_max_size';
select * from information_schema.session_variables where variable_name='innodb_change_buffer_max_size';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_change_buffer_max_size=1;
@@ -43,10 +47,14 @@ set global innodb_change_buffer_max_size="foo";
set global innodb_change_buffer_max_size=-7;
select @@global.innodb_change_buffer_max_size;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffer_max_size';
+--enable_warnings
set global innodb_change_buffer_max_size=56;
select @@global.innodb_change_buffer_max_size;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffer_max_size';
+--enable_warnings
#
# min/max/DEFAULT values
diff --git a/mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test b/mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test
index abdfddb4c4b..aba3b1e3479 100644
--- a/mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_change_buffering_basic.test
@@ -18,20 +18,26 @@ select @@global.innodb_change_buffering;
select @@session.innodb_change_buffering;
show global variables like 'innodb_change_buffering';
show session variables like 'innodb_change_buffering';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
+--enable_warnings
#
# show that it's writable
#
set global innodb_change_buffering='none';
select @@global.innodb_change_buffering;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
+--enable_warnings
set @@global.innodb_change_buffering='inserts';
select @@global.innodb_change_buffering;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering';
select * from information_schema.session_variables where variable_name='innodb_change_buffering';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_change_buffering='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
index 893d1cb42e3..a6fc09f767e 100644
--- a/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
@@ -13,20 +13,26 @@ select @@global.innodb_change_buffering_debug;
select @@session.innodb_change_buffering_debug;
show global variables like 'innodb_change_buffering_debug';
show session variables like 'innodb_change_buffering_debug';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+--enable_warnings
#
# show that it's writable
#
set global innodb_change_buffering_debug=1;
select @@global.innodb_change_buffering_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+--enable_warnings
set @@global.innodb_change_buffering_debug=0;
select @@global.innodb_change_buffering_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_change_buffering_debug='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
index e7098b7e3b3..bb0f3417f87 100644
--- a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test
@@ -1,5 +1,4 @@
--source include/have_innodb.inc
---source include/not_encrypted.inc
# Check the default value
SET @orig = @@global.innodb_checksum_algorithm;
diff --git a/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test b/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
index c4c39d7d380..5db0a18e8fd 100644
--- a/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_checksums_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_checksums);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_checksums, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_checksums';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_checksums);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_checksums';
+--enable_warnings
--echo 1 Expected
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
index d729acea02c..432c04857ec 100644
--- 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
@@ -26,8 +26,6 @@ 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
@@ -65,5 +63,4 @@ 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_commit_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
index 42d172934d1..4ed706b372b 100644
--- a/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_commit_concurrency_basic.test
@@ -85,26 +85,38 @@ SELECT @@global.innodb_commit_concurrency;
#
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = 1;
+SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = -1;
+SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "T";
+SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_commit_concurrency = "Y";
+SELECT @@global.innodb_commit_concurrency;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_commit_concurrency = 1.1;
+SELECT @@global.innodb_commit_concurrency;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_commit_concurrency = 1001;
+SELECT @@global.innodb_commit_concurrency;
+
+
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_commit_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
SELECT @@global.innodb_commit_concurrency;
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_commit_concurrency';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
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
index 1cdfaa6b31d..315fe2df3c7 100644
--- 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
@@ -87,6 +87,9 @@ 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 = 1.1;
+SELECT @@global.innodb_compression_failure_threshold_pct;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_compression_failure_threshold_pct = "Y";
@@ -94,19 +97,28 @@ SELECT @@global.innodb_compression_failure_threshold_pct;
SET @@global.innodb_compression_failure_threshold_pct = 101;
SELECT @@global.innodb_compression_failure_threshold_pct;
-
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = " ";
+SELECT @@global.innodb_compression_failure_threshold_pct;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_failure_threshold_pct = ' ';
+SELECT @@global.innodb_compression_failure_threshold_pct;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_compression_failure_threshold_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+--enable_warnings
SELECT @@global.innodb_compression_failure_threshold_pct;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_failure_threshold_pct';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
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
index a90abdde2f1..d19d2971fc9 100644
--- a/mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_compression_level_basic.test
@@ -18,16 +18,20 @@ select @@global.innodb_compression_level;
select @@session.innodb_compression_level;
show global variables like 'innodb_compression_level';
show session variables like 'innodb_compression_level';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_compression_level';
select * from information_schema.session_variables where variable_name='innodb_compression_level';
+--enable_warnings
#
# show that it's writable
#
set global innodb_compression_level=2;
select @@global.innodb_compression_level;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_compression_level';
select * from information_schema.session_variables where variable_name='innodb_compression_level';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_compression_level=4;
@@ -43,10 +47,14 @@ set global innodb_compression_level="foo";
set global innodb_compression_level=10;
select @@global.innodb_compression_level;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_compression_level';
+--enable_warnings
set global innodb_compression_level=-7;
select @@global.innodb_compression_level;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_compression_level';
+--enable_warnings
#
# min/max values
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
index 3ca566956ef..1491f705ab2 100644
--- 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
@@ -84,22 +84,34 @@ 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;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = 1.1;
+SELECT @@global.innodb_compression_pad_pct_max;
SET @@global.innodb_compression_pad_pct_max = 76;
SELECT @@global.innodb_compression_pad_pct_max;
-
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = " ";
+SELECT @@global.innodb_compression_pad_pct_max;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_compression_pad_pct_max = ' ';
+SELECT @@global.innodb_compression_pad_pct_max;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_compression_pad_pct_max =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+--enable_warnings
SELECT @@global.innodb_compression_pad_pct_max;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_compression_pad_pct_max';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
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 f73e25179ba..d753b8bc344 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
@@ -59,7 +59,6 @@ SELECT @@innodb_concurrency_tickets;
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_concurrency_tickets;
-
SET global innodb_concurrency_tickets = 0;
SELECT @@global.innodb_concurrency_tickets;
@@ -69,7 +68,6 @@ SELECT @@global.innodb_concurrency_tickets;
# change the value of innodb_concurrency_tickets to a valid value #
##########################################################################
-
SET @@global.innodb_concurrency_tickets = 1;
SELECT @@global.innodb_concurrency_tickets;
@@ -79,15 +77,38 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = 4294967295;
SELECT @@global.innodb_concurrency_tickets;
-
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
+# Check the value of innodb_concurrency_tickets for out of bounds #
+###########################################################################
+
+# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295
+--disable_warnings
+SET @@global.innodb_concurrency_tickets = 4294967296;
+--enable_warnings
+SELECT @@global.innodb_concurrency_tickets IN (4294967296,4294967295);
+
+--disable_warnings
+SET @@global.innodb_concurrency_tickets = 12345678901;
+--enable_warnings
+SELECT @@global.innodb_concurrency_tickets IN (12345678901,4294967295);
+
+--disable_warnings
+SET @@global.innodb_concurrency_tickets = 18446744073709551615;
+--enable_warnings
+SELECT @@global.innodb_concurrency_tickets IN (18446744073709551615,4294967295);
+
+--echo '#--------------------FN_DYNVARS_046_05-------------------------#'
+###########################################################################
# Change the value of innodb_concurrency_tickets to invalid value #
###########################################################################
SET @@global.innodb_concurrency_tickets = -1;
SELECT @@global.innodb_concurrency_tickets;
+SET @@global.innodb_concurrency_tickets = -1024;
+SELECT @@global.innodb_concurrency_tickets;
+
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_concurrency_tickets = "T";
SELECT @@global.innodb_concurrency_tickets;
@@ -96,22 +117,35 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = "Y";
SELECT @@global.innodb_concurrency_tickets;
-SET @@global.innodb_concurrency_tickets = 1001;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = 1.1;
+SELECT @@global.innodb_concurrency_tickets;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = " ";
+SELECT @@global.innodb_concurrency_tickets;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_concurrency_tickets = ' ';
SELECT @@global.innodb_concurrency_tickets;
---echo '#----------------------FN_DYNVARS_046_05------------------------#'
+--echo '#----------------------FN_DYNVARS_046_06------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_concurrency_tickets =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
+--enable_warnings
SELECT @@global.innodb_concurrency_tickets;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_concurrency_tickets';
+--enable_warnings
---echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+--echo '#---------------------FN_DYNVARS_046_07-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
@@ -124,7 +158,7 @@ SELECT @@global.innodb_concurrency_tickets;
SET @@global.innodb_concurrency_tickets = ON;
SELECT @@global.innodb_concurrency_tickets;
---echo '#---------------------FN_DYNVARS_046_07----------------------#'
+--echo '#---------------------FN_DYNVARS_046_08----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test b/mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test
index 1d88c47b1bb..c936744297f 100644
--- a/mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_data_file_path_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_data_file_path);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_data_file_path = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_file_path';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_data_file_path);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_file_path';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test b/mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test
index acf3741d5fa..b6b7999900a 100644
--- a/mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_data_home_dir_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_data_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_home_dir';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
--echo 0 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_data_home_dir';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_default_row_format_basic.test b/mysql-test/suite/sys_vars/t/innodb_default_row_format_basic.test
new file mode 100644
index 00000000000..f9aabf49ba4
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_default_row_format_basic.test
@@ -0,0 +1,41 @@
+--source include/have_innodb.inc
+
+# Check the default value
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 'redundant';
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 'dynamic';
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 'compact';
+SELECT @@global.innodb_default_row_format;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_default_row_format = 'compressed';
+SELECT @@global.innodb_default_row_format;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_default_row_format = 'foobar';
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 0;
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 1;
+SELECT @@global.innodb_default_row_format;
+
+SET GLOBAL innodb_default_row_format = 2;
+SELECT @@global.innodb_default_row_format;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_default_row_format = 3;
+SELECT @@global.innodb_default_row_format;
+
+--error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_default_row_format = 123;
+SELECT @@global.innodb_default_row_format;
+
+
+SET GLOBAL innodb_default_row_format = default;
diff --git a/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test
new file mode 100644
index 00000000000..e381e746c06
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_disable_resize_buffer_pool_debug_basic.test
@@ -0,0 +1,72 @@
+--echo #
+--echo # Basic test for innodb_disable_resize_buffer_pool_debug
+--echo #
+
+--source include/have_innodb.inc
+
+# The config variable is a debug variable
+-- source include/have_debug.inc
+
+SET @start_global_value = @@global.innodb_disable_resize_buffer_pool_debug;
+
+# Check if Value can set
+
+SET @@global.innodb_disable_resize_buffer_pool_debug = 0;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+
+SET @@global.innodb_disable_resize_buffer_pool_debug ='On' ;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+
+SET @@global.innodb_disable_resize_buffer_pool_debug ='Off' ;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+
+SET @@global.innodb_disable_resize_buffer_pool_debug = 1;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
+
+# Check if the value in GLOBAL Table matches value in variable
+
+--disable_warnings
+SELECT IF(@@GLOBAL.innodb_disable_resize_buffer_pool_debug,'ON','OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
+--enable_warnings
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
+--echo 1 Expected
+
+--disable_warnings
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_disable_resize_buffer_pool_debug';
+--enable_warnings
+--echo 1 Expected
+
+# Check if accessing variable with and without GLOBAL point to same variable
+
+SELECT @@innodb_disable_resize_buffer_pool_debug = @@GLOBAL.innodb_disable_resize_buffer_pool_debug;
+--echo 1 Expected
+
+# Check if innodb_disable_resize_buffer_pool_debug can be accessed with and without @@ sign
+
+SELECT COUNT(@@innodb_disable_resize_buffer_pool_debug);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_disable_resize_buffer_pool_debug);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_disable_resize_buffer_pool_debug);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_disable_resize_buffer_pool_debug);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_disable_resize_buffer_pool_debug = @@SESSION.innodb_disable_resize_buffer_pool_debug;
+
+# Cleanup
+
+SET @@global.innodb_disable_resize_buffer_pool_debug = @start_global_value;
+SELECT @@global.innodb_disable_resize_buffer_pool_debug;
diff --git a/mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test b/mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test
index 72dd22cbeb8..1ae10d0f7cf 100644
--- a/mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_doublewrite_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_doublewrite);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_doublewrite, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_doublewrite';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_doublewrite);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_doublewrite';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
index ccdab532737..5e9104b5335 100644
--- a/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
@@ -10,8 +10,10 @@ select @@global.innodb_doublewrite_batch_size;
select @@session.innodb_doublewrite_batch_size;
show global variables like 'innodb_doublewrite_batch_size';
show session variables like 'innodb_doublewrite_batch_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_doublewrite_batch_size';
select * from information_schema.session_variables where variable_name='innodb_doublewrite_batch_size';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
index e1b62046313..9fe9f490aa4 100644
--- a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test
@@ -116,7 +116,15 @@ SELECT @@global.innodb_fast_shutdown;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_fast_shutdown = "0";
SELECT @@global.innodb_fast_shutdown;
-
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_fast_shutdown = 1.1;
+SELECT @@global.innodb_fast_shutdown;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_fast_shutdown = ' ';
+SELECT @@global.innodb_fast_shutdown;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_fast_shutdown = " ";
+SELECT @@global.innodb_fast_shutdown;
--echo '#-------------------FN_DYNVARS_042_05----------------------------#'
###########################################################################
@@ -137,9 +145,11 @@ SET @@local.innodb_fast_shutdown = 0;
# Check if the value in SESSION Table contains variable value #
#########################################################################
+--disable_warnings
SELECT count(VARIABLE_VALUE) AS res_is_0
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_fast_shutdown';
+--enable_warnings
--echo '#----------------------FN_DYNVARS_042_07------------------------#'
@@ -147,9 +157,11 @@ WHERE VARIABLE_NAME='innodb_fast_shutdown';
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_fast_shutdown =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_fast_shutdown';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_042_08-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_basic.test
index bfc092f2f05..739260c07e5 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_basic.test
@@ -18,20 +18,26 @@ select @@global.innodb_file_format;
select @@session.innodb_file_format;
show global variables like 'innodb_file_format';
show session variables like 'innodb_file_format';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
+--enable_warnings
#
# show that it's writable
#
set global innodb_file_format='Antelope';
select @@global.innodb_file_format;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
+--enable_warnings
set @@global.innodb_file_format='Barracuda';
select @@global.innodb_file_format;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_file_format';
select * from information_schema.session_variables where variable_name='innodb_file_format';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_file_format='Salmon';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
index f9f61b9380c..56afba48e29 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_check_basic.test
@@ -19,10 +19,12 @@ SELECT @@global.innodb_file_format_check;
SELECT @@session.innodb_file_format_check;
SHOW global variables LIKE 'innodb_file_format_check';
SHOW session variables LIKE 'innodb_file_format_check';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_check';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_check';
+--enable_warnings
#
# show that it's read only
@@ -53,17 +55,21 @@ SET @@session.innodb_stats_on_metadata='ON';
# Check if the value in GLOBAL Table matches value in variable
#
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_file_format_check, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_format_check);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_format_check';
+--enable_warnings
--echo 1 Expected
#
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
index 18076cfef7f..494f3817cb8 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_format_max_basic.test
@@ -3,7 +3,6 @@
#
--source include/not_embedded.inc
--source include/have_innodb.inc
---source suite/innodb/include/restart_and_reinit.inc
SET @start_global_value = @@global.innodb_file_format_max;
SELECT @start_global_value;
@@ -18,26 +17,32 @@ SELECT @@global.innodb_file_format_max;
SELECT @@session.innodb_file_format_max;
SHOW global variables LIKE 'innodb_file_format_max';
SHOW session variables LIKE 'innodb_file_format_max';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
+--enable_warnings
#
# show that it's writable
#
SET global innodb_file_format_max='Antelope';
SELECT @@global.innodb_file_format_max;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
+--enable_warnings
SET @@global.innodb_file_format_max='Barracuda';
SELECT @@global.innodb_file_format_max;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_file_format_max';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_file_format_max';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_file_format_max='Salmon';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test
index 32cdd0beac4..c701c2ee171 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_io_threads_basic.test
@@ -61,30 +61,38 @@ SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_read_io_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_read_io_threads';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_read_io_threads);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_read_io_threads';
+--enable_warnings
--echo 1 Expected
+--disable_warnings
SELECT @@GLOBAL.innodb_write_io_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_write_io_threads';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_write_io_threads);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_write_io_threads';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic-master.opt b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic-master.opt
new file mode 100644
index 00000000000..9d2c4f807e0
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic-master.opt
@@ -0,0 +1 @@
+--innodb_file_per_table=On
diff --git a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
index 1478d6df2e9..2fd9783e16d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test
@@ -58,17 +58,21 @@ SELECT @@global.innodb_file_per_table;
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_per_table';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_file_per_table);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_file_per_table';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_fill_factor_basic.test b/mysql-test/suite/sys_vars/t/innodb_fill_factor_basic.test
new file mode 100644
index 00000000000..8e4caae0088
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_fill_factor_basic.test
@@ -0,0 +1,41 @@
+
+#
+# 2014-03-26 - Added
+#
+
+--source include/have_innodb.inc
+
+#
+# show the global and session values;
+#
+select @@global.innodb_fill_factor;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_fill_factor;
+show global variables like 'innodb_fill_factor';
+show session variables like 'innodb_fill_factor';
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_fill_factor';
+select * from information_schema.session_variables where variable_name='innodb_fill_factor';
+--enable_warnings
+
+#
+# test default, min, max value
+#
+let $innodb_fill_factor_orig=`select @@innodb_fill_factor`;
+
+set global innodb_fill_factor=9;
+select @@innodb_fill_factor;
+
+set global innodb_fill_factor=10;
+select @@innodb_fill_factor;
+
+set global innodb_fill_factor=75;
+select @@innodb_fill_factor;
+
+set global innodb_fill_factor=100;
+select @@innodb_fill_factor;
+
+set global innodb_fill_factor=101;
+select @@innodb_fill_factor;
+
+eval set global innodb_fill_factor=$innodb_fill_factor_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
index 0ab079adaa8..09a790fc3b6 100644
--- 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
@@ -101,18 +101,31 @@ SELECT @@global.innodb_flush_log_at_timeout;
SET @@global.innodb_flush_log_at_timeout = 2701;
SELECT @@global.innodb_flush_log_at_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = ' ';
+SELECT @@global.innodb_flush_log_at_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = " ";
+SELECT @@global.innodb_flush_log_at_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_timeout = 1.1;
+SELECT @@global.innodb_flush_log_at_timeout;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_flush_log_at_timeout =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+--enable_warnings
SELECT @@global.innodb_flush_log_at_timeout;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_timeout';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test
index 56cfc2ffebe..34510cdb462 100644
--- a/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_log_at_trx_commit_basic.test
@@ -56,6 +56,11 @@ SELECT @@global.innodb_flush_log_at_trx_commit;
# Check if variable can be accessed with and without @@ sign #
###############################################################################
+--Error ER_GLOBAL_VARIABLE
+SET innodb_flush_log_at_trx_commit = 1;
+SELECT @@innodb_flush_log_at_trx_commit;
+
+
--Error ER_UNKNOWN_TABLE
SELECT local.innodb_flush_log_at_trx_commit;
@@ -96,18 +101,35 @@ SELECT @@global.innodb_flush_log_at_trx_commit;
SET @@global.innodb_flush_log_at_trx_commit = 1001;
SELECT @@global.innodb_flush_log_at_trx_commit;
+
+SET @@global.innodb_flush_log_at_trx_commit = 100156787;
+SELECT @@global.innodb_flush_log_at_trx_commit;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_trx_commit = " ";
+SELECT @@global.innodb_flush_log_at_trx_commit;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_trx_commit = 1.1;
+SELECT @@global.innodb_flush_log_at_trx_commit;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flush_log_at_trx_commit = ' ';
+SELECT @@global.innodb_flush_log_at_trx_commit;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_flush_log_at_trx_commit =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_trx_commit';
+--enable_warnings
SELECT @@global.innodb_flush_log_at_trx_commit;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_log_at_trx_commit';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test
index 75af00e33af..9f99c1305fd 100644
--- a/mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_method_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_flush_method);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_flush_method = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_method';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_flush_method);
--echo 0 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flush_method';
+--enable_warnings
--echo 1 Expected
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 698e30b6669..671e6f58310 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
@@ -16,32 +16,44 @@ select @@global.innodb_flush_neighbors;
select @@session.innodb_flush_neighbors;
show global variables like 'innodb_flush_neighbors';
show session variables like 'innodb_flush_neighbors';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
#
# show that it's writable
#
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
set @@global.innodb_flush_neighbors=TRUE;
select @@global.innodb_flush_neighbors;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
set global innodb_flush_neighbors=0;
select @@global.innodb_flush_neighbors;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
set @@global.innodb_flush_neighbors=2;
select @@global.innodb_flush_neighbors;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
set @@global.innodb_flush_neighbors=DEFAULT;
select @@global.innodb_flush_neighbors;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_flush_neighbors';
select * from information_schema.session_variables where variable_name='innodb_flush_neighbors';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_flush_neighbors=0;
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test b/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
new file mode 100644
index 00000000000..a73575864bd
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_flush_sync_basic.test
@@ -0,0 +1,77 @@
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_flush_sync;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+--echo Valid values are 'ON' and 'OFF'
+select @@global.innodb_flush_sync in (0, 1);
+select @@global.innodb_flush_sync;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_flush_sync;
+show global variables like 'innodb_flush_sync';
+show session variables like 'innodb_flush_sync';
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+
+#
+# show that it's writable
+#
+set global innodb_flush_sync='OFF';
+select @@global.innodb_flush_sync;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+set @@global.innodb_flush_sync=1;
+select @@global.innodb_flush_sync;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+set global innodb_flush_sync=0;
+select @@global.innodb_flush_sync;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+set @@global.innodb_flush_sync='ON';
+select @@global.innodb_flush_sync;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+--error ER_GLOBAL_VARIABLE
+set session innodb_flush_sync='OFF';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_flush_sync='ON';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_flush_sync=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_flush_sync=1e1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_flush_sync=2;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_flush_sync=-3;
+select @@global.innodb_flush_sync;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_flush_sync';
+select * from information_schema.session_variables where variable_name='innodb_flush_sync';
+--enable_warnings
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_flush_sync='AUTO';
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_flush_sync = @start_global_value;
+SELECT @@global.innodb_flush_sync;
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
index a84e623f2c3..f23f9697197 100644
--- 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
@@ -94,18 +94,28 @@ SELECT @@global.innodb_flushing_avg_loops;
SET @@global.innodb_flushing_avg_loops = 1001;
SELECT @@global.innodb_flushing_avg_loops;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = ' ';
+SELECT @@global.innodb_flushing_avg_loops;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_flushing_avg_loops = " ";
+SELECT @@global.innodb_flushing_avg_loops;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_flushing_avg_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+--enable_warnings
SELECT @@global.innodb_flushing_avg_loops;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_flushing_avg_loops';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
index 1726b320f47..f12f2f670a4 100644
--- a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_load_corrupted';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test
index f5aa769f09f..a62c895c202 100644
--- a/mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_force_recovery_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_force_recovery);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_force_recovery = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_recovery';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_force_recovery);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_force_recovery';
+--enable_warnings
--echo 1 Expected
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
index 5eefe1b9219..cfbd10c4e31 100644
--- 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
@@ -10,8 +10,10 @@ select @@global.innodb_force_recovery_crash;
select @@session.innodb_force_recovery_crash;
show global variables like 'innodb_force_recovery_crash';
show session variables like 'innodb_force_recovery_crash';
+--disable_warnings
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';
+--enable_warnings
# show that it's read-only
#
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test
index 2ea99cf9835..04ca34c2b19 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_aux_table_basic.test
@@ -15,8 +15,10 @@ SELECT @start_global_value;
select @@session.innodb_ft_aux_table;
show global variables like 'innodb_ft_aux_table';
show session variables like 'innodb_ft_aux_table';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_aux_table';
select * from information_schema.session_variables where variable_name='innodb_ft_aux_table';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_ft_aux_table='Salmon';
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
index f6d62835f0a..30bcd08d4dd 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_cache_size_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_ft_cache_size;
select @@session.innodb_ft_cache_size;
show global variables like 'innodb_ft_cache_size';
show session variables like 'innodb_ft_cache_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_cache_size';
select * from information_schema.session_variables where variable_name='innodb_ft_cache_size';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test
index ebe9cc556ec..630ada004df 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_enable_diag_print_basic.test
@@ -18,28 +18,38 @@ select @@global.innodb_ft_enable_diag_print;
select @@session.innodb_ft_enable_diag_print;
show global variables like 'innodb_ft_enable_diag_print';
show session variables like 'innodb_ft_enable_diag_print';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
#
# show that it's writable
#
set global innodb_ft_enable_diag_print='OFF';
select @@global.innodb_ft_enable_diag_print;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
set @@global.innodb_ft_enable_diag_print=1;
select @@global.innodb_ft_enable_diag_print;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
set global innodb_ft_enable_diag_print=0;
select @@global.innodb_ft_enable_diag_print;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
set @@global.innodb_ft_enable_diag_print='ON';
select @@global.innodb_ft_enable_diag_print;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_ft_enable_diag_print='OFF';
--error ER_GLOBAL_VARIABLE
@@ -57,8 +67,10 @@ set global innodb_ft_enable_diag_print=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_enable_diag_print=-3;
select @@global.innodb_ft_enable_diag_print;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_diag_print';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_diag_print';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_enable_diag_print='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test
index 1a983a3d7e6..5eb5af4df23 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_enable_stopword_basic.test
@@ -18,8 +18,10 @@ select @@session.innodb_ft_enable_stopword in (0, 1);
select @@session.innodb_ft_enable_stopword;
show global variables like 'innodb_ft_enable_stopword';
show session variables like 'innodb_ft_enable_stopword';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
#
# show that it's writable
@@ -28,26 +30,34 @@ set global innodb_ft_enable_stopword='OFF';
set session innodb_ft_enable_stopword='OFF';
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
set @@global.innodb_ft_enable_stopword=1;
set @@session.innodb_ft_enable_stopword=1;
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
set global innodb_ft_enable_stopword=0;
set session innodb_ft_enable_stopword=0;
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
set @@global.innodb_ft_enable_stopword='ON';
set @@session.innodb_ft_enable_stopword='ON';
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
#
# incorrect types
@@ -74,8 +84,10 @@ set global innodb_ft_enable_stopword=-3;
set session innodb_ft_enable_stopword=-7;
select @@global.innodb_ft_enable_stopword;
select @@session.innodb_ft_enable_stopword;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_enable_stopword';
select * from information_schema.session_variables where variable_name='innodb_ft_enable_stopword';
+--enable_warnings
#
# Cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test
index e75517466d7..8f6f93f7517 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_max_token_size_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_ft_max_token_size;
select @@session.innodb_ft_max_token_size;
show global variables like 'innodb_ft_max_token_size';
show session variables like 'innodb_ft_max_token_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_max_token_size';
select * from information_schema.session_variables where variable_name='innodb_ft_max_token_size';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test
index edf63c70782..753985e1af0 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_min_token_size_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_ft_min_token_size;
select @@session.innodb_ft_min_token_size;
show global variables like 'innodb_ft_min_token_size';
show session variables like 'innodb_ft_min_token_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_min_token_size';
select * from information_schema.session_variables where variable_name='innodb_ft_min_token_size';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test
index 255caf86116..f288398e595 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_num_word_optimize_basic.test
@@ -18,16 +18,20 @@ select @@global.innodb_ft_num_word_optimize;
select @@session.innodb_ft_num_word_optimize;
show global variables like 'innodb_ft_num_word_optimize';
show session variables like 'innodb_ft_num_word_optimize';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_num_word_optimize';
select * from information_schema.session_variables where variable_name='innodb_ft_num_word_optimize';
+--enable_warnings
#
# show that it's writable
#
set global innodb_ft_num_word_optimize=1000;
select @@global.innodb_ft_num_word_optimize;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_num_word_optimize';
select * from information_schema.session_variables where variable_name='innodb_ft_num_word_optimize';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_ft_num_word_optimize=1000;
@@ -43,7 +47,9 @@ set global innodb_ft_num_word_optimize="foo";
set global innodb_ft_num_word_optimize=-7;
select @@global.innodb_ft_num_word_optimize;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_num_word_optimize';
+--enable_warnings
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test
index 245ed4abdfb..0a797a5ab5d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test
@@ -5,11 +5,6 @@
--source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
-
#
# show the global and session values;
#
@@ -18,8 +13,10 @@ select @@global.innodb_ft_result_cache_limit;
select @@session.innodb_ft_result_cache_limit;
show global variables like 'innodb_ft_result_cache_limit';
show session variables like 'innodb_ft_result_cache_limit';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_result_cache_limit';
select * from information_schema.session_variables where variable_name='innodb_ft_result_cache_limit';
+--enable_warnings
#
# test default, min, max value
@@ -32,7 +29,10 @@ select @@innodb_ft_result_cache_limit;
set global innodb_ft_result_cache_limit=1000000;
select @@innodb_ft_result_cache_limit;
-set global innodb_ft_result_cache_limit=4000000000;
+set global innodb_ft_result_cache_limit=4294967295;
+select @@innodb_ft_result_cache_limit;
+
+set global innodb_ft_result_cache_limit=4*1024*1024*1024;
select @@innodb_ft_result_cache_limit;
eval set global innodb_ft_result_cache_limit=$innodb_ft_result_cache_limit_orig;
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test
index e227e790a1d..5de822a54e5 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_server_stopword_table_basic.test
@@ -15,8 +15,12 @@ SELECT @start_global_value;
select @@session.innodb_ft_server_stopword_table;
show global variables like 'innodb_ft_server_stopword_table';
show session variables like 'innodb_ft_server_stopword_table';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_server_stopword_table';
select * from information_schema.session_variables where variable_name='innodb_ft_server_stopword_table';
+--enable_warnings
+
+call mtr.add_suppression("\\[ERROR\\] InnoDB: user stopword table Salmon does not exist.");
--error ER_GLOBAL_VARIABLE
set session innodb_ft_server_stopword_table='Salmon';
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test
index 3cf55f6700b..cacd6a690b8 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_sort_pll_degree_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_ft_sort_pll_degree;
select @@session.innodb_ft_sort_pll_degree;
show global variables like 'innodb_ft_sort_pll_degree';
show session variables like 'innodb_ft_sort_pll_degree';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_sort_pll_degree';
select * from information_schema.session_variables where variable_name='innodb_ft_sort_pll_degree';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
index 772ec5a1919..207ec64b705 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_total_cache_size_basic.test
@@ -1,9 +1,9 @@
---source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
+#
+# 2011-11-17 - Added
+#
+
+--source include/have_innodb.inc
#
# show the global and session values;
@@ -13,8 +13,10 @@ select @@global.innodb_ft_total_cache_size;
select @@session.innodb_ft_total_cache_size;
show global variables like 'innodb_ft_total_cache_size';
show session variables like 'innodb_ft_total_cache_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_total_cache_size';
select * from information_schema.session_variables where variable_name='innodb_ft_total_cache_size';
+--enable_warnings
#
# show that it's read-only
@@ -24,4 +26,3 @@ set global innodb_ft_total_cache_size=1;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
set session innodb_ft_total_cache_size=1;
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test
index 159e570b3ce..475bf8df526 100644
--- a/mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_ft_user_stopword_table_basic.test
@@ -16,8 +16,12 @@ select @@session.innodb_ft_user_stopword_table;
show global variables like 'innodb_ft_user_stopword_table';
show session variables like 'innodb_ft_user_stopword_table';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_ft_user_stopword_table';
select * from information_schema.session_variables where variable_name='innodb_ft_user_stopword_table';
+--enable_warnings
+
+call mtr.add_suppression("\\[ERROR\\] InnoDB: user stopword table Salmon does not exist.");
--error ER_WRONG_VALUE_FOR_VAR
set session innodb_ft_user_stopword_table='Salmon';
@@ -35,4 +39,3 @@ set global innodb_ft_user_stopword_table=1e1;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_ft_user_stopword_table='Salmon';
-SET @@session.innodb_ft_user_stopword_table=@start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
index 8d3f3afa0a9..877fe17b003 100644
--- a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test
@@ -18,28 +18,38 @@ select @@global.innodb_large_prefix;
select @@session.innodb_large_prefix;
show global variables like 'innodb_large_prefix';
show session variables like 'innodb_large_prefix';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
#
# show that it's writable
#
set global innodb_large_prefix='OFF';
select @@global.innodb_large_prefix;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
set @@global.innodb_large_prefix=1;
select @@global.innodb_large_prefix;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
set global innodb_large_prefix=0;
select @@global.innodb_large_prefix;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
set @@global.innodb_large_prefix='ON';
select @@global.innodb_large_prefix;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_large_prefix='OFF';
--error ER_GLOBAL_VARIABLE
@@ -57,8 +67,10 @@ set global innodb_large_prefix=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix=-3;
select @@global.innodb_large_prefix;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_large_prefix';
select * from information_schema.session_variables where variable_name='innodb_large_prefix';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_large_prefix='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test
index 7998297c69e..8f2271cbd7f 100644
--- a/mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test
@@ -12,20 +12,26 @@ select @@global.innodb_limit_optimistic_insert_debug;
select @@session.innodb_limit_optimistic_insert_debug;
show global variables like 'innodb_limit_optimistic_insert_debug';
show session variables like 'innodb_limit_optimistic_insert_debug';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_limit_optimistic_insert_debug';
select * from information_schema.session_variables where variable_name='innodb_limit_optimistic_insert_debug';
+--enable_warnings
#
# show that it's writable
#
set global innodb_limit_optimistic_insert_debug=1;
select @@global.innodb_limit_optimistic_insert_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_limit_optimistic_insert_debug';
select * from information_schema.session_variables where variable_name='innodb_limit_optimistic_insert_debug';
+--enable_warnings
set @@global.innodb_limit_optimistic_insert_debug=0;
select @@global.innodb_limit_optimistic_insert_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_limit_optimistic_insert_debug';
select * from information_schema.session_variables where variable_name='innodb_limit_optimistic_insert_debug';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_limit_optimistic_insert_debug='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
index f80b8e48736..a2aecf4ca8a 100644
--- a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test
@@ -50,17 +50,21 @@ SELECT @@session.innodb_lock_wait_timeout;
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_lock_wait_timeout = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_lock_wait_timeout';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_lock_wait_timeout';
+--enable_warnings
--echo 1 Expected
@@ -93,6 +97,73 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout);
SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout;
#
+# check the default value
+#
+set @@global.innodb_lock_wait_timeout=100;
+set @@global.innodb_lock_wait_timeout=DEFAULT;
+select @@global.innodb_lock_wait_timeout;
+set @@session.innodb_lock_wait_timeout=100;
+set @@session.innodb_lock_wait_timeout=DEFAULT;
+select @@session.innodb_lock_wait_timeout;
+
+#
+# check for valid values
+#
+
+SET @@global.innodb_lock_wait_timeout=1;
+SELECT @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout=1024;
+SELECT @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout=1073741824;
+SELECT @@global.innodb_lock_wait_timeout;
+
+SET @@session.innodb_lock_wait_timeout=1;
+SELECT @@session.innodb_lock_wait_timeout;
+SET @@session.innodb_lock_wait_timeout=1024;
+SELECT @@session.innodb_lock_wait_timeout;
+SET @@session.innodb_lock_wait_timeout=1073741824;
+SELECT @@session.innodb_lock_wait_timeout;
+
+#
+# check for invalid values
+#
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_lock_wait_timeout="t";
+SELECT @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout=-1024;
+SELECT @@global.innodb_lock_wait_timeout;
+SET @@global.innodb_lock_wait_timeout=1073741825;
+SELECT @@global.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_lock_wait_timeout=" ";
+SELECT @@global.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_lock_wait_timeout=' ';
+SELECT @@global.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_lock_wait_timeout=1.1;
+SELECT @@global.innodb_lock_wait_timeout;
+
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.innodb_lock_wait_timeout="T";
+SELECT @@session.innodb_lock_wait_timeout;
+SET @@session.innodb_lock_wait_timeout=-1024;
+SELECT @@session.innodb_lock_wait_timeout;
+SET @@session.innodb_lock_wait_timeout=1073999999;
+SELECT @@session.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.innodb_lock_wait_timeout=' ';
+SELECT @@session.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.innodb_lock_wait_timeout=" ";
+SELECT @@session.innodb_lock_wait_timeout;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@session.innodb_lock_wait_timeout=1.1;
+SELECT @@session.innodb_lock_wait_timeout;
+
+
+
# Cleanup
#
diff --git a/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test b/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
index 08792d299a1..755c5c62c70 100644
--- a/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_locks_unsafe_for_binlog_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_locks_unsafe_for_binlog, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_locks_unsafe_for_binlog);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_locks_unsafe_for_binlog';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test
index 74c1aeab87a..550bba0c0b7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_buffer_size_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_log_buffer_size);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_log_buffer_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_buffer_size';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_log_buffer_size);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_buffer_size';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test
index 00aa476e8d2..331803fff86 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test
@@ -1 +1,79 @@
---echo XtraDB extension
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+SET @start_global_value = @@global.innodb_log_checkpoint_now;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.innodb_log_checkpoint_now in (0, 1);
+select @@global.innodb_log_checkpoint_now;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_log_checkpoint_now;
+show global variables like 'innodb_log_checkpoint_now';
+show session variables like 'innodb_log_checkpoint_now';
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+--enable_warnings
+
+#
+# show that it's writable
+#
+set global innodb_log_checkpoint_now=1;
+# Should always be OFF
+select @@global.innodb_log_checkpoint_now;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+--enable_warnings
+
+set @@global.innodb_log_checkpoint_now=0;
+# Should always be OFF
+select @@global.innodb_log_checkpoint_now;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+--enable_warnings
+
+set global innodb_log_checkpoint_now=ON;
+# Should always be OFF
+select @@global.innodb_log_checkpoint_now;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+--enable_warnings
+
+set global innodb_log_checkpoint_now=OFF;
+# Should always be OFF
+select @@global.innodb_log_checkpoint_now;
+--disable_warnings
+select * from information_schema.global_variables where variable_name='innodb_log_checkpoint_now';
+select * from information_schema.session_variables where variable_name='innodb_log_checkpoint_now';
+--enable_warnings
+
+--error ER_GLOBAL_VARIABLE
+set session innodb_log_checkpoint_now='some';
+
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_log_checkpoint_now='some';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_log_checkpoint_now=1.1;
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_log_checkpoint_now='foo';
+--error ER_WRONG_VALUE_FOR_VAR
+set global innodb_log_checkpoint_now=-2;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_log_checkpoint_now=1e1;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_log_checkpoint_now = @start_global_value;
+SELECT @@global.innodb_log_checkpoint_now;
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_checksums_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_checksums_basic.test
new file mode 100644
index 00000000000..8ebc9f1652b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_log_checksums_basic.test
@@ -0,0 +1,36 @@
+--source include/have_innodb.inc
+
+# Check the default value
+SET @orig = @@global.innodb_log_checksums;
+SELECT @orig;
+
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_log_checksums = 'crc32';
+SELECT @@global.innodb_log_checksums;
+
+-- error ER_WRONG_VALUE_FOR_VAR
+SET GLOBAL innodb_log_checksums = 2;
+SELECT @@global.innodb_log_checksums;
+
+-- error ER_WRONG_TYPE_FOR_VAR
+SET GLOBAL innodb_log_checksums = 1e2;
+SELECT @@global.innodb_log_checksums;
+
+-- error ER_WRONG_TYPE_FOR_VAR
+SET GLOBAL innodb_log_checksums = 1.0;
+SELECT @@global.innodb_log_checksums;
+
+-- error ER_GLOBAL_VARIABLE
+SET innodb_log_checksums = OFF;
+SELECT @@global.innodb_log_checksums;
+
+SET GLOBAL innodb_log_checksums = OFF;
+SELECT @@global.innodb_log_checksums;
+
+SET GLOBAL innodb_log_checksums = default;
+
+SET GLOBAL innodb_log_checksums = ON;
+SELECT @@global.innodb_log_checksums;
+
+SET GLOBAL innodb_log_checksums = @orig;
+SELECT @@global.innodb_log_checksums;
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test
index 8d10309ae02..2c83a36a0fd 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test
@@ -1,10 +1,5 @@
--source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
-
SET @start_global_value = @@global.innodb_log_compressed_pages;
SELECT @start_global_value;
@@ -39,17 +34,21 @@ SELECT @@global.innodb_log_compressed_pages;
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_log_compressed_pages,'ON','OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_compressed_pages';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_log_compressed_pages);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_compressed_pages';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test
index 08925b73957..21fd2a80021 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_file_size_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_log_file_size);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_log_file_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_file_size';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_log_file_size);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_file_size';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test
index 67978efe76a..60046bd09e6 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_files_in_group_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_log_files_in_group);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_log_files_in_group = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_files_in_group';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_log_files_in_group);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_files_in_group';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test
index 7e3969c6bd7..d6d5446c4c7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_log_group_home_dir_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_log_group_home_dir);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_log_group_home_dir = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_group_home_dir';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_log_group_home_dir);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_log_group_home_dir';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test
new file mode 100644
index 00000000000..8693c6a7b1b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_log_write_ahead_size_basic.test
@@ -0,0 +1,93 @@
+--source include/have_innodb.inc
+
+SET @start_global_value = @@global.innodb_log_write_ahead_size;
+
+# default value is limited by innodb_page_size and varying along with the page size.
+#SELECT @start_global_value;
+
+#set common valid value
+SET global innodb_log_write_ahead_size=4096;
+
+#
+# exists as global only
+#
+--echo Valid values are positive number
+SELECT @@global.innodb_log_write_ahead_size >= 512;
+SELECT @@global.innodb_log_write_ahead_size <= 16*1024;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.innodb_log_write_ahead_size;
+SHOW global variables LIKE 'innodb_log_write_ahead_size';
+SHOW session variables LIKE 'innodb_log_write_ahead_size';
+--disable_warnings
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+--enable_warnings
+
+#
+# show that it's writable
+#
+SET global innodb_log_write_ahead_size=1024;
+SELECT @@global.innodb_log_write_ahead_size;
+--disable_warnings
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+SELECT * FROM information_schema.session_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+--enable_warnings
+--error ER_GLOBAL_VARIABLE
+SET session innodb_log_write_ahead_size=2048;
+
+#
+# Valid values
+#
+SET global innodb_log_write_ahead_size=512;
+SELECT @@global.innodb_log_write_ahead_size;
+SET global innodb_log_write_ahead_size=2048;
+SELECT @@global.innodb_log_write_ahead_size;
+SET global innodb_log_write_ahead_size=4096;
+SELECT @@global.innodb_log_write_ahead_size;
+
+# limited by innodb_page_size, and the followings are occationally invalid
+#SET global innodb_log_write_ahead_size=8192;
+#SELECT @@global.innodb_log_write_ahead_size;
+#SET global innodb_log_write_ahead_size=16384;
+#SELECT @@global.innodb_log_write_ahead_size;
+
+#
+# Invalid values
+#
+SET global innodb_log_write_ahead_size=0;
+SELECT @@global.innodb_log_write_ahead_size;
+SET global innodb_log_write_ahead_size=-1024;
+SELECT @@global.innodb_log_write_ahead_size;
+SET global innodb_log_write_ahead_size=3000;
+SELECT @@global.innodb_log_write_ahead_size;
+
+# limited by innodb_page_size, and the followings result occationally different
+#SET global innodb_log_write_ahead_size=32768;
+#SELECT @@global.innodb_log_write_ahead_size;
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_log_write_ahead_size=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_log_write_ahead_size=1e1;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_log_write_ahead_size="foo";
+SET global innodb_log_write_ahead_size=-7;
+SELECT @@global.innodb_log_write_ahead_size;
+--disable_warnings
+SELECT * FROM information_schema.global_variables
+WHERE variable_name='innodb_log_write_ahead_size';
+--enable_warnings
+
+#
+# cleanup
+#
+
+SET @@global.innodb_log_write_ahead_size = @start_global_value;
diff --git a/mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test b/mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test
index 12211308410..8f08a1bff14 100644
--- a/mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_lru_scan_depth_basic.test
@@ -18,16 +18,20 @@ select @@global.innodb_lru_scan_depth;
select @@session.innodb_lru_scan_depth;
show global variables like 'innodb_lru_scan_depth';
show session variables like 'innodb_lru_scan_depth';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_lru_scan_depth';
select * from information_schema.session_variables where variable_name='innodb_lru_scan_depth';
+--enable_warnings
#
# show that it's writable
#
set global innodb_lru_scan_depth=325;
select @@global.innodb_lru_scan_depth;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_lru_scan_depth';
select * from information_schema.session_variables where variable_name='innodb_lru_scan_depth';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_lru_scan_depth=444;
@@ -43,10 +47,14 @@ set global innodb_lru_scan_depth="foo";
set global innodb_lru_scan_depth=7;
select @@global.innodb_lru_scan_depth;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_lru_scan_depth';
+--enable_warnings
set global innodb_lru_scan_depth=-7;
select @@global.innodb_lru_scan_depth;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_lru_scan_depth';
+--enable_warnings
#
# min/max values
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
index 5b4eaa41598..e8cc46086bc 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test
@@ -31,20 +31,29 @@
######################################################################
-################################################################################
+################################################################################
# Saving initial value of innodb_max_dirty_pages_pct in a temporary variable #
-################################################################################
+################################################################################
SET @global_start_value = @@global.innodb_max_dirty_pages_pct;
SELECT @global_start_value;
+# need this because setting innodb_max_dirty_pages_pct to lower than this
+# should cause a warning
+SET @global_start_max_dirty_lwm_value = @@global.innodb_max_dirty_pages_pct_lwm;
+SELECT @global_start_max_dirty_lwm_value;
+
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
--echo '#--------------------FN_DYNVARS_046_01------------------------#'
-########################################################################
+########################################################################
# Display the DEFAULT value of innodb_max_dirty_pages_pct #
-########################################################################
+########################################################################
SET @@global.innodb_max_dirty_pages_pct = 0;
-SET @@global.innodb_max_dirty_pages_pct = @global_start_value;
+SET @@global.innodb_max_dirty_pages_pct = DEFAULT;
SELECT @@global.innodb_max_dirty_pages_pct;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
@@ -63,11 +72,11 @@ SET global innodb_max_dirty_pages_pct = 0;
SELECT @@global.innodb_max_dirty_pages_pct;
--echo '#--------------------FN_DYNVARS_046_03------------------------#'
-##########################################################################
+##########################################################################
# change the value of innodb_max_dirty_pages_pct to a valid value #
-##########################################################################
+##########################################################################
-SET @@global.innodb_max_dirty_pages_pct = 0;
+SET @@global.innodb_max_dirty_pages_pct = 0.0;
SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = 1;
@@ -75,14 +84,26 @@ SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = 99;
SELECT @@global.innodb_max_dirty_pages_pct;
---echo '#--------------------FN_DYNVARS_046_04-------------------------#'
-###########################################################################
+--echo '#--------------------FN_DYNVARS_046_04------------------------#'
+##########################################################################
+# change value of based on innodb_max_dirty_pages_pct_lwm #
+##########################################################################
+SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_value - 1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+# this should cause warning
+SET @@global.innodb_max_dirty_pages_pct = @global_start_value - 2;
+SELECT @@global.innodb_max_dirty_pages_pct;
+
+--echo '#--------------------FN_DYNVARS_046_05-------------------------#'
+###########################################################################
# Change the value of innodb_max_dirty_pages_pct to invalid value #
-###########################################################################
+###########################################################################
SET @@global.innodb_max_dirty_pages_pct = -1;
SELECT @@global.innodb_max_dirty_pages_pct;
-
+SET @@global.innodb_max_dirty_pages_pct = -1024;
+SELECT @@global.innodb_max_dirty_pages_pct;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_dirty_pages_pct = "T";
SELECT @@global.innodb_max_dirty_pages_pct;
@@ -91,26 +112,49 @@ SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = "Y";
SELECT @@global.innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct = 100;
+SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = 1001;
SELECT @@global.innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct = 100000;
+SELECT @@global.innodb_max_dirty_pages_pct;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct = ' ';
+SELECT @@global.innodb_max_dirty_pages_pct;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct = " ";
+SELECT @@global.innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct = 1.1;
+SELECT @@global.innodb_max_dirty_pages_pct;
+set global innodb_max_dirty_pages_pct = 0.1;
+SELECT @@global.innodb_max_dirty_pages_pct;
+set global innodb_max_dirty_pages_pct = 31.34;
+SELECT @@global.innodb_max_dirty_pages_pct;
+set global innodb_max_dirty_pages_pct = 100;
+SELECT @@global.innodb_max_dirty_pages_pct;
+set global innodb_max_dirty_pages_pct = 99.999;
+SELECT @@global.innodb_max_dirty_pages_pct;
-
---echo '#----------------------FN_DYNVARS_046_05------------------------#'
-#########################################################################
+--echo '#----------------------FN_DYNVARS_046_06------------------------#'
+#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_max_dirty_pages_pct =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct';
+--enable_warnings
SELECT @@global.innodb_max_dirty_pages_pct;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct';
+--enable_warnings
---echo '#---------------------FN_DYNVARS_046_06-------------------------#'
-###################################################################
+--echo '#---------------------FN_DYNVARS_046_07-------------------------#'
+###################################################################
# Check if ON and OFF values can be used on variable #
-###################################################################
+###################################################################
--ERROR ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_dirty_pages_pct = OFF;
@@ -120,23 +164,26 @@ SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = ON;
SELECT @@global.innodb_max_dirty_pages_pct;
---echo '#---------------------FN_DYNVARS_046_07----------------------#'
-###################################################################
+--echo '#---------------------FN_DYNVARS_046_08----------------------#'
+###################################################################
# Check if TRUE and FALSE values can be used on variable #
-###################################################################
+###################################################################
SET @@global.innodb_max_dirty_pages_pct = TRUE;
SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = FALSE;
SELECT @@global.innodb_max_dirty_pages_pct;
-##############################
+##############################
# Restore initial value #
##############################
SET @@global.innodb_max_dirty_pages_pct = @global_start_value;
SELECT @@global.innodb_max_dirty_pages_pct;
+SET @@global.innodb_max_dirty_pages_pct_lwm = @global_start_max_dirty_lwm_value;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
###############################################################
# END OF innodb_max_dirty_pages_pct TESTS #
-###############################################################
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
index 62c88f43ebd..c7a9e567e69 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
@@ -33,15 +33,22 @@ SET @innodb_max_dirty_pages_pct = @@global.innodb_max_dirty_pages_pct;
############################################################################
SET @@global.innodb_max_dirty_pages_pct = 80;
+--echo 'connect (con1,localhost,root,,,,)'
connect (con1,localhost,root,,,,);
+--echo 'connection con1'
connection con1;
SELECT @@global.innodb_max_dirty_pages_pct;
SET @@global.innodb_max_dirty_pages_pct = 70;
+--echo 'connect (con2,localhost,root,,,,)'
connect (con2,localhost,root,,,,);
+--echo 'connection con2'
connection con2;
SELECT @@global.innodb_max_dirty_pages_pct;
+--echo 'connection default'
connection default;
+--echo 'disconnect con2'
disconnect con2;
+--echo 'disconnect con1'
disconnect con1;
# restore initial value
SET @@global.innodb_max_dirty_pages_pct = @innodb_max_dirty_pages_pct;
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
index d81b6cc725b..b06f209a263 100644
--- 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
@@ -47,7 +47,7 @@ SELECT @pct_start_value;
########################################################################
SET @@global.innodb_max_dirty_pages_pct_lwm = 0;
-SET @@global.innodb_max_dirty_pages_pct_lwm = @pct_lwm_start_value;
+SET @@global.innodb_max_dirty_pages_pct_lwm = DEFAULT;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
@@ -96,22 +96,40 @@ 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;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 0.0;
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+SET @@global.innodb_max_dirty_pages_pct_lwm = 1.1;
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+
+SET @@global.innodb_max_dirty_pages_pct_lwm = 51.12;
+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;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = " ";
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_dirty_pages_pct_lwm = ' ';
+SELECT @@global.innodb_max_dirty_pages_pct_lwm;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_max_dirty_pages_pct_lwm =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+--enable_warnings
SELECT @@global.innodb_max_dirty_pages_pct_lwm;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_dirty_pages_pct_lwm';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
index 9e6b8201e3d..6c7676f113d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_basic.test
@@ -66,16 +66,37 @@ SELECT @@global.innodb_max_purge_lag;
# change the value of innodb_max_purge_lag to a valid value #
##########################################################################
-
SET @@global.innodb_max_purge_lag = 0;
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = 1;
SELECT @@global.innodb_max_purge_lag;
+
SET @@global.innodb_max_purge_lag = 4294967295;
SELECT @@global.innodb_max_purge_lag;
---echo '#--------------------FN_DYNVARS_046_04-------------------------#'
+--echo '#--------------------FN_DYNVARS_046_04------------------------#'
+##########################################################################
+# check the value of innodb_concurrency_tickets for out of bounds #
+##########################################################################
+
+# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295
+--disable_warnings
+SET @@global.innodb_max_purge_lag = 4294967296;
+--enable_warnings
+SELECT @@global.innodb_max_purge_lag IN (4294967296,4294967295);
+
+--disable_warnings
+SET @@global.innodb_max_purge_lag = 12345678901;
+--enable_warnings
+SELECT @@global.innodb_max_purge_lag IN (12345678901,4294967295);
+
+--disable_warnings
+SET @@global.innodb_max_purge_lag = 18446744073709551615;
+--enable_warnings
+SELECT @@global.innodb_max_purge_lag IN (18446744073709551615,4294967295);
+
+--echo '#--------------------FN_DYNVARS_046_05-------------------------#'
###########################################################################
# Change the value of innodb_max_purge_lag to invalid value #
###########################################################################
@@ -83,6 +104,9 @@ SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = -1;
SELECT @@global.innodb_max_purge_lag;
+SET @@global.innodb_max_purge_lag = -1024;
+SELECT @@global.innodb_max_purge_lag;
+
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_max_purge_lag = "T";
SELECT @@global.innodb_max_purge_lag;
@@ -91,26 +115,35 @@ SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = "Y";
SELECT @@global.innodb_max_purge_lag;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = 1.1;
+SELECT @@global.innodb_max_purge_lag;
-SET @@global.innodb_max_purge_lag = 1001;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = ' ';
SELECT @@global.innodb_max_purge_lag;
---echo '#----------------------FN_DYNVARS_046_05------------------------#'
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_max_purge_lag = " ";
+SELECT @@global.innodb_max_purge_lag;
+
+--echo '#----------------------FN_DYNVARS_046_06------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_max_purge_lag =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
+--enable_warnings
SELECT @@global.innodb_max_purge_lag;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag';
+--enable_warnings
-
-
-
---echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+--echo '#---------------------FN_DYNVARS_046_07-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
@@ -123,12 +156,11 @@ SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = ON;
SELECT @@global.innodb_max_purge_lag;
---echo '#---------------------FN_DYNVARS_046_07----------------------#'
+--echo '#---------------------FN_DYNVARS_046_08----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
-
SET @@global.innodb_max_purge_lag = TRUE;
SELECT @@global.innodb_max_purge_lag;
SET @@global.innodb_max_purge_lag = FALSE;
diff --git a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test
index 6374e3716df..f7580c99507 100644
--- a/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_purge_lag_delay_basic.test
@@ -13,9 +13,11 @@ SET @@GLOBAL.innodb_max_purge_lag_delay=1;
SELECT COUNT(@@GLOBAL.innodb_max_purge_lag_delay);
--echo 1 Expected
+--disable_warnings
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_max_purge_lag_delay';
+--enable_warnings
--echo 1 Expected
SELECT @@innodb_max_purge_lag_delay = @@GLOBAL.innodb_max_purge_lag_delay;
diff --git a/mysql-test/suite/sys_vars/t/innodb_mirrored_log_groups_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_undo_log_size_basic.test
index 6edb07ac39f..9882578923e 100644
--- a/mysql-test/suite/sys_vars/t/innodb_mirrored_log_groups_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_max_undo_log_size_basic.test
@@ -1,18 +1,18 @@
-################## mysql-test\t\innodb_mirrored_log_groups_basic.test #########
+############### mysql-test\t\innodb_max_undo_log_size_basic.test ###############
# #
-# Variable Name: innodb_mirrored_log_groups #
+# Variable Name: innodb_max_undo_log_size #
# Scope: Global #
# Access Type: Static #
# Data Type: numeric #
# #
# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
+# Creation Date: 2014-27-05 #
+# Author : Krunal Bauskar #
# #
# #
-# Description:Test Cases of Dynamic System Variable innodb_mirrored_log_groups#
+# Description:Test Cases of Dynamic System Variable innodb_max_undo_log_size #
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
@@ -24,79 +24,76 @@
--source include/have_innodb.inc
---echo '#---------------------BS_STVARS_037_01----------------------#'
+--echo '#---------------------BS_STVARS_035_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
--echo 1 Expected
---echo '#---------------------BS_STVARS_037_02----------------------#'
+--echo '#---------------------BS_STVARS_035_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_mirrored_log_groups=1;
---echo Expected error 'Read only variable'
+SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
--echo 1 Expected
+SET @@GLOBAL.innodb_max_undo_log_size=18446744073709551615;
+SELECT @@GLOBAL.innodb_max_undo_log_size;
+--echo 18446744073709551615 Expected
+SET @@GLOBAL.innodb_max_undo_log_size=1073741824;
-
---echo '#---------------------BS_STVARS_037_03----------------------#'
+--echo '#---------------------BS_STVARS_035_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
-SELECT @@GLOBAL.innodb_mirrored_log_groups = VARIABLE_VALUE
+--disable_warnings
+SELECT @@GLOBAL.innodb_max_undo_log_size = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_mirrored_log_groups';
+WHERE VARIABLE_NAME='innodb_max_undo_log_size';
--echo 1 Expected
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
--echo 1 Expected
SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_mirrored_log_groups';
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_max_undo_log_size';
--echo 1 Expected
+--enable_warnings
-
---echo '#---------------------BS_STVARS_037_04----------------------#'
+--echo '#---------------------BS_STVARS_035_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
-SELECT @@innodb_mirrored_log_groups = @@GLOBAL.innodb_mirrored_log_groups;
+SELECT @@innodb_max_undo_log_size = @@GLOBAL.innodb_max_undo_log_size;
--echo 1 Expected
---echo '#---------------------BS_STVARS_037_05----------------------#'
+--echo '#---------------------BS_STVARS_035_05----------------------#'
################################################################################
-# Check if innodb_mirrored_log_groups can be accessed with and without @@ sign #
+# Check if innodb_max_undo_log_size can be accessed with and without @@ sign #
################################################################################
-SELECT COUNT(@@innodb_mirrored_log_groups);
+SELECT COUNT(@@innodb_max_undo_log_size);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_mirrored_log_groups);
+SELECT COUNT(@@local.innodb_max_undo_log_size);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_mirrored_log_groups);
+SELECT COUNT(@@SESSION.innodb_max_undo_log_size);
--echo Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_mirrored_log_groups);
+SELECT COUNT(@@GLOBAL.innodb_max_undo_log_size);
--echo 1 Expected
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_mirrored_log_groups = @@SESSION.innodb_mirrored_log_groups;
---echo Expected error 'Readonly variable'
-
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_merge_threshold_set_all_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_merge_threshold_set_all_debug_basic.test
new file mode 100644
index 00000000000..0ea30277801
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_merge_threshold_set_all_debug_basic.test
@@ -0,0 +1,30 @@
+--echo #
+--echo # Basic test for innodb_merge_threshold_set_all_debug
+--echo #
+
+--source include/have_innodb.inc
+
+# The config variable is a debug variable
+-- source include/have_debug.inc
+
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+
+set global innodb_merge_threshold_set_all_debug = 1;
+
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+
+set global innodb_merge_threshold_set_all_debug = 51;
+
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+
+set global innodb_merge_threshold_set_all_debug = 0;
+
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+
+--error ER_GLOBAL_VARIABLE
+set innodb_merge_threshold_set_all_debug = 50;
+
+set global innodb_merge_threshold_set_all_debug = 50;
+
+SELECT @@global.innodb_merge_threshold_set_all_debug;
+
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 0615d62a0e1..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
@@ -2,11 +2,6 @@
# Test the metrics monitor system's control system
# and counter accuracy.
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
-
--source include/have_innodb.inc
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
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 0615d62a0e1..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
@@ -2,11 +2,6 @@
# Test the metrics monitor system's control system
# and counter accuracy.
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
-
--source include/have_innodb.inc
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
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 868f69300fa..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
@@ -2,11 +2,6 @@
# Test the metrics monitor system's control system
# and counter accuracy.
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip not fixed in innodb 5.6.10 or earlier
-}
-
--source include/have_innodb.inc
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
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 868f69300fa..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
@@ -2,11 +2,6 @@
# Test the metrics monitor system's control system
# and counter accuracy.
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip not fixed in innodb 5.6.10 or earlier
-}
-
--source include/have_innodb.inc
set global innodb_monitor_disable = All;
# Test turn on/off the monitor counter with "all" option
diff --git a/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test b/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test
new file mode 100644
index 00000000000..9f41cb74da8
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_numa_interleave_basic.test
@@ -0,0 +1,13 @@
+--source include/have_innodb.inc
+--source include/have_numa.inc
+
+SELECT @@GLOBAL.innodb_numa_interleave;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_numa_interleave=off;
+
+SELECT @@GLOBAL.innodb_use_native_aio;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@SESSION.innodb_use_native_aio;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test
index 0dcef3bb09f..1f72fc250ce 100644
--- a/mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_old_blocks_pct_basic.test
@@ -18,20 +18,30 @@ select @@global.innodb_old_blocks_pct;
select @@session.innodb_old_blocks_pct;
show global variables like 'innodb_old_blocks_pct';
show session variables like 'innodb_old_blocks_pct';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
+--enable_warnings
#
# show that it's writable
#
set global innodb_old_blocks_pct=10;
select @@global.innodb_old_blocks_pct;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
select * from information_schema.session_variables where variable_name='innodb_old_blocks_pct';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_old_blocks_pct=1;
#
+# check the default value
+#
+set @@global.innodb_old_blocks_pct=DEFAULT;
+select @@global.innodb_old_blocks_pct;
+
+#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
@@ -40,16 +50,26 @@ set global innodb_old_blocks_pct=1.1;
set global innodb_old_blocks_pct=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_old_blocks_pct="foo";
-
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_old_blocks_pct=" ";
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_old_blocks_pct='';
+
set global innodb_old_blocks_pct=4;
select @@global.innodb_old_blocks_pct;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
+--enable_warnings
set global innodb_old_blocks_pct=-7;
select @@global.innodb_old_blocks_pct;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
+--enable_warnings
set global innodb_old_blocks_pct=96;
select @@global.innodb_old_blocks_pct;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_pct';
+--enable_warnings
#
# min/max values
diff --git a/mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test b/mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test
index 3efec2bbf15..d05e7244b93 100644
--- a/mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_old_blocks_time_basic.test
@@ -18,16 +18,20 @@ select @@global.innodb_old_blocks_time;
select @@session.innodb_old_blocks_time;
show global variables like 'innodb_old_blocks_time';
show session variables like 'innodb_old_blocks_time';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
+--enable_warnings
#
# show that it's writable
#
set global innodb_old_blocks_time=10;
select @@global.innodb_old_blocks_time;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
select * from information_schema.session_variables where variable_name='innodb_old_blocks_time';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_old_blocks_time=1;
@@ -43,7 +47,9 @@ set global innodb_old_blocks_time="foo";
set global innodb_old_blocks_time=-7;
select @@global.innodb_old_blocks_time;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_old_blocks_time';
+--enable_warnings
#
# cleanup
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
index aa1cc83819e..b86f04cac15 100644
--- 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
@@ -12,20 +12,26 @@ select @@global.innodb_online_alter_log_max_size;
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';
+--disable_warnings
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';
+--enable_warnings
#
# show that it's writable
#
set global innodb_online_alter_log_max_size=1048576;
select @@global.innodb_online_alter_log_max_size;
+--disable_warnings
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';
+--enable_warnings
set @@global.innodb_online_alter_log_max_size=524288;
select @@global.innodb_online_alter_log_max_size;
+--disable_warnings
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';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_online_alter_log_max_size='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_open_files_basic.test b/mysql-test/suite/sys_vars/t/innodb_open_files_basic.test
index c55b7e55937..d6b7c857fb4 100644
--- a/mysql-test/suite/sys_vars/t/innodb_open_files_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_open_files_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_open_files);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT @@GLOBAL.innodb_open_files = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_open_files';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_open_files);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_open_files';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test b/mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test
index e9ff8a651bc..08b8c137342 100644
--- a/mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_optimize_fulltext_only_basic.test
@@ -18,28 +18,38 @@ select @@global.innodb_optimize_fulltext_only;
select @@session.innodb_optimize_fulltext_only;
show global variables like 'innodb_optimize_fulltext_only';
show session variables like 'innodb_optimize_fulltext_only';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
#
# show that it's writable
#
set global innodb_optimize_fulltext_only='ON';
select @@global.innodb_optimize_fulltext_only;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
set @@global.innodb_optimize_fulltext_only=0;
select @@global.innodb_optimize_fulltext_only;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
set global innodb_optimize_fulltext_only=1;
select @@global.innodb_optimize_fulltext_only;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
set @@global.innodb_optimize_fulltext_only='OFF';
select @@global.innodb_optimize_fulltext_only;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_optimize_fulltext_only='OFF';
--error ER_GLOBAL_VARIABLE
@@ -57,8 +67,10 @@ set global innodb_optimize_fulltext_only=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_optimize_fulltext_only=-3;
select @@global.innodb_optimize_fulltext_only;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_optimize_fulltext_only';
select * from information_schema.session_variables where variable_name='innodb_optimize_fulltext_only';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_optimize_fulltext_only='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_page_cleaners_basic.test b/mysql-test/suite/sys_vars/t/innodb_page_cleaners_basic.test
new file mode 100644
index 00000000000..716492ba1b3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_page_cleaners_basic.test
@@ -0,0 +1,53 @@
+# Variable name: innodb_page_cleaners
+# Scope: Global
+# Access type: Static
+# Data type: numeric
+
+--source include/have_innodb.inc
+
+SELECT COUNT(@@GLOBAL.innodb_page_cleaners);
+--echo 1 Expected
+
+SELECT COUNT(@@innodb_page_cleaners);
+--echo 1 Expected
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@GLOBAL.innodb_page_cleaners=1;
+--echo Expected error 'Read-only variable'
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_page_cleaners = @@SESSION.innodb_page_cleaners;
+--echo Expected error 'Read-only variable'
+
+--disable_warnings
+SELECT @@GLOBAL.innodb_page_cleaners = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_page_cleaners';
+--enable_warnings
+--echo 1 Expected
+
+--disable_warnings
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_page_cleaners';
+--enable_warnings
+--echo 1 Expected
+
+SELECT @@innodb_page_cleaners = @@GLOBAL.innodb_page_cleaners;
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_page_cleaners);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_page_cleaners);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+# Check the default value
+--disable_warnings
+SELECT VARIABLE_NAME, VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME = 'innodb_page_cleaners';
+--enable_warnings
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
index 1479cbad744..ee4798c1f90 100644
--- a/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
@@ -10,8 +10,10 @@ select @@global.innodb_page_hash_locks;
select @@session.innodb_page_hash_locks;
show global variables like 'innodb_page_hash_locks';
show session variables like 'innodb_page_hash_locks';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_page_hash_locks';
select * from information_schema.session_variables where variable_name='innodb_page_hash_locks';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test
index 00aa476e8d2..1d4f9353f53 100644
--- a/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_page_size_basic.test
@@ -1 +1,16 @@
---echo XtraDB extension
+#
+# Basic test for innodb_page_size
+#
+
+-- source include/have_innodb.inc
+
+# Check the default value
+SET @orig = @@global.innodb_page_size;
+--replace_result 65536 {valid_page_size} 32768 {valid_page_size} 16384 {valid_page_size} 8192 {valid_page_size} 4096 {valid_page_size}
+SELECT @orig;
+
+# Confirm that we can not change the value
+-- error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET GLOBAL innodb_page_size = 4k;
+-- error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET GLOBAL innodb_page_size = 8k;
diff --git a/mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test b/mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test
index 4cbd7062108..5693a829373 100644
--- a/mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_print_all_deadlocks_basic.test
@@ -17,38 +17,48 @@ SELECT @@global.innodb_print_all_deadlocks;
SELECT @@session.innodb_print_all_deadlocks;
SHOW global variables LIKE 'innodb_print_all_deadlocks';
SHOW session variables LIKE 'innodb_print_all_deadlocks';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
#
# SHOW that it's writable
#
SET global innodb_print_all_deadlocks='OFF';
SELECT @@global.innodb_print_all_deadlocks;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
SET @@global.innodb_print_all_deadlocks=1;
SELECT @@global.innodb_print_all_deadlocks;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
SET global innodb_print_all_deadlocks=0;
SELECT @@global.innodb_print_all_deadlocks;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
SET @@global.innodb_print_all_deadlocks='ON';
SELECT @@global.innodb_print_all_deadlocks;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_print_all_deadlocks='OFF';
--error ER_GLOBAL_VARIABLE
@@ -66,10 +76,12 @@ SET global innodb_print_all_deadlocks=2;
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_print_all_deadlocks=-3;
SELECT @@global.innodb_print_all_deadlocks;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_print_all_deadlocks';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_print_all_deadlocks';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
SET global innodb_print_all_deadlocks='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
index 88271d26965..4f3dc9f364b 100644
--- a/mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_batch_size_basic.test
@@ -72,7 +72,7 @@ SELECT @@global.innodb_purge_batch_size;
SET @@global.innodb_purge_batch_size = 5000;
SELECT @@global.innodb_purge_batch_size;
-SET @@global.innodb_purge_batch_size = 1000;
+SET @@global.innodb_purge_batch_size = 4294967295;
SELECT @@global.innodb_purge_batch_size;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
@@ -90,8 +90,17 @@ SELECT @@global.innodb_purge_batch_size;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_purge_batch_size = "Y";
SELECT @@global.innodb_purge_batch_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_batch_size = ' ';
+SELECT @@global.innodb_purge_batch_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_batch_size = " ";
+SELECT @@global.innodb_purge_batch_size;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_batch_size = 1.1;
+SELECT @@global.innodb_purge_batch_size;
-SET @@global.innodb_purge_batch_size = 5001;
+SET @@global.innodb_purge_batch_size = 4294967297;
SELECT @@global.innodb_purge_batch_size;
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
@@ -99,12 +108,16 @@ SELECT @@global.innodb_purge_batch_size;
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_purge_batch_size =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
+--enable_warnings
SELECT @@global.innodb_purge_batch_size;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_batch_size';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_rseg_truncate_frequency_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_rseg_truncate_frequency_basic.test
new file mode 100644
index 00000000000..e0871ba4ab5
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_rseg_truncate_frequency_basic.test
@@ -0,0 +1,161 @@
+###### mysql-test\t\innodb_purge_rseg_truncate_frequency_basic.test ###########
+# #
+# Variable Name: innodb_purge_rseg_truncate_frequency #
+# Scope: GLOBAL #
+# Access Type: Dynamic #
+# Data Type: Numeric #
+# Default Value: 128 #
+# Range: 1 - 128 #
+# #
+# #
+# Creation Date: 2014-27-05 #
+# Author: Krunal Bauskar #
+# #
+#Description:Test Cases of Dynamic System Variable #
+# innodb_purge_rseg_truncate_frequency #
+# 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_purge_rseg_truncate_frequency TESTS #
+########################################################################
+
+###############################################################################
+# Saving initial value of innodb_purge_rseg_truncate_frequency in a #
+# temporary variable #
+###############################################################################
+
+SET @global_start_value = @@global.innodb_purge_rseg_truncate_frequency;
+SELECT @global_start_value;
+
+--echo '#--------------------FN_DYNVARS_046_01------------------------#'
+########################################################################
+# Display the DEFAULT value of innodb_purge_rseg_truncate_frequency #
+########################################################################
+
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SET @@global.innodb_purge_rseg_truncate_frequency = DEFAULT;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--echo '#---------------------FN_DYNVARS_046_02-------------------------#'
+############################################################################
+# Check if innodb_purge_rseg_truncate_frequency can be accessed with and #
+# without @@ sign #
+############################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@innodb_purge_rseg_truncate_frequency;
+
+--Error ER_UNKNOWN_TABLE
+SELECT local.innodb_purge_rseg_truncate_frequency;
+
+SET global innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--echo '#--------------------FN_DYNVARS_046_03------------------------#'
+##########################################################################
+# change the value of innodb_purge_rseg_truncate_frequency to a valid #
+# value #
+##########################################################################
+
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+SET @@global.innodb_purge_rseg_truncate_frequency = 1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+SET @@global.innodb_purge_rseg_truncate_frequency = 128;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--echo '#--------------------FN_DYNVARS_046_05-------------------------#'
+###########################################################################
+# Change the value of innodb_purge_rseg_truncate_frequency to #
+# invalid value #
+###########################################################################
+
+SET @@global.innodb_purge_rseg_truncate_frequency = -1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+SET @@global.innodb_purge_rseg_truncate_frequency = -1024;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = "T";
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = "Y";
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = 1.1;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = ' ';
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = " ";
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--echo '#----------------------FN_DYNVARS_046_06------------------------#'
+#########################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#########################################################################
+
+--disable_warnings
+SELECT @@global.innodb_purge_rseg_truncate_frequency =
+ VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_purge_rseg_truncate_frequency';
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+ WHERE VARIABLE_NAME='innodb_purge_rseg_truncate_frequency';
+--enable_warnings
+
+--echo '#---------------------FN_DYNVARS_046_07-------------------------#'
+###################################################################
+# Check if ON and OFF values can be used on variable #
+###################################################################
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = OFF;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--ERROR ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_purge_rseg_truncate_frequency = ON;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+--echo '#---------------------FN_DYNVARS_046_08----------------------#'
+###################################################################
+# Check if TRUE and FALSE values can be used on variable #
+###################################################################
+
+SET @@global.innodb_purge_rseg_truncate_frequency = TRUE;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+SET @@global.innodb_purge_rseg_truncate_frequency = FALSE;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+##############################
+# Restore initial value #
+##############################
+
+
+SET @@global.innodb_purge_rseg_truncate_frequency = @global_start_value;
+SELECT @@global.innodb_purge_rseg_truncate_frequency;
+
+###############################################################
+# END OF innodb_purge_rseg_truncate_frequency TESTS #
+###############################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test b/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
index 64d834c6344..4d039601e40 100644
--- a/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_purge_threads_basic.test
@@ -1,89 +1,41 @@
-
-
-################## mysql-test\t\innodb_log_purge_threads_basic.test ###########
-# #
-# Variable Name: innodb_purge_threads #
-# Scope: Global #
-# Access Type: Static #
-# Data Type: numeric #
-# #
-# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
-# #
-# #
-# Description:Test Cases of Dynamic System Variable innodb_purge_threads #
-# 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 #
-# #
-###############################################################################
+# Variable name: innodb_purge_threads
+# Scope: Global
+# Access type: Static
+# Data type: numeric
--source include/have_innodb.inc
---echo '#---------------------BS_STVARS_035_01----------------------#'
-####################################################################
-# Displaying default value #
-####################################################################
SELECT COUNT(@@GLOBAL.innodb_purge_threads);
--echo 1 Expected
-
---echo '#---------------------BS_STVARS_035_02----------------------#'
-####################################################################
-# Check if Value can set #
-####################################################################
+SELECT COUNT(@@innodb_purge_threads);
+--echo 1 Expected
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET @@GLOBAL.innodb_purge_threads=1;
---echo Expected error 'Read only variable'
-
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
---echo 1 Expected
+--echo Expected error 'Read-only variable'
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
+--echo Expected error 'Read-only variable'
-
-
---echo '#---------------------BS_STVARS_035_03----------------------#'
-#################################################################
-# Check if the value in GLOBAL Table matches value in variable #
-#################################################################
-
+--disable_warnings
SELECT @@GLOBAL.innodb_purge_threads = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
+--enable_warnings
--echo 1 Expected
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
---echo 1 Expected
-
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_purge_threads';
+--enable_warnings
--echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_035_04----------------------#'
-################################################################################
-# Check if accessing variable with and without GLOBAL point to same variable #
-################################################################################
SELECT @@innodb_purge_threads = @@GLOBAL.innodb_purge_threads;
--echo 1 Expected
-
-
---echo '#---------------------BS_STVARS_035_05----------------------#'
-################################################################################
-# Check if innodb_purge_threads can be accessed with and without @@ sign #
-################################################################################
-
-SELECT COUNT(@@innodb_purge_threads);
---echo 1 Expected
-
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT COUNT(@@local.innodb_purge_threads);
--echo Expected error 'Variable is a GLOBAL variable'
@@ -92,11 +44,10 @@ SELECT COUNT(@@local.innodb_purge_threads);
SELECT COUNT(@@SESSION.innodb_purge_threads);
--echo Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_purge_threads);
---echo 1 Expected
-
---Error ER_BAD_FIELD_ERROR
-SELECT innodb_purge_threads = @@SESSION.innodb_purge_threads;
---echo Expected error 'Readonly variable'
-
+# Check the default value
+--disable_warnings
+SELECT VARIABLE_NAME, VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME = 'innodb_purge_threads';
+--enable_warnings
diff --git a/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test b/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test
index b7ba6f36b15..a805fc80314 100644
--- a/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_random_read_ahead_basic.test
@@ -18,28 +18,38 @@ select @@global.innodb_random_read_ahead;
select @@session.innodb_random_read_ahead;
show global variables like 'innodb_random_read_ahead';
show session variables like 'innodb_random_read_ahead';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
#
# show that it's writable
#
set global innodb_random_read_ahead='ON';
select @@global.innodb_random_read_ahead;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
set @@global.innodb_random_read_ahead=0;
select @@global.innodb_random_read_ahead;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
set global innodb_random_read_ahead=1;
select @@global.innodb_random_read_ahead;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
set @@global.innodb_random_read_ahead='OFF';
select @@global.innodb_random_read_ahead;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_random_read_ahead='OFF';
--error ER_GLOBAL_VARIABLE
@@ -57,8 +67,10 @@ set global innodb_random_read_ahead=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead=-3;
select @@global.innodb_random_read_ahead;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_random_read_ahead';
select * from information_schema.session_variables where variable_name='innodb_random_read_ahead';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_random_read_ahead='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test b/mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test
index 1298a28b3d3..65bb9c03115 100644
--- a/mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_read_ahead_threshold_basic.test
@@ -18,18 +18,27 @@ select @@global.innodb_read_ahead_threshold;
select @@session.innodb_read_ahead_threshold;
show global variables like 'innodb_read_ahead_threshold';
show session variables like 'innodb_read_ahead_threshold';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
+--enable_warnings
#
# show that it's writable
#
set global innodb_read_ahead_threshold=10;
select @@global.innodb_read_ahead_threshold;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
select * from information_schema.session_variables where variable_name='innodb_read_ahead_threshold';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_read_ahead_threshold=1;
+#
+# check the default value
+#
+set global innodb_read_ahead_threshold=DEFAULT;
+select @@global.innodb_read_ahead_threshold;
#
# incorrect types
@@ -40,13 +49,23 @@ set global innodb_read_ahead_threshold=1.1;
set global innodb_read_ahead_threshold=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_read_ahead_threshold="foo";
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_read_ahead_threshold=' ';
+select @@global.innodb_read_ahead_threshold;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_read_ahead_threshold=" ";
+select @@global.innodb_read_ahead_threshold;
set global innodb_read_ahead_threshold=-7;
select @@global.innodb_read_ahead_threshold;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
+--enable_warnings
set global innodb_read_ahead_threshold=96;
select @@global.innodb_read_ahead_threshold;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_ahead_threshold';
+--enable_warnings
#
# min/max values
diff --git a/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test b/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test
index 14426395d6c..c4c49d5bb20 100644
--- a/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_read_io_threads_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_read_io_threads;
select @@session.innodb_read_io_threads;
show global variables like 'innodb_read_io_threads';
show session variables like 'innodb_read_io_threads';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_io_threads';
select * from information_schema.session_variables where variable_name='innodb_read_io_threads';
+--enable_warnings
#
# show that it's read-only
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
index 581eb3538b8..31cbe779ef7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_read_only_basic.test
@@ -9,8 +9,10 @@ select @@global.innodb_read_only;
select @@session.innodb_read_only;
show global variables like 'innodb_read_only';
show session variables like 'innodb_read_only';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_read_only';
select * from information_schema.session_variables where variable_name='innodb_read_only';
+--enable_warnings
# Show that it's read-only
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
diff --git a/mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test
index e495de46611..c85cc85e78c 100644
--- a/mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_replication_delay_basic.test
@@ -18,20 +18,41 @@ select @@global.innodb_replication_delay;
select @@session.innodb_replication_delay;
show global variables like 'innodb_replication_delay';
show session variables like 'innodb_replication_delay';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
select * from information_schema.session_variables where variable_name='innodb_replication_delay';
+--enable_warnings
#
# show that it's writable
#
set global innodb_replication_delay=10;
select @@global.innodb_replication_delay;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
select * from information_schema.session_variables where variable_name='innodb_replication_delay';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_replication_delay=1;
#
+# check the default value
+#
+set global innodb_replication_delay=DEFAULT;
+select @@global.innodb_replication_delay;
+
+#
+# valid values
+#
+
+set global innodb_replication_delay=0;
+select @@global.innodb_replication_delay;
+set global innodb_replication_delay=65535;
+select @@global.innodb_replication_delay;
+set global innodb_replication_delay=4294967295;
+select @@global.innodb_replication_delay;
+
+#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
@@ -40,10 +61,39 @@ set global innodb_replication_delay=1.1;
set global innodb_replication_delay=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_replication_delay="foo";
-
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_replication_delay=' ';
+select @@global.innodb_replication_delay;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_replication_delay=" ";
+select @@global.innodb_replication_delay;
set global innodb_replication_delay=-7;
select @@global.innodb_replication_delay;
+set global innodb_replication_delay=-1024;
+select @@global.innodb_replication_delay;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_replication_delay';
+--enable_warnings
+
+#
+# Check for out of bounds
+#
+
+# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295
+--disable_warnings
+SET @@global.innodb_replication_delay = 4294967296;
+--enable_warnings
+SELECT @@global.innodb_replication_delay IN (4294967296,4294967295);
+
+--disable_warnings
+SET @@global.innodb_replication_delay = 12345678901;
+--enable_warnings
+SELECT @@global.innodb_replication_delay IN (12345678901,4294967295);
+
+--disable_warnings
+SET @@global.innodb_replication_delay = 18446744073709551615;
+--enable_warnings
+SELECT @@global.innodb_replication_delay IN (18446744073709551615,4294967295);
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test
index 81025bb9d73..2aee2e25db7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_rollback_on_timeout_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_rollback_on_timeout);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_rollback_on_timeout, "ON", "OFF") = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_rollback_on_timeout';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_rollback_on_timeout);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_rollback_on_timeout';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
index 9f0b70a528f..33223d4c064 100644
--- a/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_rollback_segments_basic.test
@@ -19,20 +19,24 @@ SELECT @@global.innodb_rollback_segments;
SELECT @@session.innodb_rollback_segments;
SHOW global variables LIKE 'innodb_rollback_segments';
SHOW session variables LIKE 'innodb_rollback_segments';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_rollback_segments';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_rollback_segments';
+--enable_warnings
#
# show that it's writable
#
SET global innodb_rollback_segments=100;
SELECT @@global.innodb_rollback_segments;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_rollback_segments';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_rollback_segments';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_rollback_segments=1;
@@ -47,8 +51,10 @@ SET global innodb_rollback_segments=1e1;
SET global innodb_rollback_segments="foo";
SET global innodb_rollback_segments=-7;
SELECT @@global.innodb_rollback_segments;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_rollback_segments';
+--enable_warnings
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test
index 920c992c1f9..49318c00661 100644
--- a/mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_sort_buffer_size;
select @@session.innodb_sort_buffer_size;
show global variables like 'innodb_sort_buffer_size';
show session variables like 'innodb_sort_buffer_size';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_sort_buffer_size';
select * from information_schema.session_variables where variable_name='innodb_sort_buffer_size';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test b/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test
index 8f2eee08b6a..ab0b38bb6ce 100644
--- a/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_spin_wait_delay_basic.test
@@ -18,20 +18,40 @@ select @@global.innodb_spin_wait_delay;
select @@session.innodb_spin_wait_delay;
show global variables like 'innodb_spin_wait_delay';
show session variables like 'innodb_spin_wait_delay';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
select * from information_schema.session_variables where variable_name='innodb_spin_wait_delay';
+--enable_warnings
#
# show that it's writable
#
set global innodb_spin_wait_delay=10;
select @@global.innodb_spin_wait_delay;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
select * from information_schema.session_variables where variable_name='innodb_spin_wait_delay';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_spin_wait_delay=1;
#
+# check the default value
+#
+set global innodb_spin_wait_delay=DEFAULT;
+select @@global.innodb_spin_wait_delay;
+
+#
+# valid values
+#
+set global innodb_spin_wait_delay=0;
+select @@global.innodb_spin_wait_delay;
+set global innodb_spin_wait_delay=65535;
+select @@global.innodb_spin_wait_delay;
+set global innodb_spin_wait_delay=4294967295;
+select @@global.innodb_spin_wait_delay;
+
+#
# incorrect types
#
--error ER_WRONG_TYPE_FOR_VAR
@@ -40,10 +60,39 @@ set global innodb_spin_wait_delay=1.1;
set global innodb_spin_wait_delay=1e1;
--error ER_WRONG_TYPE_FOR_VAR
set global innodb_spin_wait_delay="foo";
-
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_spin_wait_delay=' ';
+select @@global.innodb_spin_wait_delay;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_spin_wait_delay=" ";
+select @@global.innodb_spin_wait_delay;
set global innodb_spin_wait_delay=-7;
select @@global.innodb_spin_wait_delay;
+set global innodb_spin_wait_delay=-1024;
+select @@global.innodb_spin_wait_delay;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_spin_wait_delay';
+--enable_warnings
+
+#
+# Check for out of bounds
+#
+
+# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295
+--disable_warnings
+SET @@global.innodb_spin_wait_delay = 4294967296;
+--enable_warnings
+SELECT @@global.innodb_spin_wait_delay IN (4294967296,4294967295);
+
+--disable_warnings
+SET @@global.innodb_spin_wait_delay = 12345678901;
+--enable_warnings
+SELECT @@global.innodb_spin_wait_delay IN (12345678901,4294967295);
+
+--disable_warnings
+SET @@global.innodb_spin_wait_delay = 18446744073709551615;
+--enable_warnings
+SELECT @@global.innodb_spin_wait_delay IN (18446744073709551615,4294967295);
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
index f01574c3683..77288dfb130 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_method_basic.test
@@ -18,32 +18,40 @@ SELECT @@global.innodb_stats_method;
SELECT @@session.innodb_stats_method;
SHOW global variables LIKE 'innodb_stats_method';
SHOW session variables LIKE 'innodb_stats_method';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_method';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_method';
+--enable_warnings
#
# show that it's writable
#
SET global innodb_stats_method='nulls_equal';
SELECT @@global.innodb_stats_method;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_method';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_method';
+--enable_warnings
SET @@global.innodb_stats_method='nulls_unequal';
SELECT @@global.innodb_stats_method;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_method';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_method';
+--enable_warnings
SET global innodb_stats_method=2;
SELECT @@global.innodb_stats_method;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_method';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_method';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_stats_method='nulls_equal';
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test
index 9028ee7f687..a0bccb50652 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_on_metadata_basic.test
@@ -18,28 +18,38 @@ select @@global.innodb_stats_on_metadata;
select @@session.innodb_stats_on_metadata;
show global variables like 'innodb_stats_on_metadata';
show session variables like 'innodb_stats_on_metadata';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
#
# show that it's writable
#
set global innodb_stats_on_metadata='OFF';
select @@global.innodb_stats_on_metadata;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
set @@global.innodb_stats_on_metadata=1;
select @@global.innodb_stats_on_metadata;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
set global innodb_stats_on_metadata=0;
select @@global.innodb_stats_on_metadata;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
set @@global.innodb_stats_on_metadata='ON';
select @@global.innodb_stats_on_metadata;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_stats_on_metadata='OFF';
--error ER_GLOBAL_VARIABLE
@@ -57,8 +67,10 @@ set global innodb_stats_on_metadata=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata=-3;
select @@global.innodb_stats_on_metadata;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_on_metadata';
select * from information_schema.session_variables where variable_name='innodb_stats_on_metadata';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_stats_on_metadata='AUTO';
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
index 4277b58de00..c5f977321b7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_persistent_basic.test
@@ -28,4 +28,4 @@ SET GLOBAL innodb_stats_persistent=123;
SET GLOBAL innodb_stats_persistent='foo';
# restore the environment
-SET GLOBAL innodb_stats_persistent=off;
+SET GLOBAL innodb_stats_persistent=OFF; \ No newline at end of file
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test
index cf223c02090..5fc62f0a571 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_persistent_sample_pages_basic.test
@@ -18,23 +18,45 @@ SELECT @@global.innodb_stats_persistent_sample_pages;
SELECT @@session.innodb_stats_persistent_sample_pages;
SHOW global variables LIKE 'innodb_stats_persistent_sample_pages';
SHOW session variables LIKE 'innodb_stats_persistent_sample_pages';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
+--enable_warnings
#
# SHOW that it's writable
#
SET global innodb_stats_persistent_sample_pages=10;
SELECT @@global.innodb_stats_persistent_sample_pages;
-SELECT * FROM information_schema.global_variables
+--disable_warnings
+SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_stats_persistent_sample_pages=1;
+#
+# show the default value
+#
+set global innodb_stats_persistent_sample_pages=DEFAULT;
+select @@global.innodb_stats_persistent_sample_pages;
+
+#
+# valid values
+#
+SET global innodb_stats_persistent_sample_pages=0;
+SELECT @@global.innodb_stats_persistent_sample_pages;
+
+SET global innodb_stats_persistent_sample_pages=10;
+SELECT @@global.innodb_stats_persistent_sample_pages;
+
+
+
+
#
# incorrect types
#
@@ -44,11 +66,19 @@ SET global innodb_stats_persistent_sample_pages=1.1;
SET global innodb_stats_persistent_sample_pages=1e1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_stats_persistent_sample_pages="foo";
-
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_stats_persistent_sample_pages=' ';
+SELECT @@global.innodb_stats_persistent_sample_pages;
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_stats_persistent_sample_pages=" ";
+SELECT @@global.innodb_stats_persistent_sample_pages;
SET global innodb_stats_persistent_sample_pages=-7;
SELECT @@global.innodb_stats_persistent_sample_pages;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_persistent_sample_pages';
+--enable_warnings
+
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test
index 2c91f11405d..0e4fcb508ac 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_sample_pages_basic.test
@@ -18,32 +18,52 @@ select @@global.innodb_stats_sample_pages;
select @@session.innodb_stats_sample_pages;
show global variables like 'innodb_stats_sample_pages';
show session variables like 'innodb_stats_sample_pages';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
+--enable_warnings
#
# show that it's writable
#
set global innodb_stats_sample_pages=10;
select @@global.innodb_stats_sample_pages;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
select * from information_schema.session_variables where variable_name='innodb_stats_sample_pages';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_stats_sample_pages=1;
+#
+# show the default value
#
-# incorrect types
+set global innodb_stats_sample_pages=DEFAULT;
+select @@global.innodb_stats_sample_pages;
+
+
#
+# invalid values
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_stats_sample_pages = 1.1;
--error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages=1.1;
+set global innodb_stats_sample_pages = 1e1;
--error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages=1e1;
+set global innodb_stats_sample_pages = "foo";
--error ER_WRONG_TYPE_FOR_VAR
-set global innodb_stats_sample_pages="foo";
+set global innodb_stats_sample_pages=' ';
+select @@global.innodb_stats_sample_pages;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_stats_sample_pages=" ";
+select @@global.innodb_stats_sample_pages;
set global innodb_stats_sample_pages=-7;
select @@global.innodb_stats_sample_pages;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_stats_sample_pages';
+--enable_warnings
+
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test b/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
index ff3a50efa1f..897d3de42e0 100644
--- a/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_stats_transient_sample_pages_basic.test
@@ -18,20 +18,30 @@ SELECT @@global.innodb_stats_transient_sample_pages;
SELECT @@session.innodb_stats_transient_sample_pages;
SHOW global variables LIKE 'innodb_stats_transient_sample_pages';
SHOW session variables LIKE 'innodb_stats_transient_sample_pages';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
+--enable_warnings
+
+#
+# show the default value
+#
+set global innodb_stats_transient_sample_pages=DEFAULT;
+select @@global.innodb_stats_transient_sample_pages;
#
# SHOW that it's writable
#
SET global innodb_stats_transient_sample_pages=10;
SELECT @@global.innodb_stats_transient_sample_pages;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
SET session innodb_stats_transient_sample_pages=1;
@@ -44,11 +54,15 @@ SET global innodb_stats_transient_sample_pages=1.1;
SET global innodb_stats_transient_sample_pages=1e1;
--error ER_WRONG_TYPE_FOR_VAR
SET global innodb_stats_transient_sample_pages="foo";
+--error ER_WRONG_TYPE_FOR_VAR
+SET global innodb_stats_transient_sample_pages=' ';
SET global innodb_stats_transient_sample_pages=-7;
SELECT @@global.innodb_stats_transient_sample_pages;
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_stats_transient_sample_pages';
+--enable_warnings
#
# cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_status_output_basic.test b/mysql-test/suite/sys_vars/t/innodb_status_output_basic.test
index 4459632134d..8e33b364c4e 100644
--- a/mysql-test/suite/sys_vars/t/innodb_status_output_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_status_output_basic.test
@@ -13,28 +13,38 @@ select @@global.innodb_status_output;
select @@session.innodb_status_output;
show global variables like 'innodb_status_output';
show session variables like 'innodb_status_output';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
#
# show that it's writable
#
set global innodb_status_output='OFF';
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
set @@global.innodb_status_output=1;
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
set global innodb_status_output=0;
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
set @@global.innodb_status_output='ON';
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_status_output='OFF';
--error ER_GLOBAL_VARIABLE
@@ -52,12 +62,16 @@ set global innodb_status_output=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output=-3;
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
set global innodb_status_output=DEFAULT;
select @@global.innodb_status_output;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output';
select * from information_schema.session_variables where variable_name='innodb_status_output';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_status_output_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_status_output_locks_basic.test
index 92c82b2ddbf..9f510c2feaa 100644
--- a/mysql-test/suite/sys_vars/t/innodb_status_output_locks_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_status_output_locks_basic.test
@@ -13,28 +13,38 @@ select @@global.innodb_status_output_locks;
select @@session.innodb_status_output_locks;
show global variables like 'innodb_status_output_locks';
show session variables like 'innodb_status_output_locks';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
#
# show that it's writable
#
set global innodb_status_output_locks='OFF';
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
set @@global.innodb_status_output_locks=1;
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
set global innodb_status_output_locks=0;
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
set @@global.innodb_status_output_locks='ON';
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_status_output_locks='OFF';
--error ER_GLOBAL_VARIABLE
@@ -52,12 +62,16 @@ set global innodb_status_output_locks=2;
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output_locks=-3;
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
set global innodb_status_output_locks=DEFAULT;
select @@global.innodb_status_output_locks;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_status_output_locks';
select * from information_schema.session_variables where variable_name='innodb_status_output_locks';
+--enable_warnings
--error ER_WRONG_VALUE_FOR_VAR
set global innodb_status_output_locks='AUTO';
diff --git a/mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test b/mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test
index 10f8d1ce4e7..243985f95de 100644
--- a/mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_strict_mode_basic.test
@@ -18,8 +18,10 @@ select @@session.innodb_strict_mode in (0, 1);
select @@session.innodb_strict_mode;
show global variables like 'innodb_strict_mode';
show session variables like 'innodb_strict_mode';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
#
# show that it's writable
@@ -28,26 +30,34 @@ set global innodb_strict_mode='OFF';
set session innodb_strict_mode='OFF';
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
set @@global.innodb_strict_mode=1;
set @@session.innodb_strict_mode=1;
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
set global innodb_strict_mode=0;
set session innodb_strict_mode=0;
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
set @@global.innodb_strict_mode='ON';
set @@session.innodb_strict_mode='ON';
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
#
# incorrect types
@@ -74,8 +84,10 @@ set global innodb_strict_mode=-3;
set session innodb_strict_mode=-7;
select @@global.innodb_strict_mode;
select @@session.innodb_strict_mode;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
+--enable_warnings
#
# Cleanup
diff --git a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
index 988b8f01b93..6668d486090 100644
--- a/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_support_xa_basic.test
@@ -127,7 +127,7 @@ SET @@session.innodb_support_xa = ÓFF;
# for global
---error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_support_xa = -1;
SELECT @@global.innodb_support_xa;
@@ -166,12 +166,16 @@ SELECT @@session.innodb_support_xa AS res_is_1;
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT IF(@@global.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
+--enable_warnings
SELECT @@global.innodb_support_xa;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
+--enable_warnings
--echo '#----------------------FN_DYNVARS_046_07------------------------#'
@@ -179,12 +183,16 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
# Check if the value in SESSION Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT IF(@@session.innodb_support_xa, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
+--enable_warnings
SELECT @@session.innodb_support_xa;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_support_xa';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_08-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test
index 53011acb576..39ff69affea 100644
--- a/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_sync_array_size_basic.test
@@ -2,11 +2,6 @@
--source include/have_innodb.inc
-if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB 5.6.10 or earlier
-}
-
# Exists as global only
#
--echo Valid values are between 0 and 1024
@@ -14,12 +9,15 @@ SELECT @@global.innodb_sync_array_size between 0 and 1024;
SELECT @@global.innodb_sync_array_size;
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.innodb_sync_array_size;
+
SHOW GLOBAL variables LIKE 'innodb_sync_array_size';
SHOW SESSION variables LIKE 'innodb_sync_array_size';
+--disable_warnings
SELECT * FROM information_schema.global_variables
WHERE variable_name='innodb_sync_array_size';
SELECT * FROM information_schema.session_variables
WHERE variable_name='innodb_sync_array_size';
+--enable_warnings
#
# Show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_sync_debug_basic.test
new file mode 100644
index 00000000000..665482e6963
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_sync_debug_basic.test
@@ -0,0 +1,16 @@
+--echo #
+--echo # Basic test for innodb_sync_debug
+--echo #
+
+--source include/have_innodb.inc
+
+# The config variable is a debug read-only variable
+-- source include/have_debug.inc
+
+SELECT @@global.innodb_sync_debug;
+
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global innodb_sync_debug = 1;
+
+SELECT @@global.innodb_sync_debug;
+
diff --git a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
index 35460fe47f2..138e877dd42 100644
--- a/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_sync_spin_loops_basic.test
@@ -70,13 +70,35 @@ SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = 0;
SELECT @@global.innodb_sync_spin_loops;
-SET @@global.innodb_sync_spin_loops = 1;
+SET @@global.innodb_sync_spin_loops = 65535;
SELECT @@global.innodb_sync_spin_loops;
-SET @@global.innodb_sync_spin_loops = 1000;
+
+SET @@global.innodb_sync_spin_loops = 4294967295;
SELECT @@global.innodb_sync_spin_loops;
--echo '#--------------------FN_DYNVARS_046_04-------------------------#'
###########################################################################
+# Check the value of innodb_sync_spin_loops for out of bounds #
+###########################################################################
+
+# With a 64 bit mysqld:18446744073709551615,with a 32 bit mysqld: 4294967295
+--disable_warnings
+SET @@global.innodb_sync_spin_loops = 4294967296;
+--enable_warnings
+SELECT @@global.innodb_sync_spin_loops IN (4294967296,4294967295);
+
+--disable_warnings
+SET @@global.innodb_sync_spin_loops = 12345678901;
+--enable_warnings
+SELECT @@global.innodb_sync_spin_loops IN (12345678901,4294967295);
+
+--disable_warnings
+SET @@global.innodb_sync_spin_loops = 18446744073709551615;
+--enable_warnings
+SELECT @@global.innodb_sync_spin_loops IN (18446744073709551615,4294967295);
+
+--echo '#--------------------FN_DYNVARS_046_05-------------------------#'
+###########################################################################
# Change the value of innodb_sync_spin_loops to invalid value #
###########################################################################
@@ -91,22 +113,38 @@ SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = "Y";
SELECT @@global.innodb_sync_spin_loops;
-SET @@global.innodb_sync_spin_loops = 1001;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = 65535.01;
+SELECT @@global.innodb_sync_spin_loops;
+
+SET @@global.innodb_sync_spin_loops = -1024;
+SELECT @@global.innodb_sync_spin_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = " ";
+SELECT @@global.innodb_sync_spin_loops;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_sync_spin_loops = ' ';
SELECT @@global.innodb_sync_spin_loops;
---echo '#----------------------FN_DYNVARS_046_05------------------------#'
+--echo '#----------------------FN_DYNVARS_046_06------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_sync_spin_loops =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
+--enable_warnings
SELECT @@global.innodb_sync_spin_loops;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_sync_spin_loops';
+--enable_warnings
---echo '#---------------------FN_DYNVARS_046_06-------------------------#'
+--echo '#---------------------FN_DYNVARS_046_07-------------------------#'
###################################################################
# Check if ON and OFF values can be used on variable #
###################################################################
@@ -119,7 +157,7 @@ SELECT @@global.innodb_sync_spin_loops;
SET @@global.innodb_sync_spin_loops = ON;
SELECT @@global.innodb_sync_spin_loops;
---echo '#---------------------FN_DYNVARS_046_07----------------------#'
+--echo '#---------------------FN_DYNVARS_046_08----------------------#'
###################################################################
# Check if TRUE and FALSE values can be used on variable #
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test b/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
index e7503bd334d..e3e4bda345e 100644
--- a/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_table_locks_basic.test
@@ -106,7 +106,7 @@ SELECT @@global.innodb_table_locks;
# for session
---error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@session.innodb_table_locks = -6;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@session.innodb_table_locks = 1.6;
@@ -128,7 +128,7 @@ SET @@session.innodb_table_locks = ÓFF;
# for global
---error ER_WRONG_VALUE_FOR_VAR
+--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = -1;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.innodb_table_locks = 2;
@@ -165,24 +165,32 @@ SELECT @@session.innodb_table_locks AS res_is_1;
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT IF(@@global.innodb_table_locks, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_table_locks';
+--enable_warnings
SELECT @@global.innodb_table_locks;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_table_locks';
+--enable_warnings
--echo '#----------------------FN_DYNVARS_046_07------------------------#'
#########################################################################
# Check if the value in SESSION Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT IF(@@session.innodb_table_locks, "ON", "OFF") =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_table_locks';
+--enable_warnings
SELECT @@session.innodb_table_locks;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_VARIABLES
WHERE VARIABLE_NAME='innodb_table_locks';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_08-------------------------#'
diff --git a/mysql-test/suite/sys_vars/t/innodb_table_locks_func.test b/mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
index d69cacd1377..330addd6b3b 100644
--- a/mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
+++ b/mysql-test/suite/sys_vars/t/innodb_table_locks_func.test
@@ -31,7 +31,9 @@ SET @start_value= @@global.innodb_table_locks;
SELECT @start_value;
SET @@global.innodb_table_locks = OFF;
+--echo 'connect (con1,localhost,root,,,,)'
connect (con1,localhost,root,,,,);
+--echo 'connection con1'
connection con1;
SELECT @@global.innodb_table_locks;
SELECT @@session.innodb_table_locks;
@@ -46,8 +48,10 @@ disconnect con1;
#==============================================================================
--echo '----check when innodb_table_locks = ON and autocommit = OFF---'
#==============================================================================
+--echo 'connect (con2,localhost,root,,,,)'
connect (con2,localhost,root,,,,);
+--echo 'connection default'
connection default;
--disable_warnings
@@ -62,14 +66,17 @@ BEGIN;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1 FOR UPDATE;
+--echo 'CONNECTION con2'
CONNECTION con2;
SET @@innodb_table_locks = ON;
SET @@autocommit = OFF;
send LOCK TABLES t1 WRITE;
+--echo 'CONNECTION default'
CONNECTION default;
COMMIT;
+--echo 'CONNECTION con2'
CONNECTION con2;
reap;
UNLOCK tables;
diff --git a/mysql-test/suite/sys_vars/t/innodb_additional_mem_pool_size_basic.test b/mysql-test/suite/sys_vars/t/innodb_temp_data_file_path_basic.test
index ffb1046ed32..607ee9b27e2 100644
--- a/mysql-test/suite/sys_vars/t/innodb_additional_mem_pool_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_temp_data_file_path_basic.test
@@ -1,18 +1,18 @@
-################## mysql-test\t\innodb_additional_mem_pool_size_basic.test ####
+################ mysql-test\t\innodb_temp_data_file_path_basic.test ############
# #
-# Variable Name: innodb_additional_mem_pool_size #
+# Variable Name: innodb_temp_data_file_path #
# Scope: Global #
# Access Type: Static #
-# Data Type: numeric #
+# Data Type: filename #
# #
# #
-# Creation Date: 2008-02-07 #
-# Author : Sharique Abdullah #
+# Creation Date: 2012-12-27 #
+# Author : Krunal Bauskar #
# #
# #
-# Description:Test Cases of Dynamic System Variable innodb_additional_mem_pool_size#
+# Description:Test Cases of Dynamic System Variable innodb_temp_data_file_path#
# that checks the behavior of this variable in the following ways #
# * Value Check #
# * Scope Check #
@@ -24,79 +24,83 @@
--source include/have_innodb.inc
---echo '#---------------------BS_STVARS_020_01----------------------#'
+--echo '#---------------------BS_STVARS_024_01----------------------#'
####################################################################
# Displaying default value #
####################################################################
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
--echo 1 Expected
---echo '#---------------------BS_STVARS_020_02----------------------#'
+--echo '#---------------------BS_STVARS_024_02----------------------#'
####################################################################
# Check if Value can set #
####################################################################
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SET @@GLOBAL.innodb_additional_mem_pool_size=1;
+SET @@GLOBAL.innodb_temp_data_file_path=1;
--echo Expected error 'Read only variable'
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
--echo 1 Expected
---echo '#---------------------BS_STVARS_020_03----------------------#'
+--echo '#---------------------BS_STVARS_024_03----------------------#'
#################################################################
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
-SELECT @@GLOBAL.innodb_additional_mem_pool_size = VARIABLE_VALUE
+--disable_warnings
+SELECT @@GLOBAL.innodb_temp_data_file_path = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
+WHERE VARIABLE_NAME='innodb_temp_data_file_path';
+--enable_warnings
--echo 1 Expected
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
-FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
-WHERE VARIABLE_NAME='innodb_additional_mem_pool_size';
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_temp_data_file_path';
+--enable_warnings
--echo 1 Expected
---echo '#---------------------BS_STVARS_020_04----------------------#'
+--echo '#---------------------BS_STVARS_024_04----------------------#'
################################################################################
# Check if accessing variable with and without GLOBAL point to same variable #
################################################################################
-SELECT @@innodb_additional_mem_pool_size = @@GLOBAL.innodb_additional_mem_pool_size;
+SELECT @@innodb_temp_data_file_path = @@GLOBAL.innodb_temp_data_file_path;
--echo 1 Expected
---echo '#---------------------BS_STVARS_020_05----------------------#'
+--echo '#---------------------BS_STVARS_024_05----------------------#'
################################################################################
-# Check if innodb_additional_mem_pool_size can be accessed with and without @@ sign #
+#Check if innodb_temp_data_file_path can be accessed with and without @@ sign #
################################################################################
-SELECT COUNT(@@innodb_additional_mem_pool_size);
+SELECT COUNT(@@innodb_temp_data_file_path);
--echo 1 Expected
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@local.innodb_additional_mem_pool_size);
+SELECT COUNT(@@local.innodb_temp_data_file_path);
--echo Expected error 'Variable is a GLOBAL variable'
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
-SELECT COUNT(@@SESSION.innodb_additional_mem_pool_size);
+SELECT COUNT(@@SESSION.innodb_temp_data_file_path);
--echo Expected error 'Variable is a GLOBAL variable'
-SELECT COUNT(@@GLOBAL.innodb_additional_mem_pool_size);
+SELECT COUNT(@@GLOBAL.innodb_temp_data_file_path);
--echo 1 Expected
--Error ER_BAD_FIELD_ERROR
-SELECT innodb_additional_mem_pool_size = @@SESSION.innodb_additional_mem_pool_size;
+SELECT innodb_temp_data_file_path = @@SESSION.innodb_temp_data_file_path;
--echo Expected error 'Readonly variable'
diff --git a/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test b/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test
index d30ec214f4a..0be32543d26 100644
--- a/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_thread_concurrency_basic.test
@@ -99,22 +99,35 @@ SELECT @@global.innodb_thread_concurrency;
--Error ER_WRONG_TYPE_FOR_VAR
SET @@global.innodb_thread_concurrency = "Y";
SELECT @@global.innodb_thread_concurrency;
-
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_thread_concurrency = ' ';
+SELECT @@global.innodb_thread_concurrency;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_thread_concurrency = " ";
+SELECT @@global.innodb_thread_concurrency;
SET @@global.innodb_thread_concurrency = 1001;
SELECT @@global.innodb_thread_concurrency;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.innodb_thread_concurrency = 255.01;
+SELECT @@global.innodb_thread_concurrency;
+
--echo '#----------------------FN_DYNVARS_046_05------------------------#'
#########################################################################
# Check if the value in GLOBAL Table matches value in variable #
#########################################################################
+--disable_warnings
SELECT @@global.innodb_thread_concurrency =
VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_thread_concurrency';
+--enable_warnings
SELECT @@global.innodb_thread_concurrency;
+--disable_warnings
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_thread_concurrency';
+--enable_warnings
--echo '#---------------------FN_DYNVARS_046_06-------------------------#'
###################################################################
diff --git a/mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test
index d7207515fe1..04f406a311d 100644
--- a/mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test
@@ -13,20 +13,26 @@ select @@global.innodb_trx_purge_view_update_only_debug;
select @@session.innodb_trx_purge_view_update_only_debug;
show global variables like 'innodb_trx_purge_view_update_only_debug';
show session variables like 'innodb_trx_purge_view_update_only_debug';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
+--enable_warnings
#
# show that it's writable
#
set global innodb_trx_purge_view_update_only_debug=1;
select @@global.innodb_trx_purge_view_update_only_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
+--enable_warnings
set @@global.innodb_trx_purge_view_update_only_debug=0;
select @@global.innodb_trx_purge_view_update_only_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_purge_view_update_only_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_purge_view_update_only_debug';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_trx_purge_view_update_only_debug='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
index d17917de8e9..858e1b63908 100644
--- a/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
@@ -13,20 +13,26 @@ select @@global.innodb_trx_rseg_n_slots_debug;
select @@session.innodb_trx_rseg_n_slots_debug;
show global variables like 'innodb_trx_rseg_n_slots_debug';
show session variables like 'innodb_trx_rseg_n_slots_debug';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+--enable_warnings
#
# show that it's writable
#
set global innodb_trx_rseg_n_slots_debug=1;
select @@global.innodb_trx_rseg_n_slots_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+--enable_warnings
set @@global.innodb_trx_rseg_n_slots_debug=0;
select @@global.innodb_trx_rseg_n_slots_debug;
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+--enable_warnings
--error ER_GLOBAL_VARIABLE
set session innodb_trx_rseg_n_slots_debug='some';
--error ER_GLOBAL_VARIABLE
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test b/mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test
index 583dbe6aa03..0df071c2029 100644
--- a/mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_directory_basic.test
@@ -21,8 +21,8 @@
####################################################################
# Display the default value #
####################################################################
-SELECT @@GLOBAL.innodb_undo_directory;
---echo . Expected
+SELECT COUNT(@@GLOBAL.innodb_undo_directory);
+--echo 1 Expected
####################################################################
@@ -41,17 +41,21 @@ SELECT COUNT(@@GLOBAL.innodb_undo_directory);
# Check if the value in GLOBAL table matches value in variable #
################################################################################
-SELECT VARIABLE_VALUE
+--disable_warnings
+SELECT @@GLOBAL.innodb_undo_directory = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_undo_directory';
---echo . Expected
+--enable_warnings
+--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_undo_directory);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_undo_directory';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_log_truncate_basic.test b/mysql-test/suite/sys_vars/t/innodb_undo_log_truncate_basic.test
new file mode 100644
index 00000000000..b60f9be22fa
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_log_truncate_basic.test
@@ -0,0 +1,113 @@
+
+
+############### mysql-test\t\innodb_undo_log_truncate_basic.test ##############
+# #
+# Variable Name: innodb_undo_log_truncate #
+# Scope: Global #
+# Access Type: Dynamic #
+# Data Type: boolean #
+# #
+# #
+# Creation Date: 2008-02-07 #
+# Author : Sharique Abdullah #
+# #
+# #
+# Description:Test Cases of Dynamic System Variable innodb_undo_log_truncate #
+# 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
+
+SET @start_global_value = @@global.innodb_undo_log_truncate;
+SELECT @start_global_value;
+
+
+--echo '#---------------------BS_STVARS_028_01----------------------#'
+####################################################################
+# Displaying default value #
+####################################################################
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+--echo 1 Expected
+
+
+--echo '#---------------------BS_STVARS_028_02----------------------#'
+####################################################################
+# Check if Value can set #
+####################################################################
+
+SET @@global.innodb_undo_log_truncate = 0;
+SELECT @@global.innodb_undo_log_truncate;
+
+SET @@global.innodb_undo_log_truncate ='On' ;
+SELECT @@global.innodb_undo_log_truncate;
+
+SET @@global.innodb_undo_log_truncate ='Off' ;
+SELECT @@global.innodb_undo_log_truncate;
+
+SET @@global.innodb_undo_log_truncate = 1;
+SELECT @@global.innodb_undo_log_truncate;
+
+--echo '#---------------------BS_STVARS_028_03----------------------#'
+#################################################################
+# Check if the value in GLOBAL Table matches value in variable #
+#################################################################
+
+--disable_warnings
+SELECT IF(@@GLOBAL.innodb_undo_log_truncate,'ON','OFF') = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_undo_log_truncate';
+--echo 1 Expected
+
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+--echo 1 Expected
+
+SELECT COUNT(VARIABLE_VALUE)
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='innodb_undo_log_truncate';
+--echo 1 Expected
+--enable_warnings
+
+
+--echo '#---------------------BS_STVARS_028_04----------------------#'
+################################################################################
+# Check if accessing variable with and without GLOBAL point to same variable #
+################################################################################
+SELECT @@innodb_undo_log_truncate = @@GLOBAL.innodb_undo_log_truncate;
+--echo 1 Expected
+
+
+
+--echo '#---------------------BS_STVARS_028_05----------------------#'
+################################################################################
+# Check if innodb_undo_log_truncate can be accessed with and without @@ sign #
+################################################################################
+
+SELECT COUNT(@@innodb_undo_log_truncate);
+--echo 1 Expected
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@local.innodb_undo_log_truncate);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT COUNT(@@SESSION.innodb_undo_log_truncate);
+--echo Expected error 'Variable is a GLOBAL variable'
+
+SELECT COUNT(@@GLOBAL.innodb_undo_log_truncate);
+--echo 1 Expected
+
+--Error ER_BAD_FIELD_ERROR
+SELECT innodb_undo_log_truncate = @@SESSION.innodb_undo_log_truncate;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_undo_log_truncate = @start_global_value;
+SELECT @@global.innodb_undo_log_truncate;
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
index 77b6af6909c..f83b5ede247 100644
--- a/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
@@ -39,9 +39,11 @@ SELECT COUNT(@@GLOBAL.innodb_undo_logs);
# Check if the value in GLOBAL table matches value in variable #
################################################################################
+--disable_warnings
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_undo_logs';
+--enable_warnings
--echo 128 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test b/mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test
index 53396249e03..e1744b09038 100644
--- a/mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_undo_tablespaces_basic.test
@@ -18,11 +18,8 @@
--source include/have_innodb.inc
-####################################################################
-# Display default value #
-####################################################################
-SELECT @@GLOBAL.innodb_undo_tablespaces;
---echo 0 Expected
+SELECT @@GLOBAL.innodb_undo_tablespaces >= 0;
+let $undo_tablespaces=`SELECT @@GLOBAL.innodb_undo_tablespaces`;
####################################################################
@@ -41,9 +38,13 @@ SELECT COUNT(@@GLOBAL.innodb_undo_tablespaces);
# Check if the value in GLOBAL table matches value in variable #
################################################################################
-SELECT VARIABLE_VALUE
+--disable_warnings
+--disable_query_log
+eval SELECT VARIABLE_VALUE-$undo_tablespaces DIFFERENCE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_undo_tablespaces';
+--enable_query_log
+--enable_warnings
--echo 0 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
index 37879530d75..524b5a7b161 100644
--- a/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_use_native_aio_basic.test
@@ -52,17 +52,21 @@ SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
# Check if the value in GLOBAL Table matches value in variable #
#################################################################
+--disable_warnings
SELECT IF(@@GLOBAL.innodb_use_native_aio, 'ON', 'OFF') = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
+--enable_warnings
--echo 1 Expected
SELECT COUNT(@@GLOBAL.innodb_use_native_aio);
--echo 1 Expected
+--disable_warnings
SELECT COUNT(VARIABLE_VALUE)
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='innodb_use_native_aio';
+--enable_warnings
--echo 1 Expected
diff --git a/mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test b/mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test
deleted file mode 100644
index 699773f4a62..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#
-# 2010-01-27 OBN - Added
-#
-
---source include/have_innodb.inc
-
-# when running with valgring, mtr uses --innodb-use-sys-malloc=0,
-# while below we want to see the default value.
---source include/not_valgrind.inc
-
-#
-# show the global and session values;
-#
---echo Valid values are 'ON' and 'OFF'
-select @@global.innodb_use_sys_malloc;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_use_sys_malloc;
-show global variables like 'innodb_use_sys_malloc';
-show session variables like 'innodb_use_sys_malloc';
-select * from information_schema.global_variables where variable_name='innodb_use_sys_malloc';
-select * from information_schema.session_variables where variable_name='innodb_use_sys_malloc';
-
-#
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_use_sys_malloc=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session innodb_use_sys_malloc=1;
-
diff --git a/mysql-test/suite/sys_vars/t/innodb_version_basic.test b/mysql-test/suite/sys_vars/t/innodb_version_basic.test
index 6ee2adf6cf9..182841048f7 100644
--- a/mysql-test/suite/sys_vars/t/innodb_version_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_version_basic.test
@@ -15,8 +15,10 @@ select @@global.innodb_version;
select @@session.innodb_version;
--echo show global variables like 'innodb_version' disabled so to not change with every version;
--echo show session variables like 'innodb_version' disabled so to not change with every version;
+--disable_warnings
select VARIABLE_VALUE=@@global.innodb_version from information_schema.global_variables where variable_name='innodb_version';
select VARIABLE_VALUE=@@global.innodb_version from information_schema.session_variables where variable_name='innodb_version';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test b/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test
index 8efa6576a66..d9556af37d1 100644
--- a/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test
+++ b/mysql-test/suite/sys_vars/t/innodb_write_io_threads_basic.test
@@ -13,8 +13,10 @@ select @@global.innodb_write_io_threads;
select @@session.innodb_write_io_threads;
show global variables like 'innodb_write_io_threads';
show session variables like 'innodb_write_io_threads';
+--disable_warnings
select * from information_schema.global_variables where variable_name='innodb_write_io_threads';
select * from information_schema.session_variables where variable_name='innodb_write_io_threads';
+--enable_warnings
#
# show that it's read-only
diff --git a/mysql-test/t/ctype_utf8mb4_innodb-master.opt b/mysql-test/t/ctype_utf8mb4_innodb-master.opt
index 96f0ce3f36c..56d40323eae 100644
--- a/mysql-test/t/ctype_utf8mb4_innodb-master.opt
+++ b/mysql-test/t/ctype_utf8mb4_innodb-master.opt
@@ -1 +1,2 @@
--default-storage-engine=MyISAM
+--loose-innodb-large-prefix=OFF
diff --git a/mysql-test/t/mysqlbinlog_row_minimal.test b/mysql-test/t/mysqlbinlog_row_minimal.test
index 9c319880fbd..7909f75e9a1 100644
--- a/mysql-test/t/mysqlbinlog_row_minimal.test
+++ b/mysql-test/t/mysqlbinlog_row_minimal.test
@@ -27,7 +27,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
---replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /mapped to number \d*/mapped to number num/ /CRC32 0x[0-9a-f]+/CRC32 XXX/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;
diff --git a/mysql-test/t/partition_exchange-master.opt b/mysql-test/t/partition_exchange-master.opt
new file mode 100644
index 00000000000..5a0380b7a1d
--- /dev/null
+++ b/mysql-test/t/partition_exchange-master.opt
@@ -0,0 +1 @@
+--loose-innodb_default_row_format=COMPACT
diff --git a/mysql-test/t/partition_innodb-master.opt b/mysql-test/t/partition_innodb-master.opt
new file mode 100644
index 00000000000..cf94b2d7dca
--- /dev/null
+++ b/mysql-test/t/partition_innodb-master.opt
@@ -0,0 +1 @@
+--loose-innodb-large-prefix=OFF
diff --git a/mysql-test/t/row-checksum-master.opt b/mysql-test/t/row-checksum-master.opt
new file mode 100644
index 00000000000..990e4941ae9
--- /dev/null
+++ b/mysql-test/t/row-checksum-master.opt
@@ -0,0 +1 @@
+--loose-innodb-strict-mode=0
diff --git a/mysql-test/t/row-checksum-old-master.opt b/mysql-test/t/row-checksum-old-master.opt
index 8e7b7f9e36f..40027795fff 100644
--- a/mysql-test/t/row-checksum-old-master.opt
+++ b/mysql-test/t/row-checksum-old-master.opt
@@ -1 +1,2 @@
--old
+--loose-innodb-strict-mode=0
diff --git a/mysql-test/thou_shalt_not_kill.pm b/mysql-test/thou_shalt_not_kill.pm
new file mode 100755
index 00000000000..9a562761d04
--- /dev/null
+++ b/mysql-test/thou_shalt_not_kill.pm
@@ -0,0 +1,26 @@
+package thou_shalt_not_kill;
+require Exporter;
+@ISA = 'Exporter';
+@EXPORT_OK = 'kill';
+
+use subs 'kill';
+use Carp qw(cluck);
+
+sub import {
+ my $pkg = shift;
+ $pkg->export('CORE::GLOBAL', 'kill', @_);
+}
+
+sub kill {
+ return CORE::kill(@_) unless $_[0];
+ cluck "kill(@_)";
+ print "\e[1;31m" if -t STDOUT;
+ system "pstree -c $_" foreach @_[1..$#_];
+ print "\e[0;39m" if -t STDOUT;
+ print STDERR 'Kill [y/n] ? ';
+ my $answer=<STDIN>;
+ return CORE::kill(@_) if $answer =~ /y/i or $answer eq "\n";
+ 1;
+}
+
+1;