[Commits] 2e814d4: Merge InnoDB 5.7 from mysql-5.7.9.

Jan Lindström jan.lindstrom at mariadb.com
Fri Sep 2 13:22:52 EEST 2016


revision-id: 2e814d4702d71a04388386a9f591d14a35980bfe (mariadb-10.2.1-4-g2e814d4)
parent(s): 848d211c5c4df00b819cd84d7530cf7d29bb0524
committer: Jan Lindström
timestamp: 2016-09-02 13:22:28 +0300
message:

Merge InnoDB 5.7 from mysql-5.7.9.

Contains also

MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7

	The failure happened because 5.7 has changed the signature of
	the bool handler::primary_key_is_clustered() const
	virtual function ("const" was added). InnoDB was using the old
	signature which caused the function not to be used.

MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7

	Fixed mutexing problem on lock_trx_handle_wait. Note that
	rpl_parallel and rpl_optimistic_parallel tests still
	fail.

MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
  Reason: incorrect merge

MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
  Reason: incorrect merge

---
 BUILD/SETUP.sh                                     |     2 +-
 configure.cmake                                    |     2 +-
 extra/CMakeLists.txt                               |     2 +
 extra/innochecksum.cc                              |  2283 +--
 include/dur_prop.h                                 |    32 +
 include/my_icp.h                                   |    48 +
 include/mysql/psi/psi_base.h                       |   147 +
 include/mysql/psi/psi_memory.h                     |   155 +
 mysql-test/disabled.def                            |     4 +
 mysql-test/include/expect_crash.inc                |     5 +
 mysql-test/include/have_innodb_16k.inc             |     2 +
 mysql-test/include/have_innodb_32k.inc             |     6 +-
 mysql-test/include/have_innodb_4k.inc              |     6 +
 mysql-test/include/have_innodb_64k.inc             |     2 +-
 mysql-test/include/have_innodb_8k.inc              |     6 +
 mysql-test/include/have_innodb_max_16k.inc         |     4 +
 mysql-test/include/have_innodb_zip.inc             |     4 +
 mysql-test/include/have_numa.inc                   |    18 +
 mysql-test/include/have_xtradb.combinations        |    10 +-
 mysql-test/include/mtr_check.sql                   |     1 +
 mysql-test/mysql-test-run.pl                       |     9 +-
 mysql-test/r/alter_table.result                    |     4 +-
 mysql-test/r/group_min_max_innodb.result           |     4 +-
 mysql-test/r/innodb_icp.result                     |     2 +-
 mysql-test/r/mysqlbinlog_row_minimal.result        |    16 +-
 mysql-test/r/mysqld--help.result                   |     4 -
 mysql-test/r/order_by_optimizer_innodb.result      |     4 +-
 mysql-test/r/partition_innodb.result               |    12 +-
 mysql-test/r/partition_innodb_plugin.result        |     8 +-
 mysql-test/r/range_vs_index_merge_innodb.result    |    68 +-
 mysql-test/r/row-checksum-old.result               |     2 +-
 mysql-test/r/row-checksum.result                   |     2 +-
 mysql-test/r/selectivity_innodb.result             |    20 +-
 mysql-test/r/stat_tables_innodb.result             |     4 +-
 mysql-test/r/type_bit_innodb.result                |     2 +-
 mysql-test/suite/encryption/disabled.def           |     1 +
 .../suite/encryption/r/debug_key_management.result |     8 +-
 .../encryption/r/innodb-bad-key-change.result      |     7 +-
 .../encryption/r/innodb-bad-key-change3.result     |     9 +-
 .../encryption/r/innodb-bad-key-change4.result     |     8 +-
 .../encryption/r/innodb-bad-key-change5.result     |     6 +
 .../encryption/r/innodb-discard-import.result      |    11 +-
 .../encryption/r/innodb-encryption-alter.result    |     4 +
 .../encryption/r/innodb-encryption-disable.result  |    16 +
 .../suite/encryption/r/innodb-log-encrypt.result   |     4 +
 .../encryption/r/innodb-page_encryption.result     |     8 +
 .../r/innodb-page_encryption_compression.result    |     8 +
 .../r/innodb-page_encryption_log_encryption.result |     8 +
 .../r/innodb_encryption_discard_import.result      |    11 +-
 .../encryption/r/innodb_encryption_filekeys.result |     4 +
 .../suite/encryption/r/innodb_encryption_is.result |     4 +
 .../r/innodb_encryption_row_compressed.result      |   159 +
 .../encryption/r/innodb_encryption_tables.result   |     6 +
 .../r/innodb_onlinealter_encryption.result         |     4 +
 .../r/innodb_page_encryption_key_change.result     |     6 +
 .../suite/encryption/t/innodb-bad-key-change.test  |     2 +
 .../suite/encryption/t/innodb-bad-key-change3.test |     4 +-
 .../suite/encryption/t/innodb-discard-import.test  |     3 +-
 .../encryption/t/innodb-encryption-disable.test    |    17 +-
 .../t/innodb_encryption_discard_import.test        |     4 +-
 .../t/innodb_encryption_row_compressed.opt         |     4 +
 .../t/innodb_encryption_row_compressed.test        |   125 +
 mysql-test/suite/funcs_1/r/is_tables_innodb.result |    10 +-
 mysql-test/suite/funcs_1/r/is_tables_mysql.result  |     4 +-
 mysql-test/suite/handler/disabled.def              |    13 +
 mysql-test/suite/innodb/disabled.def               |     4 +
 .../include/innodb_simulate_comp_failures.inc      |    10 +-
 .../suite/innodb/r/group_commit_crash.result       |     2 +
 .../r/group_commit_crash_no_optimize_thread.result |     2 +
 mysql-test/suite/innodb/r/help_url.result          |     2 -
 mysql-test/suite/innodb/r/innodb-16k.result        |    26 +-
 .../suite/innodb/r/innodb-alter-discard.result     |     8 +-
 mysql-test/suite/innodb/r/innodb-blob.result       |    42 +-
 .../suite/innodb/r/innodb-bug-14068765.result      |     4 +-
 .../suite/innodb/r/innodb-bug-14084530.result      |     4 +-
 .../innodb/r/innodb-change-buffer-recovery.result  |     9 +-
 .../suite/innodb/r/innodb-fk-warnings.result       |     2 +-
 mysql-test/suite/innodb/r/innodb-index.result      |    14 +-
 mysql-test/suite/innodb/r/innodb-mdev-7408.result  |     1 +
 mysql-test/suite/innodb/r/innodb-mdev-7513.result  |     1 +
 .../innodb/r/innodb-page_compression_bzip2.result  |     4 +
 .../innodb/r/innodb-page_compression_lz4.result    |     4 +
 .../innodb/r/innodb-page_compression_lzma.result   |     4 +
 .../innodb/r/innodb-page_compression_lzo.result    |     4 +
 .../innodb/r/innodb-page_compression_snappy.result |     4 +
 .../innodb/r/innodb-page_compression_tables.result |     6 +
 .../innodb/r/innodb-page_compression_zip.result    |     4 +
 .../suite/innodb/r/innodb-virtual-columns.result   |   118 +
 mysql-test/suite/innodb/r/innodb-wl5522-1.result   |    11 +-
 .../suite/innodb/r/innodb-wl5522-debug-zip.result  |    29 +-
 mysql-test/suite/innodb/r/innodb-wl5522-zip.result |    18 +-
 mysql-test/suite/innodb/r/innodb-wl5522.result     |    25 +-
 mysql-test/suite/innodb/r/innodb.result            |   114 +-
 .../suite/innodb/r/innodb_blob_truncate.result     |     4 +
 .../r/innodb_blob_unrecoverable_crash.result       |    24 -
 .../suite/innodb/r/innodb_bug12400341.result       |     1 +
 .../suite/innodb/r/innodb_bug12902967.result       |     3 +-
 .../suite/innodb/r/innodb_bug14147491.result       |    24 +-
 mysql-test/suite/innodb/r/innodb_bug30423.result   |    12 +-
 mysql-test/suite/innodb/r/innodb_bug34053.result   |     2 +-
 mysql-test/suite/innodb/r/innodb_bug34300.result   |    19 +-
 mysql-test/suite/innodb/r/innodb_bug46000.result   |     2 +-
 mysql-test/suite/innodb/r/innodb_bug47167.result   |    12 +-
 mysql-test/suite/innodb/r/innodb_bug54044.result   |     2 +-
 mysql-test/suite/innodb/r/innodb_bug60049.result   |     2 -
 .../suite/innodb/r/innodb_corrupt_bit.result       |    84 +-
 .../suite/innodb/r/innodb_file_format.result       |    26 +-
 mysql-test/suite/innodb/r/innodb_gis.result        |     2 +-
 .../innodb/r/innodb_information_schema.result      |    10 +-
 .../r/innodb_information_schema_buffer.result      |     1 +
 mysql-test/suite/innodb/r/innodb_monitor.result    |    29 +-
 .../r/innodb_prefix_index_restart_server.result    |    12 +-
 .../r/innodb_simulate_comp_failures_small.result   |    13 +-
 .../r/innodb_stats_create_on_corrupted.result      |     4 +-
 .../innodb/r/innodb_stats_fetch_corrupted.result   |     4 +-
 mysql-test/suite/innodb/r/strict_mode.result       |     3 +-
 mysql-test/suite/innodb/t/auto_increment_dup.opt   |     1 +
 .../suite/innodb/t/create_isl_with_direct.test     |     2 +-
 mysql-test/suite/innodb/t/innodb-16k.test          |    21 +-
 .../suite/innodb/t/innodb-alter-discard.test       |     6 +
 mysql-test/suite/innodb/t/innodb-blob.test         |    54 +-
 .../t/innodb-change-buffer-recovery-master.opt     |     1 +
 .../innodb/t/innodb-change-buffer-recovery.test    |    24 +-
 mysql-test/suite/innodb/t/innodb-mdev-7408.test    |     2 +
 .../suite/innodb/t/innodb-mdev-7513-master.opt     |     1 +
 mysql-test/suite/innodb/t/innodb-mdev-7513.test    |     1 +
 mysql-test/suite/innodb/t/innodb-mdev7046.test     |     1 +
 .../suite/innodb/t/innodb-virtual-columns.test     |     6 +
 mysql-test/suite/innodb/t/innodb-wl5522-1.test     |     2 +
 .../suite/innodb/t/innodb-wl5522-debug-zip.test    |     3 +
 mysql-test/suite/innodb/t/innodb-wl5522-zip.test   |     2 +
 mysql-test/suite/innodb/t/innodb-wl5522.test       |     2 +
 mysql-test/suite/innodb/t/innodb.test              |   128 +-
 .../innodb/t/innodb_blob_unrecoverable_crash.test  |    52 -
 mysql-test/suite/innodb/t/innodb_bug12400341.test  |     4 +-
 mysql-test/suite/innodb/t/innodb_bug12902967.test  |     9 +-
 .../suite/innodb/t/innodb_bug14147491-master.opt   |     5 +-
 mysql-test/suite/innodb/t/innodb_bug14147491.test  |    56 +-
 mysql-test/suite/innodb/t/innodb_bug30423.test     |     2 +
 mysql-test/suite/innodb/t/innodb_bug34053.test     |    20 +-
 mysql-test/suite/innodb/t/innodb_bug34300.test     |    28 +-
 .../suite/innodb/t/innodb_bug60049-master.opt      |     2 +-
 mysql-test/suite/innodb/t/innodb_bug60049.test     |    17 +-
 mysql-test/suite/innodb/t/innodb_corrupt_bit.test  |    22 +-
 mysql-test/suite/innodb/t/innodb_gis.test          |     5 +-
 .../innodb/t/innodb_stats_create_on_corrupted.test |     4 +-
 .../innodb/t/innodb_stats_fetch_corrupted.test     |     4 +-
 mysql-test/suite/innodb/t/strict_mode.test         |     2 +
 .../suite/innodb_zip/include/innodb-wl6045.inc     |    20 +
 .../innodb_zip/include/innodb_create_tab_indx.inc  |    16 +
 .../suite/innodb_zip/include/innodb_dml_ops.inc    |    82 +
 .../innodb_zip/include/innodb_fetch_records.inc    |     7 +
 .../suite/innodb_zip/include/innodb_load_data.inc  |    19 +
 .../innodb_zip/include/innodb_stats_comp_index.inc |    26 +
 .../innodb_zip/include/innodb_stats_restart.inc    |    12 +
 .../innodb_zip/include/innodb_temp_table_dml.inc   |    40 +
 .../include/innodb_wl6501_crash_stripped.inc       |   144 +
 .../innodb_zip/include/innodb_wl6501_error.inc     |   234 +
 .../innodb_zip/include/innodb_wl6501_scale.inc     |   113 +
 mysql-test/suite/innodb_zip/r/16k.result           |   745 +
 mysql-test/suite/innodb_zip/r/4k.result            |   442 +
 mysql-test/suite/innodb_zip/r/8k.result            |   473 +
 mysql-test/suite/innodb_zip/r/bug36169.result      |     1 +
 mysql-test/suite/innodb_zip/r/bug36172.result      |     1 +
 mysql-test/suite/innodb_zip/r/bug52745.result      |   129 +
 mysql-test/suite/innodb_zip/r/bug53591.result      |    13 +
 mysql-test/suite/innodb_zip/r/bug56680.result      |   120 +
 .../suite/innodb_zip/r/cmp_drop_table.result       |    13 +
 mysql-test/suite/innodb_zip/r/cmp_per_index.result |    94 +
 .../suite/innodb_zip/r/create_options.result       |   839 ++
 .../suite/innodb_zip/r/index_large_prefix.result   |   534 +
 .../innodb_zip/r/index_large_prefix_4k.result      |   404 +
 .../innodb_zip/r/index_large_prefix_8k.result      |   442 +
 mysql-test/suite/innodb_zip/r/innochecksum.result  |    82 +
 .../suite/innodb_zip/r/innochecksum_2.result       |   140 +
 .../suite/innodb_zip/r/innochecksum_3.result       |   184 +
 .../innodb_zip/r/innodb-create-options.result      |    67 +-
 mysql-test/suite/innodb_zip/r/innodb-zip.result    |    53 +-
 .../suite/innodb_zip/r/innodb_bug36169.result      |     3 +
 .../suite/innodb_zip/r/innodb_bug52745.result      |     6 +-
 .../suite/innodb_zip/r/innodb_bug53591.result      |     8 +-
 .../suite/innodb_zip/r/innodb_bug56680.result      |     4 +
 .../innodb_zip/r/innodb_cmp_drop_table.result      |     4 +
 .../innodb_zip/r/innodb_index_large_prefix.result  |    43 +-
 .../r/innodb_prefix_index_liftedlimit.result       |  1396 --
 mysql-test/suite/innodb_zip/r/large_blob.result    |    83 +
 mysql-test/suite/innodb_zip/r/restart.result       |  1236 ++
 .../innodb_zip/r/wl6344_compress_level.result      |   135 +
 .../innodb_zip/r/wl6347_comp_indx_stat.result      |  8084 +++++++++++
 mysql-test/suite/innodb_zip/r/wl6470_1.result      |   598 +
 mysql-test/suite/innodb_zip/r/wl6470_2.result      |   667 +
 mysql-test/suite/innodb_zip/r/wl6501_1.result      |  1150 ++
 .../suite/innodb_zip/r/wl6501_crash_3.result       |   489 +
 .../suite/innodb_zip/r/wl6501_crash_4.result       |   553 +
 .../suite/innodb_zip/r/wl6501_crash_5.result       |   489 +
 .../suite/innodb_zip/r/wl6501_scale_1.result       |   354 +
 mysql-test/suite/innodb_zip/r/wl6560.result        |   418 +
 mysql-test/suite/innodb_zip/r/wl6915_1.result      |  2060 +++
 mysql-test/suite/innodb_zip/t/16k.test             |   715 +
 mysql-test/suite/innodb_zip/t/4k.test              |   440 +
 mysql-test/suite/innodb_zip/t/8k.test              |   468 +
 mysql-test/suite/innodb_zip/t/bug36169.test        |  1162 ++
 mysql-test/suite/innodb_zip/t/bug36172.test        |    30 +
 mysql-test/suite/innodb_zip/t/bug52745.test        |   105 +
 mysql-test/suite/innodb_zip/t/bug53591.test        |    22 +
 mysql-test/suite/innodb_zip/t/bug56680.test        |   140 +
 .../suite/innodb_zip/t/cmp_drop_table-master.opt   |     1 +
 mysql-test/suite/innodb_zip/t/cmp_drop_table.test  |    57 +
 mysql-test/suite/innodb_zip/t/cmp_per_index.test   |   118 +
 mysql-test/suite/innodb_zip/t/create_options.test  |   528 +
 mysql-test/suite/innodb_zip/t/disabled.def         |    17 +
 .../suite/innodb_zip/t/index_large_prefix.test     |   441 +
 .../suite/innodb_zip/t/index_large_prefix_4k.test  |   400 +
 .../suite/innodb_zip/t/index_large_prefix_8k.test  |   429 +
 mysql-test/suite/innodb_zip/t/innochecksum.test    |   240 +
 mysql-test/suite/innodb_zip/t/innochecksum_2.test  |   114 +
 mysql-test/suite/innodb_zip/t/innochecksum_3.test  |   378 +
 mysql-test/suite/innodb_zip/t/innodb_bug36169.opt  |     1 +
 mysql-test/suite/innodb_zip/t/innodb_bug36169.test |     2 +
 mysql-test/suite/innodb_zip/t/innodb_bug53591.test |     3 +-
 .../innodb_zip/t/innodb_index_large_prefix.test    |     8 +-
 .../t/innodb_prefix_index_liftedlimit.test         |  1371 --
 .../suite/innodb_zip/t/large_blob-master.opt       |     3 +
 mysql-test/suite/innodb_zip/t/large_blob.test      |   122 +
 mysql-test/suite/innodb_zip/t/restart.test         |   602 +
 .../suite/innodb_zip/t/wl6344_compress_level.test  |   135 +
 .../suite/innodb_zip/t/wl6347_comp_indx_stat.test  |  1337 ++
 mysql-test/suite/innodb_zip/t/wl6470_1.test        |    60 +
 mysql-test/suite/innodb_zip/t/wl6470_2.test        |   468 +
 mysql-test/suite/innodb_zip/t/wl6501_1.test        |   451 +
 mysql-test/suite/innodb_zip/t/wl6501_crash_3.test  |    26 +
 mysql-test/suite/innodb_zip/t/wl6501_crash_4.test  |    29 +
 mysql-test/suite/innodb_zip/t/wl6501_crash_5.test  |    26 +
 mysql-test/suite/innodb_zip/t/wl6501_scale_1.test  |    41 +
 mysql-test/suite/innodb_zip/t/wl6560.test          |   423 +
 mysql-test/suite/innodb_zip/t/wl6915_1.test        |   650 +
 mysql-test/suite/rpl/disabled.def                  |     3 +
 .../innodb_adaptive_hash_index_parts_basic.result  |    48 +
 .../r/innodb_adaptive_max_sleep_delay_basic.result |    26 +
 .../r/innodb_additional_mem_pool_size_basic.result |    53 -
 .../r/innodb_api_bk_commit_interval_basic.result   |    36 +
 .../r/innodb_autoextend_increment_basic.result     |     6 +
 .../r/innodb_buffer_pool_chunk_size_basic.result   |    48 +
 ...nnodb_buffer_pool_dump_at_shutdown_basic.result |     3 +-
 .../r/innodb_buffer_pool_dump_pct_basic.result     |    41 +-
 .../r/innodb_buffer_pool_filename_basic.result     |     7 -
 ...innodb_buffer_pool_load_at_startup_basic.result |     2 +-
 .../r/innodb_buffer_pool_size_basic.result         |     7 +-
 .../r/innodb_checksum_algorithm_basic.result       |    22 +-
 .../r/innodb_cmp_per_index_enabled_basic.result    |     2 -
 .../r/innodb_commit_concurrency_basic.result       |    20 +
 ..._compression_failure_threshold_pct_basic.result |    15 +
 .../r/innodb_compression_pad_pct_max_basic.result  |    15 +
 .../r/innodb_concurrency_tickets_basic.result      |    48 +-
 .../r/innodb_default_row_format_basic.result       |    48 +
 ...b_disable_resize_buffer_pool_debug_basic.result |    60 +
 .../sys_vars/r/innodb_fast_shutdown_basic.result   |    15 +
 .../sys_vars/r/innodb_file_format_basic.result     |    20 +-
 .../sys_vars/r/innodb_file_format_max_basic.result |    20 +-
 .../sys_vars/r/innodb_fill_factor_basic.result     |    42 +
 .../r/innodb_flush_log_at_timeout_basic.result     |    15 +
 .../r/innodb_flush_log_at_trx_commit_basic.result  |    26 +
 .../sys_vars/r/innodb_flush_sync_basic.result      |    92 +
 .../r/innodb_flushing_avg_loops_basic.result       |    10 +
 .../r/innodb_ft_result_cache_limit_basic.result    |    10 +-
 .../r/innodb_ft_server_stopword_table_basic.result |     1 +
 .../r/innodb_ft_user_stopword_table_basic.result   |     2 +-
 .../sys_vars/r/innodb_large_prefix_basic.result    |    24 +-
 .../r/innodb_lock_wait_timeout_basic.result        |    98 +
 .../r/innodb_log_checkpoint_now_basic.result       |    81 +-
 .../sys_vars/r/innodb_log_checksums_basic.result   |    42 +
 .../r/innodb_log_write_ahead_size_basic.result     |    88 +
 .../r/innodb_max_dirty_pages_pct_basic.result      |   108 +-
 .../r/innodb_max_dirty_pages_pct_func.result       |     7 +
 .../r/innodb_max_dirty_pages_pct_lwm_basic.result  |    32 +-
 .../sys_vars/r/innodb_max_purge_lag_basic.result   |    50 +-
 .../r/innodb_max_undo_log_size_basic.result        |    54 +
 ...nodb_merge_threshold_set_all_debug_basic.result |    28 +
 .../r/innodb_mirrored_log_groups_basic.result      |    53 -
 .../sys_vars/r/innodb_monitor_disable_basic.result |    29 +-
 .../sys_vars/r/innodb_monitor_enable_basic.result  |    29 +-
 .../r/innodb_monitor_reset_all_basic.result        |    29 +-
 .../sys_vars/r/innodb_monitor_reset_basic.result   |    29 +-
 .../sys_vars/r/innodb_numa_interleave_basic.result |    10 +
 .../sys_vars/r/innodb_old_blocks_pct_basic.result  |     8 +
 .../sys_vars/r/innodb_page_cleaners_basic.result   |    41 +
 .../suite/sys_vars/r/innodb_page_size_basic.result |     9 +-
 .../r/innodb_purge_batch_size_basic.result         |    25 +-
 ...nodb_purge_rseg_truncate_frequency_basic.result |   113 +
 .../sys_vars/r/innodb_purge_threads_basic.result   |    38 +-
 .../r/innodb_read_ahead_threshold_basic.result     |    14 +
 .../r/innodb_replication_delay_basic.result        |    44 +
 .../sys_vars/r/innodb_spin_wait_delay_basic.result |    44 +
 .../r/innodb_stats_persistent_basic.result         |     2 +-
 ...nodb_stats_persistent_sample_pages_basic.result |    26 +-
 .../r/innodb_stats_sample_pages_basic.result       |    22 +-
 ...nnodb_stats_transient_sample_pages_basic.result |     6 +
 .../sys_vars/r/innodb_strict_mode_basic.result     |    16 +-
 .../sys_vars/r/innodb_sync_debug_basic.result      |    11 +
 .../sys_vars/r/innodb_sync_spin_loops_basic.result |    56 +-
 .../sys_vars/r/innodb_table_locks_func.result      |     7 +
 .../r/innodb_temp_data_file_path_basic.result      |    53 +
 .../r/innodb_thread_concurrency_basic.result       |    15 +
 .../sys_vars/r/innodb_undo_directory_basic.result  |    16 +-
 .../r/innodb_undo_log_truncate_basic.result        |    69 +
 .../r/innodb_undo_tablespaces_basic.result         |    12 +-
 .../sys_vars/r/innodb_use_sys_malloc_basic.result  |    22 -
 mysql-test/suite/sys_vars/r/sysvars_innodb.result  |   318 +-
 .../t/innodb_adaptive_hash_index_parts_basic.test  |    75 +
 .../t/innodb_adaptive_max_sleep_delay_basic.test   |    18 +
 .../t/innodb_additional_mem_pool_size_basic.test   |   102 -
 .../t/innodb_api_bk_commit_interval_basic.test     |    27 +
 .../t/innodb_api_disable_rowlock_basic.test        |     4 +
 .../sys_vars/t/innodb_api_enable_binlog_basic.test |     4 +
 .../sys_vars/t/innodb_api_enable_mdl_basic.test    |     4 +
 .../sys_vars/t/innodb_api_trx_level_basic.test     |     6 +
 .../t/innodb_autoextend_increment_basic.test       |     7 +
 .../sys_vars/t/innodb_autoinc_lock_mode_basic.test |     4 +
 .../t/innodb_autoinc_lock_mode_func-master.opt     |     2 +-
 .../t/innodb_buffer_pool_chunk_size_basic.test     |    75 +
 .../innodb_buffer_pool_dump_at_shutdown_basic.test |     2 +
 .../t/innodb_buffer_pool_dump_pct_basic.test       |    67 +-
 .../t/innodb_buffer_pool_filename_basic.test       |    32 -
 .../t/innodb_buffer_pool_instances_basic.test      |     4 +
 .../t/innodb_buffer_pool_load_now_basic.test       |     9 +-
 .../t/innodb_buffer_pool_size_basic-master.opt     |     1 +
 .../sys_vars/t/innodb_buffer_pool_size_basic.test  |    34 +-
 .../t/innodb_change_buffer_max_size_basic.test     |     8 +
 .../sys_vars/t/innodb_change_buffering_basic.test  |     6 +
 .../t/innodb_change_buffering_debug_basic.test     |     6 +
 .../t/innodb_checksum_algorithm_basic.test         |     1 -
 .../suite/sys_vars/t/innodb_checksums_basic.test   |     4 +
 .../t/innodb_cmp_per_index_enabled_basic.test      |     3 -
 .../t/innodb_commit_concurrency_basic.test         |    12 +
 ...db_compression_failure_threshold_pct_basic.test |    14 +-
 .../sys_vars/t/innodb_compression_level_basic.test |     8 +
 .../t/innodb_compression_pad_pct_max_basic.test    |    14 +-
 .../t/innodb_concurrency_tickets_basic.test        |    48 +-
 .../sys_vars/t/innodb_data_file_path_basic.test    |     4 +
 .../sys_vars/t/innodb_data_home_dir_basic.test     |     4 +
 .../t/innodb_default_row_format_basic.test         |    41 +
 ...odb_disable_resize_buffer_pool_debug_basic.test |    72 +
 .../suite/sys_vars/t/innodb_doublewrite_basic.test |     4 +
 .../t/innodb_doublewrite_batch_size_basic.test     |     2 +
 .../sys_vars/t/innodb_fast_shutdown_basic.test     |    14 +-
 .../suite/sys_vars/t/innodb_file_format_basic.test |     6 +
 .../sys_vars/t/innodb_file_format_check_basic.test |     6 +
 .../sys_vars/t/innodb_file_format_max_basic.test   |     7 +-
 .../sys_vars/t/innodb_file_io_threads_basic.test   |     8 +
 .../t/innodb_file_per_table_basic-master.opt       |     1 +
 .../sys_vars/t/innodb_file_per_table_basic.test    |     4 +
 .../suite/sys_vars/t/innodb_fill_factor_basic.test |    41 +
 .../t/innodb_flush_log_at_timeout_basic.test       |    13 +
 .../t/innodb_flush_log_at_trx_commit_basic.test    |    22 +
 .../sys_vars/t/innodb_flush_method_basic.test      |     4 +
 .../sys_vars/t/innodb_flush_neighbors_basic.test   |    12 +
 .../suite/sys_vars/t/innodb_flush_sync_basic.test  |    77 +
 .../t/innodb_flushing_avg_loops_basic.test         |    10 +
 .../t/innodb_force_load_corrupted_basic.test       |     4 +
 .../sys_vars/t/innodb_force_recovery_basic.test    |     4 +
 .../t/innodb_force_recovery_crash_basic.test       |     2 +
 .../sys_vars/t/innodb_ft_aux_table_basic.test      |     2 +
 .../sys_vars/t/innodb_ft_cache_size_basic.test     |     2 +
 .../t/innodb_ft_enable_diag_print_basic.test       |    12 +
 .../t/innodb_ft_enable_stopword_basic.test         |    12 +
 .../sys_vars/t/innodb_ft_max_token_size_basic.test |     2 +
 .../sys_vars/t/innodb_ft_min_token_size_basic.test |     2 +
 .../t/innodb_ft_num_word_optimize_basic.test       |     6 +
 .../t/innodb_ft_result_cache_limit_basic.test      |    12 +-
 .../t/innodb_ft_server_stopword_table_basic.test   |     4 +
 .../t/innodb_ft_sort_pll_degree_basic.test         |     2 +
 .../t/innodb_ft_total_cache_size_basic.test        |    13 +-
 .../t/innodb_ft_user_stopword_table_basic.test     |     5 +-
 .../sys_vars/t/innodb_large_prefix_basic.test      |    12 +
 ...innodb_limit_optimistic_insert_debug_basic.test |     6 +
 .../sys_vars/t/innodb_lock_wait_timeout_basic.test |    71 +
 .../t/innodb_locks_unsafe_for_binlog_basic.test    |     4 +
 .../sys_vars/t/innodb_log_buffer_size_basic.test   |     4 +
 .../t/innodb_log_checkpoint_now_basic.test         |    80 +-
 .../sys_vars/t/innodb_log_checksums_basic.test     |    36 +
 .../t/innodb_log_compressed_pages_basic.test       |     9 +-
 .../sys_vars/t/innodb_log_file_size_basic.test     |     4 +
 .../t/innodb_log_files_in_group_basic.test         |     4 +
 .../t/innodb_log_group_home_dir_basic.test         |     4 +
 .../t/innodb_log_write_ahead_size_basic.test       |    93 +
 .../sys_vars/t/innodb_lru_scan_depth_basic.test    |     8 +
 .../t/innodb_max_dirty_pages_pct_basic.test        |    93 +-
 .../t/innodb_max_dirty_pages_pct_func.test         |     7 +
 .../t/innodb_max_dirty_pages_pct_lwm_basic.test    |    22 +-
 .../sys_vars/t/innodb_max_purge_lag_basic.test     |    52 +-
 .../t/innodb_max_purge_lag_delay_basic.test        |     2 +
 .../sys_vars/t/innodb_max_undo_log_size_basic.test |    99 +
 ...innodb_merge_threshold_set_all_debug_basic.test |    30 +
 .../t/innodb_mirrored_log_groups_basic.test        |   102 -
 .../sys_vars/t/innodb_monitor_disable_basic.test   |     5 -
 .../sys_vars/t/innodb_monitor_enable_basic.test    |     5 -
 .../sys_vars/t/innodb_monitor_reset_all_basic.test |     5 -
 .../sys_vars/t/innodb_monitor_reset_basic.test     |     5 -
 .../sys_vars/t/innodb_numa_interleave_basic.test   |    13 +
 .../sys_vars/t/innodb_old_blocks_pct_basic.test    |    22 +-
 .../sys_vars/t/innodb_old_blocks_time_basic.test   |     6 +
 .../t/innodb_online_alter_log_max_size_basic.test  |     6 +
 .../suite/sys_vars/t/innodb_open_files_basic.test  |     4 +
 .../t/innodb_optimize_fulltext_only_basic.test     |    12 +
 .../sys_vars/t/innodb_page_cleaners_basic.test     |    53 +
 .../sys_vars/t/innodb_page_hash_locks_basic.test   |     2 +
 .../suite/sys_vars/t/innodb_page_size_basic.test   |    17 +-
 .../t/innodb_print_all_deadlocks_basic.test        |    12 +
 .../sys_vars/t/innodb_purge_batch_size_basic.test  |    17 +-
 ...innodb_purge_rseg_truncate_frequency_basic.test |   161 +
 .../sys_vars/t/innodb_purge_threads_basic.test     |    89 +-
 .../sys_vars/t/innodb_random_read_ahead_basic.test |    12 +
 .../t/innodb_read_ahead_threshold_basic.test       |    19 +
 .../sys_vars/t/innodb_read_io_threads_basic.test   |     2 +
 .../suite/sys_vars/t/innodb_read_only_basic.test   |     2 +
 .../sys_vars/t/innodb_replication_delay_basic.test |    52 +-
 .../t/innodb_rollback_on_timeout_basic.test        |     4 +
 .../sys_vars/t/innodb_rollback_segments_basic.test |     6 +
 .../sys_vars/t/innodb_sort_buffer_size_basic.test  |     2 +
 .../sys_vars/t/innodb_spin_wait_delay_basic.test   |    51 +-
 .../sys_vars/t/innodb_stats_method_basic.test      |     8 +
 .../sys_vars/t/innodb_stats_on_metadata_basic.test |    12 +
 .../sys_vars/t/innodb_stats_persistent_basic.test  |     2 +-
 ...innodb_stats_persistent_sample_pages_basic.test |    34 +-
 .../t/innodb_stats_sample_pages_basic.test         |    28 +-
 .../innodb_stats_transient_sample_pages_basic.test |    14 +
 .../sys_vars/t/innodb_status_output_basic.test     |    14 +
 .../t/innodb_status_output_locks_basic.test        |    14 +
 .../suite/sys_vars/t/innodb_strict_mode_basic.test |    12 +
 .../suite/sys_vars/t/innodb_support_xa_basic.test  |    10 +-
 .../sys_vars/t/innodb_sync_array_size_basic.test   |     8 +-
 .../suite/sys_vars/t/innodb_sync_debug_basic.test  |    16 +
 .../sys_vars/t/innodb_sync_spin_loops_basic.test   |    50 +-
 .../suite/sys_vars/t/innodb_table_locks_basic.test |    12 +-
 .../suite/sys_vars/t/innodb_table_locks_func.test  |     7 +
 .../t/innodb_temp_data_file_path_basic.test        |   106 +
 .../t/innodb_thread_concurrency_basic.test         |    15 +-
 ...odb_trx_purge_view_update_only_debug_basic.test |     6 +
 .../t/innodb_trx_rseg_n_slots_debug_basic.test     |     6 +
 .../sys_vars/t/innodb_undo_directory_basic.test    |    12 +-
 .../sys_vars/t/innodb_undo_log_truncate_basic.test |   113 +
 .../suite/sys_vars/t/innodb_undo_logs_basic.test   |     2 +
 .../sys_vars/t/innodb_undo_tablespaces_basic.test  |    13 +-
 .../sys_vars/t/innodb_use_native_aio_basic.test    |     4 +
 .../sys_vars/t/innodb_use_sys_malloc_basic.test    |    31 -
 .../suite/sys_vars/t/innodb_version_basic.test     |     2 +
 .../sys_vars/t/innodb_write_io_threads_basic.test  |     2 +
 mysql-test/t/ctype_utf8mb4_innodb-master.opt       |     1 +
 mysql-test/t/mysqlbinlog_row_minimal.test          |     2 +-
 mysql-test/t/partition_exchange-master.opt         |     1 +
 mysql-test/t/partition_innodb-master.opt           |     1 +
 mysql-test/t/row-checksum-master.opt               |     1 +
 mysql-test/t/row-checksum-old-master.opt           |     1 +
 mysql-test/thou_shalt_not_kill.pm                  |    26 +
 sql/handler.h                                      |    38 +-
 storage/innobase/CMakeLists.txt                    |    36 +-
 storage/innobase/Doxyfile                          |  1419 --
 storage/innobase/api/api0api.cc                    |   776 +-
 storage/innobase/api/api0misc.cc                   |   125 +-
 storage/innobase/btr/btr0btr.cc                    |  2710 ++--
 storage/innobase/btr/btr0bulk.cc                   |   995 ++
 storage/innobase/btr/btr0cur.cc                    |  4395 ++++--
 storage/innobase/btr/btr0defragment.cc             |    53 +-
 storage/innobase/btr/btr0pcur.cc                   |   255 +-
 storage/innobase/btr/btr0scrub.cc                  |    70 +-
 storage/innobase/btr/btr0sea.cc                    |  1325 +-
 storage/innobase/buf/buf0buddy.cc                  |   253 +-
 storage/innobase/buf/buf0buf.cc                    |  4398 ++++--
 storage/innobase/buf/buf0checksum.cc               |    70 +-
 storage/innobase/buf/buf0dblwr.cc                  |   781 +-
 storage/innobase/buf/buf0dump.cc                   |   346 +-
 storage/innobase/buf/buf0flu.cc                    |  2417 +++-
 storage/innobase/buf/buf0lru.cc                    |   996 +-
 storage/innobase/buf/buf0mtflu.cc                  |    38 +-
 storage/innobase/buf/buf0rea.cc                    |   579 +-
 storage/innobase/data/data0data.cc                 |   267 +-
 storage/innobase/data/data0type.cc                 |    38 +-
 storage/innobase/dict/dict0boot.cc                 |   144 +-
 storage/innobase/dict/dict0crea.cc                 |  1293 +-
 storage/innobase/dict/dict0dict.cc                 |  2880 ++--
 storage/innobase/dict/dict0load.cc                 |  2354 ++--
 storage/innobase/dict/dict0mem.cc                  |   393 +-
 storage/innobase/dict/dict0stats.cc                |   744 +-
 storage/innobase/dict/dict0stats_bg.cc             |   141 +-
 storage/innobase/dyn/dyn0dyn.cc                    |    66 -
 storage/innobase/eval/eval0eval.cc                 |   140 +-
 storage/innobase/eval/eval0proc.cc                 |    20 +-
 storage/innobase/fil/fil0crypt.cc                  |   378 +-
 storage/innobase/fil/fil0fil.cc                    |  8278 +++++------
 storage/innobase/fil/fil0pagecompress.cc           |   226 +-
 storage/innobase/fsp/fsp0file.cc                   |  1130 ++
 storage/innobase/fsp/fsp0fsp.cc                    |  3144 ++---
 storage/innobase/fsp/fsp0space.cc                  |   291 +
 storage/innobase/fsp/fsp0sysspace.cc               |  1050 ++
 storage/innobase/fts/fts0ast.cc                    |   153 +-
 storage/innobase/fts/fts0blex.cc                   |    21 +-
 storage/innobase/fts/fts0blex.l                    |     1 +
 storage/innobase/fts/fts0config.cc                 |    84 +-
 storage/innobase/fts/fts0fts.cc                    |  1973 ++-
 storage/innobase/fts/fts0opt.cc                    |   436 +-
 storage/innobase/fts/fts0pars.cc                   |    13 +-
 storage/innobase/fts/fts0pars.y                    |    17 +-
 storage/innobase/fts/fts0plugin.cc                 |   295 +
 storage/innobase/fts/fts0que.cc                    |   929 +-
 storage/innobase/fts/fts0sql.cc                    |    90 +-
 storage/innobase/fts/fts0tlex.cc                   |   389 +-
 storage/innobase/fts/fts0tlex.l                    |     1 +
 storage/innobase/fut/fut0lst.cc                    |   212 +-
 storage/innobase/gis/gis0geo.cc                    |   835 ++
 storage/innobase/gis/gis0rtree.cc                  |  2016 +++
 storage/innobase/gis/gis0sea.cc                    |  2012 +++
 storage/innobase/ha/ha0ha.cc                       |   178 +-
 storage/innobase/ha/ha0storage.cc                  |    12 +-
 storage/innobase/ha/hash0hash.cc                   |   144 +-
 storage/innobase/ha_innodb.def                     |     4 -
 storage/innobase/handler/ha_innodb.cc              | 14087 ++++++++++++-------
 storage/innobase/handler/ha_innodb.h               |   724 +-
 storage/innobase/handler/ha_innopart.cc            |  4438 ++++++
 storage/innobase/handler/ha_innopart.h             |  1330 ++
 storage/innobase/handler/handler0alter.cc          |  4399 ++++--
 storage/innobase/handler/handler0alter_innopart.cc |   307 +
 storage/innobase/handler/i_s.cc                    |  1184 +-
 storage/innobase/handler/i_s.h                     |    15 +-
 storage/innobase/ibuf/ibuf0ibuf.cc                 |  1467 +-
 storage/innobase/include/api0api.h                 |   411 +-
 storage/innobase/include/api0misc.h                |     8 +-
 storage/innobase/include/btr0btr.h                 |   439 +-
 storage/innobase/include/btr0btr.ic                |    88 +-
 storage/innobase/include/btr0bulk.h                |   392 +
 storage/innobase/include/btr0cur.h                 |   431 +-
 storage/innobase/include/btr0cur.ic                |    58 +-
 storage/innobase/include/btr0pcur.h                |   152 +-
 storage/innobase/include/btr0pcur.ic               |   151 +-
 storage/innobase/include/btr0sea.h                 |   306 +-
 storage/innobase/include/btr0sea.ic                |   155 +-
 storage/innobase/include/btr0types.h               |   195 +-
 storage/innobase/include/buf0buddy.h               |    20 +-
 storage/innobase/include/buf0buddy.ic              |    10 +-
 storage/innobase/include/buf0buf.h                 |  1202 +-
 storage/innobase/include/buf0buf.ic                |   631 +-
 storage/innobase/include/buf0checksum.h            |    32 +-
 storage/innobase/include/buf0dblwr.h               |    36 +-
 storage/innobase/include/buf0dump.h                |     7 +-
 storage/innobase/include/buf0flu.h                 |   258 +-
 storage/innobase/include/buf0flu.ic                |    96 +-
 storage/innobase/include/buf0lru.h                 |    48 +-
 storage/innobase/include/buf0rea.h                 |   112 +-
 storage/innobase/include/buf0types.h               |    41 +-
 storage/innobase/include/data0data.h               |   268 +-
 storage/innobase/include/data0data.ic              |   234 +-
 storage/innobase/include/data0type.h               |   121 +-
 storage/innobase/include/data0type.ic              |    77 +-
 storage/innobase/include/db0err.h                  |    55 +-
 storage/innobase/include/dict0boot.h               |    50 +-
 storage/innobase/include/dict0boot.ic              |    10 +-
 storage/innobase/include/dict0crea.h               |   349 +-
 storage/innobase/include/dict0crea.ic              |    54 +-
 storage/innobase/include/dict0dict.h               |  1032 +-
 storage/innobase/include/dict0dict.ic              |   955 +-
 storage/innobase/include/dict0load.h               |   247 +-
 storage/innobase/include/dict0mem.h                |  1214 +-
 storage/innobase/include/dict0mem.ic               |    33 +-
 storage/innobase/include/dict0priv.h               |     8 +-
 storage/innobase/include/dict0priv.ic              |    32 +-
 storage/innobase/include/dict0stats.h              |    25 +-
 storage/innobase/include/dict0stats.ic             |    13 +-
 storage/innobase/include/dict0stats_bg.h           |    19 +-
 storage/innobase/include/dict0types.h              |    16 +-
 storage/innobase/include/dyn0buf.h                 |   505 +
 storage/innobase/include/dyn0dyn.h                 |   199 -
 storage/innobase/include/dyn0dyn.ic                |   306 -
 storage/innobase/include/dyn0types.h               |    39 +
 storage/innobase/include/eval0eval.h               |    10 +-
 storage/innobase/include/eval0eval.ic              |    12 +-
 storage/innobase/include/eval0proc.h               |    24 +-
 storage/innobase/include/eval0proc.ic              |     6 +-
 storage/innobase/include/fil0crypt.h               |    40 +-
 storage/innobase/include/fil0crypt.ic              |    53 +-
 storage/innobase/include/fil0fil.h                 |  1732 ++-
 storage/innobase/include/fil0fil.ic                |    10 +-
 storage/innobase/include/fil0pagecompress.h        |    48 +-
 storage/innobase/include/fsp0file.h                |   590 +
 storage/innobase/include/fsp0fsp.h                 |   538 +-
 storage/innobase/include/fsp0fsp.ic                |   402 +-
 storage/innobase/include/fsp0pagecompress.h        |     2 +-
 storage/innobase/include/fsp0pagecompress.ic       |    16 +-
 storage/innobase/include/fsp0space.h               |   247 +
 storage/innobase/include/fsp0sysspace.h            |   326 +
 storage/innobase/include/fsp0types.h               |   311 +-
 storage/innobase/include/fts0ast.h                 |    53 +-
 storage/innobase/include/fts0blex.h                |     2 +-
 storage/innobase/include/fts0fts.h                 |   265 +-
 storage/innobase/include/fts0opt.h                 |     3 +-
 storage/innobase/include/fts0plugin.h              |    50 +
 storage/innobase/include/fts0priv.h                |   163 +-
 storage/innobase/include/fts0priv.ic               |    28 +-
 storage/innobase/include/fts0tlex.h                |     2 +-
 storage/innobase/include/fts0tokenize.h            |   188 +
 storage/innobase/include/fts0types.h               |   114 +-
 storage/innobase/include/fts0types.ic              |   318 +-
 storage/innobase/include/fut0fut.h                 |    30 +-
 storage/innobase/include/fut0fut.ic                |    40 +-
 storage/innobase/include/fut0lst.h                 |    40 +-
 storage/innobase/include/fut0lst.ic                |    32 +-
 storage/innobase/include/gis0geo.h                 |   162 +
 storage/innobase/include/gis0rtree.h               |   572 +
 storage/innobase/include/gis0rtree.ic              |   274 +
 storage/innobase/include/gis0type.h                |   168 +
 storage/innobase/include/ha0ha.h                   |   106 +-
 storage/innobase/include/ha0ha.ic                  |    46 +-
 storage/innobase/include/ha0storage.h              |    31 +-
 storage/innobase/include/ha0storage.ic             |     6 +-
 storage/innobase/include/ha_prototypes.h           |   396 +-
 storage/innobase/include/handler0alter.h           |    13 +-
 storage/innobase/include/hash0hash.h               |    92 +-
 storage/innobase/include/hash0hash.ic              |    76 +-
 storage/innobase/include/ib0mutex.h                |  1166 ++
 storage/innobase/include/ibuf0ibuf.h               |   199 +-
 storage/innobase/include/ibuf0ibuf.ic              |   131 +-
 storage/innobase/include/lock0iter.h               |     6 +-
 storage/innobase/include/lock0lock.h               |   389 +-
 storage/innobase/include/lock0lock.ic              |    49 +-
 storage/innobase/include/lock0prdt.h               |   224 +
 storage/innobase/include/lock0priv.h               |  1057 +-
 storage/innobase/include/lock0priv.ic              |   364 +-
 storage/innobase/include/lock0types.h              |    35 +-
 storage/innobase/include/log0log.h                 |   700 +-
 storage/innobase/include/log0log.ic                |   194 +-
 storage/innobase/include/log0recv.h                |   258 +-
 storage/innobase/include/log0recv.ic               |    25 +-
 storage/innobase/include/log0types.h               |    50 +
 storage/innobase/include/mach0data.h               |   141 +-
 storage/innobase/include/mach0data.ic              |   399 +-
 storage/innobase/include/mem0dbg.h                 |   150 -
 storage/innobase/include/mem0dbg.ic                |   109 -
 storage/innobase/include/mem0mem.h                 |   461 +-
 storage/innobase/include/mem0mem.ic                |   408 +-
 storage/innobase/include/mem0pool.h                |   121 -
 storage/innobase/include/mem0pool.ic               |    24 -
 storage/innobase/include/mtr0log.h                 |   130 +-
 storage/innobase/include/mtr0log.ic                |   204 +-
 storage/innobase/include/mtr0mtr.h                 |   953 +-
 storage/innobase/include/mtr0mtr.ic                |   391 +-
 storage/innobase/include/mtr0types.h               |   268 +-
 storage/innobase/include/os0atomic.h               |   320 +
 storage/innobase/include/os0atomic.ic              |   215 +
 storage/innobase/include/os0event.h                |   135 +
 storage/innobase/include/os0file.h                 |  2323 +--
 storage/innobase/include/os0file.ic                |   521 +-
 storage/innobase/include/os0once.h                 |     4 +-
 storage/innobase/include/os0proc.h                 |    51 +-
 storage/innobase/include/os0sync.h                 |   914 --
 storage/innobase/include/os0sync.ic                |   266 -
 storage/innobase/include/os0thread.h               |    51 +-
 storage/innobase/include/page0cur.h                |   167 +-
 storage/innobase/include/page0cur.ic               |   127 +-
 storage/innobase/include/page0page.h               |   315 +-
 storage/innobase/include/page0page.ic              |   291 +-
 storage/innobase/include/page0size.h               |   202 +
 storage/innobase/include/page0types.h              |    65 +-
 storage/innobase/include/page0zip.h                |   224 +-
 storage/innobase/include/page0zip.ic               |    52 +-
 storage/innobase/include/pars0opt.h                |     7 +-
 storage/innobase/include/pars0pars.h               |   133 +-
 storage/innobase/include/pars0sym.h                |    25 +-
 storage/innobase/include/que0que.h                 |    99 +-
 storage/innobase/include/que0que.ic                |    21 +-
 storage/innobase/include/read0read.h               |   250 +-
 storage/innobase/include/read0read.ic              |   148 -
 storage/innobase/include/read0types.h              |   305 +-
 storage/innobase/include/rem0cmp.h                 |   353 +-
 storage/innobase/include/rem0cmp.ic                |   216 +-
 storage/innobase/include/rem0rec.h                 |   322 +-
 storage/innobase/include/rem0rec.ic                |   191 +-
 storage/innobase/include/row0ext.h                 |     9 +-
 storage/innobase/include/row0ftsort.h              |    36 +-
 storage/innobase/include/row0import.h              |     6 +-
 storage/innobase/include/row0ins.h                 |    61 +-
 storage/innobase/include/row0log.h                 |    89 +-
 storage/innobase/include/row0log.ic                |    18 +-
 storage/innobase/include/row0merge.h               |   167 +-
 storage/innobase/include/row0mysql.h               |   380 +-
 storage/innobase/include/row0purge.h               |    27 +-
 storage/innobase/include/row0quiesce.h             |     3 -
 storage/innobase/include/row0row.h                 |    78 +-
 storage/innobase/include/row0row.ic                |    11 +-
 storage/innobase/include/row0sel.h                 |   197 +-
 storage/innobase/include/row0sel.ic                |    46 +-
 storage/innobase/include/row0trunc.h               |   433 +
 storage/innobase/include/row0uins.h                |     6 +-
 storage/innobase/include/row0umod.h                |     3 +-
 storage/innobase/include/row0undo.h                |    16 +-
 storage/innobase/include/row0upd.h                 |   210 +-
 storage/innobase/include/row0upd.ic                |    67 +-
 storage/innobase/include/row0vers.h                |    47 +-
 storage/innobase/include/sess0sess.h               |   146 +
 storage/innobase/include/srv0conc.h                |    27 +-
 storage/innobase/include/srv0mon.h                 |   138 +-
 storage/innobase/include/srv0mon.ic                |    12 +-
 storage/innobase/include/srv0srv.h                 |   356 +-
 storage/innobase/include/srv0start.h               |    96 +-
 storage/innobase/include/sync0arr.h                |    67 +-
 storage/innobase/include/sync0arr.ic               |    51 +-
 storage/innobase/include/sync0debug.h              |   105 +
 storage/innobase/include/sync0policy.h             |   550 +
 storage/innobase/include/sync0policy.ic            |   100 +
 storage/innobase/include/sync0rw.h                 |   576 +-
 storage/innobase/include/sync0rw.ic                |   492 +-
 storage/innobase/include/sync0sync.h               |   794 +-
 storage/innobase/include/sync0sync.ic              |   410 -
 storage/innobase/include/sync0types.h              |  1232 +-
 storage/innobase/include/trx0i_s.h                 |    35 +-
 storage/innobase/include/trx0purge.h               |   345 +-
 storage/innobase/include/trx0purge.ic              |    27 +-
 storage/innobase/include/trx0rec.h                 |   128 +-
 storage/innobase/include/trx0rec.ic                |    26 +-
 storage/innobase/include/trx0roll.h                |   123 +-
 storage/innobase/include/trx0roll.ic               |    46 +-
 storage/innobase/include/trx0rseg.h                |   187 +-
 storage/innobase/include/trx0rseg.ic               |    94 +-
 storage/innobase/include/trx0sys.h                 |   323 +-
 storage/innobase/include/trx0sys.ic                |   214 +-
 storage/innobase/include/trx0trx.h                 |  1030 +-
 storage/innobase/include/trx0trx.ic                |   264 +-
 storage/innobase/include/trx0types.h               |   223 +-
 storage/innobase/include/trx0undo.h                |   263 +-
 storage/innobase/include/trx0undo.ic               |    63 +-
 storage/innobase/include/trx0xa.h                  |    20 +-
 storage/innobase/include/univ.i                    |   277 +-
 storage/innobase/include/usr0sess.h                |     9 +-
 storage/innobase/include/ut0bh.h                   |   152 -
 storage/innobase/include/ut0bh.ic                  |   125 -
 storage/innobase/include/ut0byte.h                 |    16 +-
 storage/innobase/include/ut0byte.ic                |    18 +-
 storage/innobase/include/ut0counter.h              |   102 +-
 storage/innobase/include/ut0crc32.h                |    25 +-
 storage/innobase/include/ut0dbg.h                  |   158 +-
 storage/innobase/include/ut0list.h                 |    23 +-
 storage/innobase/include/ut0list.ic                |     6 +-
 storage/innobase/include/ut0lst.h                  |   585 +-
 storage/innobase/include/ut0mem.h                  |   144 +-
 storage/innobase/include/ut0mem.ic                 |    58 +-
 storage/innobase/include/ut0mutex.h                |   225 +
 storage/innobase/include/ut0mutex.ic               |   108 +
 storage/innobase/include/ut0new.h                  |   922 ++
 storage/innobase/include/ut0pool.h                 |   366 +
 storage/innobase/include/ut0rbt.h                  |    59 +-
 storage/innobase/include/ut0rnd.h                  |    29 +-
 storage/innobase/include/ut0rnd.ic                 |    38 +-
 storage/innobase/include/ut0stage.h                |   594 +
 storage/innobase/include/ut0ut.h                   |   466 +-
 storage/innobase/include/ut0ut.ic                  |   105 +-
 storage/innobase/include/ut0vec.h                  |    55 +-
 storage/innobase/include/ut0vec.ic                 |    97 +-
 storage/innobase/include/ut0wqueue.h               |    41 +-
 storage/innobase/innodb.cmake                      |   285 +
 storage/innobase/lock/lock0iter.cc                 |     9 +-
 storage/innobase/lock/lock0lock.cc                 |  9443 +++++++------
 storage/innobase/lock/lock0prdt.cc                 |  1056 ++
 storage/innobase/lock/lock0wait.cc                 |   105 +-
 storage/innobase/log/log0crypt.cc                  |    56 +-
 storage/innobase/log/log0log.cc                    |  2951 ++--
 storage/innobase/log/log0recv.cc                   |  3606 ++---
 storage/innobase/mach/mach0data.cc                 |   102 +-
 storage/innobase/mem/mem0dbg.cc                    |  1050 --
 storage/innobase/mem/mem0mem.cc                    |   231 +-
 storage/innobase/mem/mem0pool.cc                   |   727 -
 storage/innobase/mtr/mtr0log.cc                    |   148 +-
 storage/innobase/mtr/mtr0mtr.cc                    |  1188 +-
 storage/innobase/os/os0event.cc                    |   550 +
 storage/innobase/os/os0file.cc                     | 11470 +++++++++------
 storage/innobase/os/os0proc.cc                     |   146 +-
 storage/innobase/os/os0thread.cc                   |   245 +-
 storage/innobase/page/page0cur.cc                  |  1149 +-
 storage/innobase/page/page0page.cc                 |   996 +-
 storage/innobase/page/page0zip.cc                  |   861 +-
 storage/innobase/pars/lexyy.cc                     |   152 +-
 storage/innobase/pars/make_bison.sh                |     3 +-
 storage/innobase/pars/make_flex.sh                 |     1 -
 storage/innobase/pars/pars0grm.cc                  |     5 +-
 storage/innobase/pars/pars0grm.y                   |     5 +-
 storage/innobase/pars/pars0lex.l                   |     5 +-
 storage/innobase/pars/pars0opt.cc                  |    59 +-
 storage/innobase/pars/pars0pars.cc                 |   284 +-
 storage/innobase/pars/pars0sym.cc                  |    43 +-
 storage/innobase/que/que0que.cc                    |   259 +-
 storage/innobase/read/read0read.cc                 |   793 +-
 storage/innobase/rem/rem0cmp.cc                    |  1656 +--
 storage/innobase/rem/rem0rec.cc                    |   590 +-
 storage/innobase/row/row0ext.cc                    |    32 +-
 storage/innobase/row/row0ftsort.cc                 |   514 +-
 storage/innobase/row/row0import.cc                 |  1015 +-
 storage/innobase/row/row0ins.cc                    |  1387 +-
 storage/innobase/row/row0log.cc                    |   861 +-
 storage/innobase/row/row0merge.cc                  |  2321 ++-
 storage/innobase/row/row0mysql.cc                  |  3986 +++---
 storage/innobase/row/row0purge.cc                  |   269 +-
 storage/innobase/row/row0quiesce.cc                |    98 +-
 storage/innobase/row/row0row.cc                    |   471 +-
 storage/innobase/row/row0sel.cc                    |  2084 ++-
 storage/innobase/row/row0trunc.cc                  |  3060 ++++
 storage/innobase/row/row0uins.cc                   |   120 +-
 storage/innobase/row/row0umod.cc                   |   296 +-
 storage/innobase/row/row0undo.cc                   |   116 +-
 storage/innobase/row/row0upd.cc                    |  1283 +-
 storage/innobase/row/row0vers.cc                   |   728 +-
 storage/innobase/srv/srv0conc.cc                   |   442 +-
 storage/innobase/srv/srv0mon.cc                    |   230 +-
 storage/innobase/srv/srv0srv.cc                    |   925 +-
 storage/innobase/srv/srv0start.cc                  |  3088 ++--
 storage/innobase/sync/sync0arr.cc                  |  1103 +-
 storage/innobase/sync/sync0debug.cc                |  1808 +++
 storage/innobase/sync/sync0rw.cc                   |  1056 +-
 storage/innobase/sync/sync0sync.cc                 |  1671 +--
 storage/innobase/trx/trx0i_s.cc                    |   350 +-
 storage/innobase/trx/trx0purge.cc                  |  1119 +-
 storage/innobase/trx/trx0rec.cc                    |  1282 +-
 storage/innobase/trx/trx0roll.cc                   |   656 +-
 storage/innobase/trx/trx0rseg.cc                   |   276 +-
 storage/innobase/trx/trx0sys.cc                    |   683 +-
 storage/innobase/trx/trx0trx.cc                    |  2422 +++-
 storage/innobase/trx/trx0undo.cc                   |   813 +-
 storage/innobase/usr/usr0sess.cc                   |    14 +-
 storage/innobase/ut/ut0bh.cc                       |   159 -
 storage/innobase/ut/ut0crc32.cc                    |   706 +-
 storage/innobase/ut/ut0dbg.cc                      |    83 +-
 storage/innobase/ut/ut0list.cc                     |    23 +-
 storage/innobase/ut/ut0mem.cc                      |   424 +-
 storage/innobase/ut/ut0new.cc                      |   227 +
 storage/innobase/ut/ut0rbt.cc                      |    87 +-
 storage/innobase/ut/ut0rnd.cc                      |     7 +-
 storage/innobase/ut/ut0ut.cc                       |   477 +-
 storage/innobase/ut/ut0vec.cc                      |     4 +-
 storage/innobase/ut/ut0wqueue.cc                   |    35 +-
 .../mysql-test/tokudb/r/type_bit_innodb.result     |     2 +-
 storage/xtradb/CMakeLists.txt                      |     2 +-
 storage/xtradb/handler/ha_innodb.cc                |     2 +-
 storage/xtradb/row/row0upd.cc                      |     6 +-
 838 files changed, 174048 insertions(+), 83754 deletions(-)

diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 36072eb..01d654d 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -170,7 +170,7 @@ debug_cflags="-DEXTRA_DEBUG -DSAFE_MUTEX -DSAFEMALLOC"
 error_inject="--with-error-inject "
 #
 # Base C++ flags for all builds
-base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
+base_cxxflags="-felide-constructors -fexceptions -fno-rtti"
 #
 # Flags for optimizing builds.
 # Be as fast as we can be without losing our ability to backtrace.
diff --git a/configure.cmake b/configure.cmake
index 4470bee..8dffb7e 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -56,7 +56,7 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
   # MySQL "canonical" GCC flags. At least -fno-rtti flag affects
   # ABI and cannot be simply removed. 
   SET(CMAKE_CXX_FLAGS 
-    "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
+    "${CMAKE_CXX_FLAGS} -fno-rtti")
 
   IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static " 
      OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 24090db..12f3343 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -77,7 +77,9 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
       ../storage/innobase/buf/buf0checksum.cc
       ../storage/innobase/ut/ut0crc32.cc
       ../storage/innobase/ut/ut0ut.cc
+      ../storage/innobase/buf/buf0buf.cc
       ../storage/innobase/page/page0zip.cc
+      ../storage/innobase/os/os0file.cc
       )
 
   IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc
index ae6ffdb..dd97564 100644
--- a/extra/innochecksum.cc
+++ b/extra/innochecksum.cc
@@ -1,6 +1,5 @@
 /*
-   Copyright (c) 2005, 2012, Oracle and/or its affiliates.
-   Copyright (c) 2014, 2015, MariaDB Corporation.
+   Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,43 +25,36 @@
   Published with a permission.
 */
 
+#include <my_config.h>
 #include <my_global.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifndef __WIN__
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 #include <my_getopt.h>
 #include <m_string.h>
-#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
+#include <welcome_copyright_notice.h>	/* ORACLE_WELCOME_COPYRIGHT_NOTICE */
 
 /* Only parts of these files are included from the InnoDB codebase.
 The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
 
-#include "univ.i"                /*  include all of this */
-
-#define FLST_BASE_NODE_SIZE (4 + 2 * FIL_ADDR_SIZE)
-#define FLST_NODE_SIZE (2 * FIL_ADDR_SIZE)
-#define FSEG_PAGE_DATA FIL_PAGE_DATA
-#define MLOG_1BYTE (1)
-
-#include "ut0ut.h"
-#include "ut0byte.h"
-#include "mach0data.h"
-#include "fsp0types.h"
-#include "rem0rec.h"
-#include "buf0checksum.h"        /* buf_calc_page_*() */
-#include "fil0fil.h"             /* FIL_* */
-#include "page0page.h"           /* PAGE_* */
-#include "page0zip.h"            /* page_zip_*() */
-#include "trx0undo.h"            /* TRX_* */
-#include "fsp0fsp.h"             /* fsp_flags_get_page_size() &
-                                    fsp_flags_get_zip_size() */
-#include "ut0crc32.h"            /* ut_crc32_init() */
-#include "fsp0pagecompress.h"    /* fil_get_compression_alg_name */
+#include "univ.i"			/* include all of this */
+#include "page0size.h"			/* page_size_t */
+#include "page0zip.h"			/* page_zip_calc_checksum() */
+#include "page0page.h"			/* PAGE_* */
+#include "trx0undo.h"			/* TRX_UNDO_* */
+#include "fut0lst.h"			/* FLST_NODE_SIZE */
+#include "buf0checksum.h"		/* buf_calc_page_*() */
+#include "fil0fil.h"			/* FIL_* */
+#include "os0file.h"
+#include "fsp0fsp.h"			/* fsp_flags_get_page_size() &
+					   fsp_flags_get_zip_size() */
+#include "mach0data.h"			/* mach_read_from_4() */
+#include "ut0crc32.h"			/* ut_crc32_init() */
 
 #ifdef UNIV_NONINL
 # include "fsp0fsp.ic"
@@ -71,148 +63,851 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */
 #endif
 
 /* Global variables */
-static my_bool verbose;
-static my_bool debug;
-static my_bool skip_corrupt;
-static my_bool just_count;
-static ulong start_page;
-static ulong end_page;
-static ulong do_page;
-static my_bool use_end_page;
-static my_bool do_one_page;
-static my_bool per_page_details;
-static my_bool do_leaf;
-static ulong n_merge;
-ulong srv_page_size;              /* replaces declaration in srv0srv.c */
-static ulong physical_page_size;  /* Page size in bytes on disk. */
-static ulong logical_page_size;   /* Page size when uncompressed. */
-static bool compressed= false;    /* Is tablespace compressed */
-
-int n_undo_state_active;
-int n_undo_state_cached;
-int n_undo_state_to_free;
-int n_undo_state_to_purge;
-int n_undo_state_prepared;
-int n_undo_state_other;
-int n_undo_insert, n_undo_update, n_undo_other;
-int n_bad_checksum;
-int n_fil_page_index;
-int n_fil_page_undo_log;
-int n_fil_page_inode;
-int n_fil_page_ibuf_free_list;
-int n_fil_page_allocated;
-int n_fil_page_ibuf_bitmap;
-int n_fil_page_type_sys;
-int n_fil_page_type_trx_sys;
-int n_fil_page_type_fsp_hdr;
-int n_fil_page_type_allocated;
-int n_fil_page_type_xdes;
-int n_fil_page_type_blob;
-int n_fil_page_type_zblob;
-int n_fil_page_type_other;
-int n_fil_page_type_page_compressed;
-int n_fil_page_type_page_compressed_encrypted;
-
-int n_fil_page_max_index_id;
-
-#define SIZE_RANGES_FOR_PAGE 10
-#define NUM_RETRIES 3
-#define DEFAULT_RETRY_DELAY 1000000
-
-struct per_page_stats {
-  ulint n_recs;
-  ulint data_size;
-  ulint left_page_no;
-  ulint right_page_no;
-  per_page_stats(ulint n, ulint data, ulint left, ulint right) :
-      n_recs(n), data_size(data), left_page_no(left), right_page_no(right) {}
-  per_page_stats() : n_recs(0), data_size(0), left_page_no(0), right_page_no(0) {}
+static bool			verbose;
+static bool			just_count;
+static uintmax_t		start_page;
+static uintmax_t		end_page;
+static uintmax_t		do_page;
+static bool			use_end_page;
+static bool			do_one_page;
+/* replaces declaration in srv0srv.c */
+ulong				srv_page_size;
+page_size_t			univ_page_size(0, 0, false);
+extern ulong			srv_checksum_algorithm;
+/* Current page number (0 based). */
+uintmax_t			cur_page_num;
+/* Skip the checksum verification. */
+static bool			no_check;
+/* Enabled for strict checksum verification. */
+bool				strict_verify = 0;
+/* Enabled for rewrite checksum. */
+static bool			do_write;
+/* Mismatches count allowed (0 by default). */
+static uintmax_t		allow_mismatches;
+static bool			page_type_summary;
+static bool			page_type_dump;
+/* Store filename for page-type-dump option. */
+char*				page_dump_filename = 0;
+/* skip the checksum verification & rewrite if page is doublewrite buffer. */
+static bool			skip_page = 0;
+const char			*dbug_setting = "FALSE";
+char*				log_filename = NULL;
+/* User defined filename for logging. */
+FILE*				log_file = NULL;
+/* Enabled for log write option. */
+static bool			is_log_enabled = false;
+
+#ifndef _WIN32
+/* advisory lock for non-window system. */
+struct flock			lk;
+#endif /* _WIN32 */
+
+/* Strict check algorithm name. */
+static ulong			strict_check;
+/* Rewrite checksum algorithm name. */
+static ulong			write_check;
+
+/* Innodb page type. */
+struct innodb_page_type {
+	int n_undo_state_active;
+	int n_undo_state_cached;
+	int n_undo_state_to_free;
+	int n_undo_state_to_purge;
+	int n_undo_state_prepared;
+	int n_undo_state_other;
+	int n_undo_insert;
+	int n_undo_update;
+	int n_undo_other;
+	int n_fil_page_index;
+	int n_fil_page_undo_log;
+	int n_fil_page_inode;
+	int n_fil_page_ibuf_free_list;
+	int n_fil_page_ibuf_bitmap;
+	int n_fil_page_type_sys;
+	int n_fil_page_type_trx_sys;
+	int n_fil_page_type_fsp_hdr;
+	int n_fil_page_type_allocated;
+	int n_fil_page_type_xdes;
+	int n_fil_page_type_blob;
+	int n_fil_page_type_zblob;
+	int n_fil_page_type_other;
+	int n_fil_page_type_zblob2;
+} page_type;
+
+/* Possible values for "--strict-check" for strictly verify checksum
+and "--write" for rewrite checksum. */
+static const char *innochecksum_algorithms[] = {
+	"crc32",
+	"crc32",
+	"innodb",
+	"innodb",
+	"none",
+	"none",
+	NullS
 };
 
-struct per_index_stats {
-  unsigned long long pages;
-  unsigned long long leaf_pages;
-  ulint first_leaf_page;
-  ulint count;
-  ulint free_pages;
-  ulint max_data_size;
-  unsigned long long total_n_recs;
-  unsigned long long total_data_bytes;
-
-  /*!< first element for empty pages,
-  last element for pages with more than logical_page_size */
-  unsigned long long pages_in_size_range[SIZE_RANGES_FOR_PAGE+2];
-
-  std::map<ulint, per_page_stats> leaves;
-
-  per_index_stats():pages(0), leaf_pages(0), first_leaf_page(0),
-                    count(0), free_pages(0), max_data_size(0), total_n_recs(0),
-                    total_data_bytes(0)
-  {
-    memset(pages_in_size_range, 0, sizeof(pages_in_size_range));
-  }
+/* Used to define an enumerate type of the "innochecksum algorithm". */
+static TYPELIB innochecksum_algorithms_typelib = {
+	array_elements(innochecksum_algorithms)-1,"",
+	innochecksum_algorithms, NULL
 };
 
-std::map<unsigned long long, per_index_stats> index_ids;
+/** Get the page size of the filespace from the filespace header.
+ at param[in]	buf	buffer used to read the page.
+ at return page size */
+static
+const page_size_t
+get_page_size(
+	byte*	buf)
+{
+	const ulint	flags = mach_read_from_4(buf + FIL_PAGE_DATA
+						 + FSP_SPACE_FLAGS);
+
+	const ulint	ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
+
+	if (ssize == 0) {
+		srv_page_size = UNIV_PAGE_SIZE_ORIG;
+	} else {
+		srv_page_size = ((UNIV_ZIP_SIZE_MIN >> 1) << ssize);
+	}
 
-bool encrypted = false;
+	univ_page_size.copy_from(
+		page_size_t(srv_page_size, srv_page_size, false));
 
-/* Get the page size of the filespace from the filespace header. */
+	return(page_size_t(flags));
+}
+
+/** Decompress a page
+ at param[in,out]	buf		Page read from disk, uncompressed data will
+				also be copied to this page
+ at param[in, out] scratch		Page to use for temporary decompress
+ at param[in]	page_size	scratch physical size
+ at return true if decompress succeeded */
 static
-my_bool
-get_page_size(
-/*==========*/
-  FILE*  f,                     /*!< in: file pointer, must be open
-                                         and set to start of file */
-  byte* buf,                    /*!< in: buffer used to read the page */
-  ulong* logical_page_size,     /*!< out: Logical/Uncompressed page size */
-  ulong* physical_page_size)    /*!< out: Physical/Commpressed page size */
+bool page_decompress(
+	byte*		buf,
+	byte*		scratch,
+	page_size_t	page_size)
 {
-  ulong flags;
+	dberr_t		err=DB_SUCCESS;
 
-  int bytes= fread(buf, 1, UNIV_PAGE_SIZE_MIN, f);
+	/* Set the dblwr recover flag to false. */
+	/* JAN: TODO: Decompress
+	err = os_file_decompress_page(
+		false, buf, scratch, page_size.physical());
+	*/
 
-  if (ferror(f))
-  {
-    perror("Error reading file header");
-    return FALSE;
-  }
+	return(err == DB_SUCCESS);
+}
 
-  if (bytes != UNIV_PAGE_SIZE_MIN)
-  {
-    fprintf(stderr, "Error; Was not able to read the minimum page size ");
-    fprintf(stderr, "of %d bytes.  Bytes read was %d\n", UNIV_PAGE_SIZE_MIN, bytes);
-    return FALSE;
-  }
+#ifdef _WIN32
+/***********************************************//*
+ @param		[in] error	error no. from the getLastError().
 
-  rewind(f);
+ @retval error message corresponding to error no.
+*/
+static
+char*
+error_message(
+	int	error)
+{
+	static char err_msg[1024] = {'\0'};
+	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
+		NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+		(LPTSTR)err_msg, sizeof(err_msg), NULL );
 
-  flags = mach_read_from_4(buf + FIL_PAGE_DATA + FSP_SPACE_FLAGS);
+	return (err_msg);
+}
+#endif /* _WIN32 */
 
-  /* srv_page_size is used by InnoDB code as UNIV_PAGE_SIZE */
-  srv_page_size = *logical_page_size = fsp_flags_get_page_size(flags);
+/***********************************************//*
+ @param>>_______[in] name>_____name of file.
+ @retval file pointer; file pointer is NULL when error occured.
+*/
 
-  /* fsp_flags_get_zip_size() will return zero if not compressed. */
-  *physical_page_size = fsp_flags_get_zip_size(flags);
-  if (*physical_page_size == 0)
-  {
-    *physical_page_size= *logical_page_size;
-  }
-  else
-  {
-    compressed= true;
-  }
+FILE*
+open_file(
+	const char*	name)
+{
+	int	fd;		/* file descriptor. */
+	FILE*	fil_in;
+#ifdef _WIN32
+	HANDLE		hFile;		/* handle to open file. */
+	DWORD		access;		/* define access control */
+	int		flags = 0;	/* define the mode for file
+					descriptor */
+
+	if (do_write) {
+		access =  GENERIC_READ | GENERIC_WRITE;
+		flags =  _O_RDWR | _O_BINARY;
+	} else {
+		access = GENERIC_READ;
+		flags = _O_RDONLY | _O_BINARY;
+	}
+	/* CreateFile() also provide advisory lock with the usage of
+	access and share mode of the file.*/
+	hFile = CreateFile(
+			(LPCTSTR) name, access, 0L, NULL,
+			OPEN_EXISTING, NULL, NULL);
+
+	if (hFile == INVALID_HANDLE_VALUE) {
+		/* print the error message. */
+		fprintf(stderr, "Filename::%s %s\n",
+			error_message(GetLastError()));
+
+			return (NULL);
+		}
+
+	/* get the file descriptor. */
+	fd= _open_osfhandle((intptr_t)hFile, flags);
+#else /* _WIN32 */
+
+	int	create_flag;
+	/* define the advisory lock and open file mode. */
+	if (do_write) {
+		create_flag = O_RDWR;
+		lk.l_type = F_WRLCK;
+	}
+	else {
+		create_flag = O_RDONLY;
+		lk.l_type = F_RDLCK;
+	}
+
+	fd = open(name, create_flag);
+
+	lk.l_whence = SEEK_SET;
+	lk.l_start = lk.l_len = 0;
+
+	if (fcntl(fd, F_SETLK, &lk) == -1) {
+		fprintf(stderr, "Error: Unable to lock file::"
+			" %s\n", name);
+		perror("fcntl");
+		return (NULL);
+	}
+#endif /* _WIN32 */
 
+	if (do_write) {
+		fil_in = fdopen(fd, "rb+");
+	} else {
+		fil_in = fdopen(fd, "rb");
+	}
 
-  return TRUE;
+	return (fil_in);
 }
 
+/************************************************************//*
+ Read the content of file
+
+ @param  [in,out]	buf			read the file in buffer
+ @param  [in]		partial_page_read	enable when to read the
+						remaining buffer for first page.
+ @param  [in]		physical_page_size	Physical/Commpressed page size.
+ @param  [in,out]	fil_in			file pointer created for the
+						tablespace.
+ @retval no. of bytes read.
+*/
+ulong read_file(
+	byte*	buf,
+	bool	partial_page_read,
+	ulong	physical_page_size,
+	FILE*	fil_in)
+{
+	ulong bytes = 0;
 
-/* command line argument to do page checks (that's it) */
-/* another argument to specify page ranges... seek to right spot and go from there */
+	DBUG_ASSERT(physical_page_size >= UNIV_ZIP_SIZE_MIN);
 
-static struct my_option innochecksum_options[] =
+	if (partial_page_read) {
+		buf += UNIV_ZIP_SIZE_MIN;
+		physical_page_size -= UNIV_ZIP_SIZE_MIN;
+		bytes = UNIV_ZIP_SIZE_MIN;
+	}
+
+	bytes += ulong(fread(buf, 1, physical_page_size, fil_in));
+
+	return bytes;
+}
+
+/** Check if page is corrupted or not.
+ at param[in]	buf		page frame
+ at param[in]	page_size	page size
+ at retval true if page is corrupted otherwise false. */
+static
+bool
+is_page_corrupted(
+	const byte*		buf,
+	const page_size_t&	page_size)
 {
+
+	/* enable if page is corrupted. */
+	bool is_corrupted;
+	/* use to store LSN values. */
+	ulint logseq;
+	ulint logseqfield;
+
+	if (!page_size.is_compressed()) {
+		/* check the stored log sequence numbers
+		for uncompressed tablespace. */
+		logseq = mach_read_from_4(buf + FIL_PAGE_LSN + 4);
+		logseqfield = mach_read_from_4(
+				buf + page_size.logical() -
+				FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
+
+		if (is_log_enabled) {
+			fprintf(log_file,
+				"page::%lu log sequence number:first = %lu;"
+				" second = %lu\n",
+				cur_page_num, logseq, logseqfield);
+			if (logseq != logseqfield) {
+				fprintf(log_file,
+					"Fail; page %lu invalid (fails log "
+					"sequence number check)\n",
+					cur_page_num);
+			}
+		}
+	}
+
+	is_corrupted = buf_page_is_corrupted(
+		true, buf, page_size, false, cur_page_num, strict_verify,
+		is_log_enabled, log_file);
+
+	return(is_corrupted);
+}
+
+/********************************************//*
+ Check if page is doublewrite buffer or not.
+ @param [in] page	buffer page
+
+ @retval true  if page is doublewrite buffer otherwise false.
+*/
+static
+bool
+is_page_doublewritebuffer(
+	const byte*	page)
+{
+	if ((cur_page_num >= FSP_EXTENT_SIZE)
+		&& (cur_page_num < FSP_EXTENT_SIZE * 3)) {
+		/* page is doublewrite buffer. */
+		return (true);
+	}
+
+	return (false);
+}
+
+/*******************************************************//*
+Check if page is empty or not.
+ @param		[in] page		page to checked for empty.
+ @param		[in] len	size of page.
+
+ @retval true if page is empty.
+ @retval false if page is not empty.
+*/
+static
+bool
+is_page_empty(
+	const byte*	page,
+	size_t		len)
+{
+	while (len--) {
+		if (*page++) {
+			return (false);
+		}
+        }
+        return (true);
+}
+
+/********************************************************************//**
+Rewrite the checksum for the page.
+ at param	[in/out] page			page buffer
+ at param	[in] physical_page_size		page size in bytes on disk.
+ at param	[in] iscompressed		Is compressed/Uncompressed Page.
+
+ at retval true  : do rewrite
+ at retval false : skip the rewrite as checksum stored match with
+		calculated or page is doublwrite buffer.
+*/
+
+bool
+update_checksum(
+	byte*	page,
+	ulong	physical_page_size,
+	bool	iscompressed)
+{
+	ib_uint32_t	checksum = 0;
+	byte		stored1[4];	/* get FIL_PAGE_SPACE_OR_CHKSUM field checksum */
+	byte		stored2[4];	/* get FIL_PAGE_END_LSN_OLD_CHKSUM field checksum */
+
+	ut_ad(page);
+	/* If page is doublewrite buffer, skip the rewrite of checksum. */
+	if (skip_page) {
+		return (false);
+	}
+
+	memcpy(stored1, page + FIL_PAGE_SPACE_OR_CHKSUM, 4);
+	memcpy(stored2, page + physical_page_size -
+	       FIL_PAGE_END_LSN_OLD_CHKSUM, 4);
+
+	/* Check if page is empty, exclude the checksum field */
+	if (is_page_empty(page + 4, physical_page_size - 12)
+	    && is_page_empty(page + physical_page_size - 4, 4)) {
+
+		memset(page + FIL_PAGE_SPACE_OR_CHKSUM, 0, 4);
+		memset(page + physical_page_size -
+		       FIL_PAGE_END_LSN_OLD_CHKSUM, 0, 4);
+
+		goto func_exit;
+	}
+
+	if (iscompressed) {
+		/* page is compressed */
+		checksum = page_zip_calc_checksum(
+			page, physical_page_size,
+			static_cast<srv_checksum_algorithm_t>(write_check));
+
+		mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum);
+		if (is_log_enabled) {
+			fprintf(log_file, "page::%lu; Updated checksum ="
+				" %u\n", cur_page_num, checksum);
+		}
+
+	} else {
+		/* page is uncompressed. */
+
+		/* Store the new formula checksum */
+		switch ((srv_checksum_algorithm_t) write_check) {
+
+		case SRV_CHECKSUM_ALGORITHM_CRC32:
+		case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+			checksum = buf_calc_page_crc32(page);
+			break;
+
+		case SRV_CHECKSUM_ALGORITHM_INNODB:
+		case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
+			checksum = (ib_uint32_t)
+					buf_calc_page_new_checksum(page);
+			break;
+
+		case SRV_CHECKSUM_ALGORITHM_NONE:
+		case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
+			checksum = BUF_NO_CHECKSUM_MAGIC;
+			break;
+		/* no default so the compiler will emit a warning if new
+		enum is added and not handled here */
+		}
+
+		mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM, checksum);
+		if (is_log_enabled) {
+			fprintf(log_file, "page::%lu; Updated checksum field1"
+				" = %u\n", cur_page_num, checksum);
+		}
+
+		if (write_check == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB
+		    || write_check == SRV_CHECKSUM_ALGORITHM_INNODB) {
+			checksum = (ib_uint32_t)
+					buf_calc_page_old_checksum(page);
+		}
+
+		mach_write_to_4(page + physical_page_size -
+				FIL_PAGE_END_LSN_OLD_CHKSUM,checksum);
+
+		if (is_log_enabled) {
+			fprintf(log_file, "page::%lu ; Updated checksum "
+				"field2 = %u\n", cur_page_num, checksum);
+		}
+
+	}
+
+	func_exit:
+	/* The following code is to check the stored checksum with the
+	calculated checksum. If it matches, then return FALSE to skip
+	the rewrite of checksum, otherwise return TRUE. */
+	if (iscompressed) {
+		if (!memcmp(stored1, page + FIL_PAGE_SPACE_OR_CHKSUM, 4)) {
+			return (false);
+		}
+		return (true);
+	}
+
+	if (!memcmp(stored1, page + FIL_PAGE_SPACE_OR_CHKSUM, 4)
+	    && !memcmp(stored2, page + physical_page_size -
+		       FIL_PAGE_END_LSN_OLD_CHKSUM, 4)) {
+		return (false);
+
+	}
+
+	return (true);
+}
+
+/**
+ Write the content to the file
+ at param[in]		filename	name of the file.
+ at param[in,out]		file		file pointer where content
+					have to be written
+ at param[in]		buf		file buffer read
+ at param[in]		compressed	Enabled if tablespace is
+					compressed.
+ at param[in,out]		pos		current file position.
+ at param[in]		page_size	page size in bytes on disk.
+
+ at retval true	if successfully written
+ at retval false	if a non-recoverable error occurred
+*/
+static
+bool
+write_file(
+	const char*	filename,
+	FILE*		file,
+	byte*		buf,
+	bool		compressed,
+	fpos_t*		pos,
+	ulong		page_size)
+{
+	bool	do_update;
+
+	do_update = update_checksum(buf, page_size, compressed);
+
+	if (file != stdin) {
+		if (do_update) {
+			/* Set the previous file pointer position
+			saved in pos to current file position. */
+			if (0 != fsetpos(file, pos)) {
+				perror("fsetpos");
+				return(false);
+			}
+		} else {
+			/* Store the current file position in pos */
+			if (0 != fgetpos(file, pos)) {
+				perror("fgetpos");
+				return(false);
+			}
+			return(true);
+		}
+	}
+
+	if (page_size
+		!= fwrite(buf, 1, page_size, file == stdin ? stdout : file)) {
+		fprintf(stderr, "Failed to write page %lu to %s: %s\n",
+			cur_page_num, filename, strerror(errno));
+
+		return(false);
+	}
+	if (file != stdin) {
+		fflush(file);
+		/* Store the current file position in pos */
+		if (0 != fgetpos(file, pos)) {
+			perror("fgetpos");
+			return(false);
+		}
+	}
+
+	return(true);
+}
+
+/*
+Parse the page and collect/dump the information about page type
+ at param [in] page	buffer page
+ at param [in] file	file for diagnosis.
+*/
+void
+parse_page(
+	const byte*	page,
+	FILE*		file)
+{
+	unsigned long long id;
+	ulint undo_page_type;
+	char str[20]={'\0'};
+
+	/* Check whether page is doublewrite buffer. */
+	if(skip_page) {
+		strcpy(str, "Double_write_buffer");
+	} else {
+		strcpy(str, "-");
+	}
+
+	switch (mach_read_from_2(page + FIL_PAGE_TYPE)) {
+
+	case FIL_PAGE_INDEX:
+		page_type.n_fil_page_index++;
+		id = mach_read_from_8(page + PAGE_HEADER + PAGE_INDEX_ID);
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tIndex page\t\t\t|"
+				"\tindex id=%llu,", cur_page_num, id);
+
+			fprintf(file,
+				" page level=%lu, No. of records=%lu,"
+				" garbage=%lu, %s\n",
+				page_header_get_field(page, PAGE_LEVEL),
+				page_header_get_field(page, PAGE_N_RECS),
+				page_header_get_field(page, PAGE_GARBAGE), str);
+		}
+		break;
+
+	case FIL_PAGE_UNDO_LOG:
+		page_type.n_fil_page_undo_log++;
+		undo_page_type = mach_read_from_2(page +
+				     TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE);
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tUndo log page\t\t\t|",
+				cur_page_num);
+		}
+		if (undo_page_type == TRX_UNDO_INSERT) {
+			page_type.n_undo_insert++;
+			if (page_type_dump) {
+				fprintf(file, "\t%s",
+					"Insert Undo log page");
+			}
+
+		} else if (undo_page_type == TRX_UNDO_UPDATE) {
+			page_type.n_undo_update++;
+			if (page_type_dump) {
+				fprintf(file, "\t%s",
+					"Update undo log page");
+			}
+		}
+
+		undo_page_type = mach_read_from_2(page + TRX_UNDO_SEG_HDR +
+						  TRX_UNDO_STATE);
+		switch (undo_page_type) {
+			case TRX_UNDO_ACTIVE:
+				page_type.n_undo_state_active++;
+				if (page_type_dump) {
+					fprintf(file, ", %s", "Undo log of "
+						"an active transaction");
+				}
+				break;
+
+			case TRX_UNDO_CACHED:
+				page_type.n_undo_state_cached++;
+				if (page_type_dump) {
+					fprintf(file, ", %s", "Page is "
+						"cached for quick reuse");
+				}
+				break;
+
+			case TRX_UNDO_TO_FREE:
+				page_type.n_undo_state_to_free++;
+				if (page_type_dump) {
+					fprintf(file, ", %s", "Insert undo "
+						"segment that can be freed");
+				}
+				break;
+
+			case TRX_UNDO_TO_PURGE:
+				page_type.n_undo_state_to_purge++;
+				if (page_type_dump) {
+					fprintf(file, ", %s", "Will be "
+						"freed in purge when all undo"
+					"data in it is removed");
+				}
+				break;
+
+			case TRX_UNDO_PREPARED:
+				page_type.n_undo_state_prepared++;
+				if (page_type_dump) {
+					fprintf(file, ", %s", "Undo log of "
+						"an prepared transaction");
+				}
+				break;
+
+			default:
+				page_type.n_undo_state_other++;
+				break;
+		}
+		if(page_type_dump) {
+			fprintf(file, ", %s\n", str);
+		}
+		break;
+
+	case FIL_PAGE_INODE:
+		page_type.n_fil_page_inode++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tInode page\t\t\t|"
+				"\t%s\n",cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_IBUF_FREE_LIST:
+		page_type.n_fil_page_ibuf_free_list++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tInsert buffer free list"
+				" page\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_ALLOCATED:
+		page_type.n_fil_page_type_allocated++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tFreshly allocated "
+				"page\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_IBUF_BITMAP:
+		page_type.n_fil_page_ibuf_bitmap++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tInsert Buffer "
+				"Bitmap\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_SYS:
+		page_type.n_fil_page_type_sys++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tSystem page\t\t\t|"
+				"\t%s\n",cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_TRX_SYS:
+		page_type.n_fil_page_type_trx_sys++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tTransaction system "
+				"page\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_FSP_HDR:
+		page_type.n_fil_page_type_fsp_hdr++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tFile Space "
+				"Header\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_XDES:
+		page_type.n_fil_page_type_xdes++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tExtent descriptor "
+				"page\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_BLOB:
+		page_type.n_fil_page_type_blob++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tBLOB page\t\t\t|\t%s\n",
+				cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_ZBLOB:
+		page_type.n_fil_page_type_zblob++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tCompressed BLOB "
+				"page\t\t|\t%s\n", cur_page_num, str);
+		}
+		break;
+
+	case FIL_PAGE_TYPE_ZBLOB2:
+		page_type.n_fil_page_type_zblob2++;
+		if (page_type_dump) {
+			fprintf(file, "#::%lu \t\t|\t\tSubsequent Compressed "
+				"BLOB page\t|\t%s\n", cur_page_num, str);
+		}
+			break;
+
+	default:
+		page_type.n_fil_page_type_other++;
+		break;
+	}
+}
+/**
+ at param [in/out] file_name	name of the filename
+
+ at retval FILE pointer if successfully created else NULL when error occured.
+*/
+FILE*
+create_file(
+	char*	file_name)
+{
+	FILE*	file = NULL;
+
+#ifndef _WIN32
+	file = fopen(file_name, "wb");
+	if (file == NULL) {
+		fprintf(stderr, "Failed to create file: %s: %s\n",
+			file_name, strerror(errno));
+		return(NULL);
+	}
+#else
+	HANDLE		hFile;		/* handle to open file. */
+	int fd = 0;
+	hFile = CreateFile((LPCTSTR) file_name,
+			  GENERIC_READ | GENERIC_WRITE,
+			  FILE_SHARE_READ | FILE_SHARE_DELETE,
+			  NULL, CREATE_NEW, NULL, NULL);
+
+	if (hFile == INVALID_HANDLE_VALUE) {
+		/* print the error message. */
+		fprintf(stderr, "Filename::%s %s\n",
+			file_name,
+			error_message(GetLastError()));
+
+			return(NULL);
+		}
+
+	/* get the file descriptor. */
+	fd= _open_osfhandle((intptr_t)hFile, _O_RDWR | _O_BINARY);
+	file = fdopen(fd, "wb");
+#endif /* _WIN32 */
+
+	return(file);
+}
+
+/*
+ Print the page type count of a tablespace.
+ @param [in] fil_out	stream where the output goes.
+*/
+void
+print_summary(
+	FILE*	fil_out)
+{
+	fprintf(fil_out, "\n================PAGE TYPE SUMMARY==============\n");
+	fprintf(fil_out, "#PAGE_COUNT\tPAGE_TYPE");
+	fprintf(fil_out, "\n===============================================\n");
+	fprintf(fil_out, "%8d\tIndex page\n",
+		page_type.n_fil_page_index);
+	fprintf(fil_out, "%8d\tUndo log page\n",
+		page_type.n_fil_page_undo_log);
+	fprintf(fil_out, "%8d\tInode page\n",
+		page_type.n_fil_page_inode);
+	fprintf(fil_out, "%8d\tInsert buffer free list page\n",
+		page_type.n_fil_page_ibuf_free_list);
+	fprintf(fil_out, "%8d\tFreshly allocated page\n",
+		page_type.n_fil_page_type_allocated);
+	fprintf(fil_out, "%8d\tInsert buffer bitmap\n",
+		page_type.n_fil_page_ibuf_bitmap);
+	fprintf(fil_out, "%8d\tSystem page\n",
+		page_type.n_fil_page_type_sys);
+	fprintf(fil_out, "%8d\tTransaction system page\n",
+		page_type.n_fil_page_type_trx_sys);
+	fprintf(fil_out, "%8d\tFile Space Header\n",
+		page_type.n_fil_page_type_fsp_hdr);
+	fprintf(fil_out, "%8d\tExtent descriptor page\n",
+		page_type.n_fil_page_type_xdes);
+	fprintf(fil_out, "%8d\tBLOB page\n",
+		page_type.n_fil_page_type_blob);
+	fprintf(fil_out, "%8d\tCompressed BLOB page\n",
+		page_type.n_fil_page_type_zblob);
+	fprintf(fil_out, "%8d\tOther type of page",
+		page_type.n_fil_page_type_other);
+	fprintf(fil_out, "\n===============================================\n");
+	fprintf(fil_out, "Additional information:\n");
+	fprintf(fil_out, "Undo page type: %d insert, %d update, %d other\n",
+		page_type.n_undo_insert,
+		page_type.n_undo_update,
+		page_type.n_undo_other);
+	fprintf(fil_out, "Undo page state: %d active, %d cached, %d to_free, %d"
+		" to_purge, %d prepared, %d other\n",
+		page_type.n_undo_state_active,
+		page_type.n_undo_state_cached,
+		page_type.n_undo_state_to_free,
+		page_type.n_undo_state_to_purge,
+		page_type.n_undo_state_prepared,
+		page_type.n_undo_state_other);
+}
+
+/* command line argument for innochecksum tool. */
+static struct my_option innochecksum_options[] = {
   {"help", '?', "Displays this help and exits.",
     0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"info", 'I', "Synonym for --help.",
@@ -221,779 +916,599 @@ static struct my_option innochecksum_options[] =
     0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"verbose", 'v', "Verbose (prints progress every 5 seconds).",
     &verbose, &verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"debug", 'd', "Debug mode (prints checksums for each page, implies verbose).",
-    &debug, &debug, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"skip_corrupt", 'u', "Skip corrupt pages.",
-    &skip_corrupt, &skip_corrupt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"count", 'c', "Print the count of pages in the file.",
+#ifndef DBUG_OFF
+  {"debug", '#', "Output debug log. See " REFMAN "dbug-package.html",
+    &dbug_setting, &dbug_setting, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+#endif /* !DBUG_OFF */
+  {"count", 'c', "Print the count of pages in the file and exits.",
     &just_count, &just_count, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"start_page", 's', "Start on this page number (0 based).",
-    &start_page, &start_page, 0, GET_ULONG, REQUIRED_ARG,
-    0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
+    &start_page, &start_page, 0, GET_ULL, REQUIRED_ARG,
+    0, 0, ULLONG_MAX, 0, 1, 0},
   {"end_page", 'e', "End at this page number (0 based).",
-    &end_page, &end_page, 0, GET_ULONG, REQUIRED_ARG,
-    0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
+    &end_page, &end_page, 0, GET_ULL, REQUIRED_ARG,
+    0, 0, ULLONG_MAX, 0, 1, 0},
   {"page", 'p', "Check only this page (0 based).",
-    &do_page, &do_page, 0, GET_ULONG, REQUIRED_ARG,
-    0, 0, (longlong) 2L*1024L*1024L*1024L, 0, 1, 0},
-  {"per_page_details", 'i', "Print out per-page detail information.",
-    &per_page_details, &per_page_details, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}
-    ,
-  {"leaf", 'l', "Examine leaf index pages",
-    &do_leaf, &do_leaf, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"merge", 'm', "leaf page count if merge given number of consecutive pages",
-   &n_merge, &n_merge, 0, GET_ULONG, REQUIRED_ARG,
-   0, 0, (longlong)10L, 0, 1, 0},
+    &do_page, &do_page, 0, GET_ULL, REQUIRED_ARG,
+    0, 0, ULLONG_MAX, 0, 1, 0},
+  {"strict-check", 'C', "Specify the strict checksum algorithm by the user.",
+    &strict_check, &strict_check, &innochecksum_algorithms_typelib,
+    GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"no-check", 'n', "Ignore the checksum verification.",
+    &no_check, &no_check, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+  {"allow-mismatches", 'a', "Maximum checksum mismatch allowed.",
+    &allow_mismatches, &allow_mismatches, 0,
+    GET_ULL, REQUIRED_ARG, 0, 0, ULLONG_MAX, 0, 1, 0},
+  {"write", 'w', "Rewrite the checksum algorithm by the user.",
+    &write_check, &write_check, &innochecksum_algorithms_typelib,
+    GET_ENUM, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+  {"page-type-summary", 'S', "Display a count of each page type "
+   "in a tablespace.", &page_type_summary, &page_type_summary, 0,
+   GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+  {"page-type-dump", 'D', "Dump the page type info for each page in a "
+   "tablespace.", &page_dump_filename, &page_dump_filename, 0,
+   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+   {"log", 'l', "log output.",
+     &log_filename, &log_filename, 0,
+      GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+
   {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
 };
 
+/* Print out the Innodb version and machine information. */
 static void print_version(void)
 {
-  printf("%s Ver %s, for %s (%s)\n",
-         my_progname, INNODB_VERSION_STR,
-         SYSTEM_TYPE, MACHINE_TYPE);
+#ifdef DBUG_OFF
+	printf("%s Ver %s, for %s (%s)\n",
+		my_progname, INNODB_VERSION_STR,
+		SYSTEM_TYPE, MACHINE_TYPE);
+#else
+	printf("%s-debug Ver %s, for %s (%s)\n",
+		my_progname, INNODB_VERSION_STR,
+		SYSTEM_TYPE, MACHINE_TYPE);
+#endif /* DBUG_OFF */
 }
 
 static void usage(void)
 {
-  print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
-  printf("InnoDB offline file checksum utility.\n");
-  printf("Usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", my_progname);
-  my_print_help(innochecksum_options);
-  my_print_variables(innochecksum_options);
+	print_version();
+	puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
+	printf("InnoDB offline file checksum utility.\n");
+	printf("Usage: %s [-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 [-]>\n", my_progname);
+	printf("See " REFMAN "innochecksum.html for usage hints.\n");
+	my_print_help(innochecksum_options);
+	my_print_variables(innochecksum_options);
 }
 
 extern "C" my_bool
 innochecksum_get_one_option(
-/*========================*/
-  int optid,
-  const struct my_option *opt __attribute__((unused)),
-  char *argument __attribute__((unused)))
+	int			optid,
+	const struct my_option	*opt __attribute__((unused)),
+	char			*argument __attribute__((unused)))
 {
-  switch (optid) {
-  case 'd':
-    verbose=1;	/* debug implies verbose... */
-    break;
-  case 'e':
-    use_end_page= 1;
-    break;
-  case 'p':
-    end_page= start_page= do_page;
-    use_end_page= 1;
-    do_one_page= 1;
-    break;
-  case 'V':
-    print_version();
-    exit(0);
-    break;
-  case 'I':
-  case '?':
-    usage();
-    exit(0);
-    break;
-  }
-  return 0;
-}
+	switch (optid) {
+#ifndef DBUG_OFF
+	case '#':
+		dbug_setting = argument
+			? argument
+			: IF_WIN("d:O,innochecksum.trace",
+				 "d:o,/tmp/innochecksum.trace");
+		DBUG_PUSH(dbug_setting);
+		break;
+#endif /* !DBUG_OFF */
+	case 'e':
+		use_end_page = true;
+		break;
+	case 'p':
+		end_page = start_page = do_page;
+		use_end_page = true;
+		do_one_page = true;
+		break;
+	case 'V':
+		print_version();
+		exit(EXIT_SUCCESS);
+		break;
+	case 'C':
+		strict_verify = true;
+		switch ((srv_checksum_algorithm_t) strict_check) {
+
+		case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
+		case SRV_CHECKSUM_ALGORITHM_CRC32:
+			srv_checksum_algorithm =
+				SRV_CHECKSUM_ALGORITHM_STRICT_CRC32;
+			break;
+
+		case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
+		case SRV_CHECKSUM_ALGORITHM_INNODB:
+			srv_checksum_algorithm =
+				SRV_CHECKSUM_ALGORITHM_STRICT_INNODB;
+			break;
+
+		case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
+		case SRV_CHECKSUM_ALGORITHM_NONE:
+			srv_checksum_algorithm =
+				SRV_CHECKSUM_ALGORITHM_STRICT_NONE;
+			break;
+		default:
+			return(true);
+		}
+		break;
+	case 'n':
+		no_check = true;
+		break;
+	case 'a':
+	case 'S':
+		break;
+	case 'w':
+		do_write = true;
+		break;
+	case 'D':
+		page_type_dump = true;
+		break;
+	case 'l':
+		is_log_enabled = true;
+		break;
+	case 'I':
+	case '?':
+		usage();
+		exit(EXIT_SUCCESS);
+		break;
+	}
 
-static int get_options(
-/*===================*/
-  int *argc,
-  char ***argv)
-{
-  int ho_error;
-
-  if ((ho_error=handle_options(argc, argv, innochecksum_options, innochecksum_get_one_option)))
-    exit(ho_error);
-
-  /* The next arg must be the filename */
-  if (!*argc)
-  {
-    usage();
-    return 1;
-  }
-  return 0;
-} /* get_options */
-
-/*********************************************************************//**
-Gets the file page type.
- at return type; NOTE that if the type has not been written to page, the
-return value not defined */
-ulint
-fil_page_get_type(
-/*==============*/
-       uchar*  page)   /*!< in: file page */
-{
-       return(mach_read_from_2(page + FIL_PAGE_TYPE));
+	return(false);
 }
 
-/**************************************************************//**
-Gets the index id field of a page.
- at return        index id */
-ib_uint64_t
-btr_page_get_index_id(
-/*==================*/
-       uchar*  page)   /*!< in: index page */
+static
+bool
+get_options(
+	int	*argc,
+	char	***argv)
 {
-       return(mach_read_from_8(page + PAGE_HEADER + PAGE_INDEX_ID));
-}
+	if (handle_options(argc, argv, innochecksum_options,
+		innochecksum_get_one_option))
+		exit(true);
+
+	/* The next arg must be the filename */
+	if (!*argc) {
+		usage();
+		return (true);
+	}
 
-/********************************************************//**
-Gets the next index page number.
- at return	next page number */
-ulint
-btr_page_get_next(
-/*==============*/
-  const page_t* page) /*!< in: index page */
-{
-  return(mach_read_from_4(page + FIL_PAGE_NEXT));
+	return (false);
 }
 
-/********************************************************//**
-Gets the previous index page number.
- at return	prev page number */
-ulint
-btr_page_get_prev(
-/*==============*/
-  const page_t* page) /*!< in: index page */
+int main(
+	int	argc,
+	char	**argv)
 {
-  return(mach_read_from_4(page + FIL_PAGE_PREV));
-}
+	/* our input file. */
+	FILE*		fil_in = NULL;
+	/* our input filename. */
+	char*		filename;
+	/* Buffer to store pages read. */
+	byte*		buf = NULL;
+	/* bytes read count */
+	ulong		bytes;
+	/* Buffer to decompress page.*/
+	byte*		tbuf = NULL;
+	/* current time */
+	time_t		now;
+	/* last time */
+	time_t		lastt;
+	/* stat, to get file size. */
+#ifdef _WIN32
+	struct _stat64	st;
+#else
+	struct stat	st;
+#endif /* _WIN32 */
+
+	/* size of file (has to be 64 bits) */
+	unsigned long long int	size		= 0;
+	/* number of pages in file */
+	ulint		pages;
+
+	off_t		offset			= 0;
+	/* count the no. of page corrupted. */
+	ulint		mismatch_count		= 0;
+	/* Variable to ack the page is corrupted or not. */
+	bool		is_corrupted		= false;
+
+	bool		partial_page_read	= false;
+	/* Enabled when read from stdin is done. */
+	bool		read_from_stdin		= false;
+	FILE*		fil_page_type		= NULL;
+	fpos_t		pos;
+
+	/* Use to check the space id of given file. If space_id is zero,
+	then check whether page is doublewrite buffer.*/
+	ulint		space_id = 0UL;
+	/* enable when space_id of given file is zero. */
+	bool		is_system_tablespace = false;
+
+	ut_crc32_init();
+	MY_INIT(argv[0]);
+	DBUG_ENTER("main");
+	DBUG_PROCESS(argv[0]);
+
+	if (get_options(&argc,&argv)) {
+		DBUG_RETURN(1);
+	}
 
-void
-parse_page(
-/*=======*/
-  uchar* page, /* in: buffer page */
-  uchar* xdes) /* in: extend descriptor page */
-{
-       ib_uint64_t id;
-       ulint x;
-       ulint n_recs;
-       ulint page_no;
-       ulint left_page_no;
-       ulint right_page_no;
-       ulint data_bytes;
-       int is_leaf;
-       int size_range_id;
-
-       switch (fil_page_get_type(page)) {
-       case FIL_PAGE_INDEX:
-               n_fil_page_index++;
-               id = btr_page_get_index_id(page);
-               n_recs = page_get_n_recs(page);
-               page_no = page_get_page_no(page);
-               left_page_no = btr_page_get_prev(page);
-               right_page_no = btr_page_get_next(page);
-               data_bytes = page_get_data_size(page);
-               is_leaf = page_is_leaf(page);
-               size_range_id = (data_bytes * SIZE_RANGES_FOR_PAGE
-                                + logical_page_size - 1) /
-                                logical_page_size;
-               if (size_range_id > SIZE_RANGES_FOR_PAGE + 1) {
-                 /* data_bytes is bigger than logical_page_size */
-                 size_range_id = SIZE_RANGES_FOR_PAGE + 1;
-               }
-               if (per_page_details) {
-                 printf("index %lu page %lu leaf %u n_recs %lu data_bytes %lu"
-                        "\n", (ulong) id, (ulong) page_no, is_leaf, n_recs, data_bytes);
-               }
-               /* update per-index statistics */
-               {
-                 if (index_ids.count(id) == 0) {
-                   index_ids[id] = per_index_stats();
-                 }
-		 std::map<unsigned long long, per_index_stats>::iterator it;
-		 it = index_ids.find(id);
-                 per_index_stats &index = (it->second);
-                 uchar* des = xdes + XDES_ARR_OFFSET
-                   + XDES_SIZE * ((page_no & (physical_page_size - 1))
-                                  / FSP_EXTENT_SIZE);
-                 if (xdes_get_bit(des, XDES_FREE_BIT,
-                                  page_no % FSP_EXTENT_SIZE)) {
-                   index.free_pages++;
-                   return;
-                 }
-                 index.pages++;
-                 if (is_leaf) {
-                   index.leaf_pages++;
-                   if (data_bytes > index.max_data_size) {
-                     index.max_data_size = data_bytes;
-                   }
-		   struct per_page_stats pp(n_recs, data_bytes,
-			   left_page_no, right_page_no);
-
-                   index.leaves[page_no] = pp;
-
-                   if (left_page_no == ULINT32_UNDEFINED) {
-                     index.first_leaf_page = page_no;
-                     index.count++;
-                   }
-                 }
-                 index.total_n_recs += n_recs;
-                 index.total_data_bytes += data_bytes;
-                 index.pages_in_size_range[size_range_id] ++;
-               }
-
-               break;
-       case FIL_PAGE_UNDO_LOG:
-               if (per_page_details) {
-                       printf("FIL_PAGE_UNDO_LOG\n");
-               }
-               n_fil_page_undo_log++;
-               x = mach_read_from_2(page + TRX_UNDO_PAGE_HDR +
-                                    TRX_UNDO_PAGE_TYPE);
-               if (x == TRX_UNDO_INSERT)
-                       n_undo_insert++;
-               else if (x == TRX_UNDO_UPDATE)
-                       n_undo_update++;
-               else
-                       n_undo_other++;
-
-               x = mach_read_from_2(page + TRX_UNDO_SEG_HDR + TRX_UNDO_STATE);
-               switch (x) {
-                       case TRX_UNDO_ACTIVE: n_undo_state_active++; break;
-                       case TRX_UNDO_CACHED: n_undo_state_cached++; break;
-                       case TRX_UNDO_TO_FREE: n_undo_state_to_free++; break;
-                       case TRX_UNDO_TO_PURGE: n_undo_state_to_purge++; break;
-                       case TRX_UNDO_PREPARED: n_undo_state_prepared++; break;
-                       default: n_undo_state_other++; break;
-               }
-               break;
-       case FIL_PAGE_INODE:
-               if (per_page_details) {
-                       printf("FIL_PAGE_INODE\n");
-               }
-               n_fil_page_inode++;
-               break;
-       case FIL_PAGE_IBUF_FREE_LIST:
-               if (per_page_details) {
-                       printf("FIL_PAGE_IBUF_FREE_LIST\n");
-               }
-               n_fil_page_ibuf_free_list++;
-               break;
-       case FIL_PAGE_TYPE_ALLOCATED:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_ALLOCATED\n");
-               }
-               n_fil_page_type_allocated++;
-               break;
-       case FIL_PAGE_IBUF_BITMAP:
-               if (per_page_details) {
-                       printf("FIL_PAGE_IBUF_BITMAP\n");
-               }
-               n_fil_page_ibuf_bitmap++;
-               break;
-       case FIL_PAGE_TYPE_SYS:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_SYS\n");
-               }
-               n_fil_page_type_sys++;
-               break;
-       case FIL_PAGE_TYPE_TRX_SYS:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_TRX_SYS\n");
-               }
-               n_fil_page_type_trx_sys++;
-               break;
-       case FIL_PAGE_TYPE_FSP_HDR:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_FSP_HDR\n");
-               }
-               memcpy(xdes, page, physical_page_size);
-               n_fil_page_type_fsp_hdr++;
-               break;
-       case FIL_PAGE_TYPE_XDES:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_XDES\n");
-               }
-               memcpy(xdes, page, physical_page_size);
-               n_fil_page_type_xdes++;
-               break;
-       case FIL_PAGE_TYPE_BLOB:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_BLOB\n");
-               }
-               n_fil_page_type_blob++;
-               break;
-       case FIL_PAGE_TYPE_ZBLOB:
-       case FIL_PAGE_TYPE_ZBLOB2:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_ZBLOB/2\n");
-               }
-               n_fil_page_type_zblob++;
-               break;
-       case FIL_PAGE_PAGE_COMPRESSED:
-	       if (per_page_details) {
-		       printf("FIL_PAGE_PAGE_COMPRESSED\n");
-	       }
-	       n_fil_page_type_page_compressed++;
-	       break;
-       case FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED:
-	       if (per_page_details) {
-		       printf("FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED\n");
-	       }
-	       n_fil_page_type_page_compressed_encrypted++;
-	       break;
-       default:
-               if (per_page_details) {
-                       printf("FIL_PAGE_TYPE_OTHER\n");
-               }
-               n_fil_page_type_other++;
-       }
-}
+	if (strict_verify && no_check) {
+		fprintf(stderr, "Error: --strict-check option cannot be used "
+			"together with --no-check option.\n");
+		DBUG_RETURN(1);
+	}
 
-void print_index_leaf_stats(unsigned long long id, const per_index_stats& index)
-{
-  ulint page_no = index.first_leaf_page;
-  std::map<ulint, per_page_stats>::const_iterator it_page = index.leaves.find(page_no);
-  printf("\nindex: %llu leaf page stats: n_pages = %llu\n",
-         id, index.leaf_pages);
-  printf("page_no\tdata_size\tn_recs\n");
-  while (it_page != index.leaves.end()) {
-    const per_page_stats& stat = it_page->second;
-    printf("%lu\t%lu\t%lu\n", it_page->first, stat.data_size, stat.n_recs);
-    page_no = stat.right_page_no;
-    it_page = index.leaves.find(page_no);
-  }
-}
+	if (no_check && !do_write) {
+		fprintf(stderr, "Error: --no-check must be associated with "
+			"--write option.\n");
+		DBUG_RETURN(1);
+	}
 
-void defrag_analysis(unsigned long long id, const per_index_stats& index)
-{
-  // TODO: make it work for compressed pages too
-  std::map<ulint, per_page_stats>::const_iterator it = index.leaves.find(index.first_leaf_page);
-  ulint n_pages = 0;
-  ulint n_leaf_pages = 0;
-  while (it != index.leaves.end()) {
-    ulint data_size_total = 0;
-    for (ulong i = 0; i < n_merge; i++) {
-      const per_page_stats& stat = it->second;
-      n_leaf_pages ++;
-      data_size_total += stat.data_size;
-      it = index.leaves.find(stat.right_page_no);
-      if (it == index.leaves.end()) {
-        break;
-      }
-    }
-    if (index.max_data_size) {
-      n_pages += data_size_total / index.max_data_size;
-      if (data_size_total % index.max_data_size != 0) {
-        n_pages += 1;
-      }
-    }
-  }
-  if (index.leaf_pages)
-    printf("count = %lu free = %lu\n", index.count, index.free_pages);
-    printf("%llu\t\t%llu\t\t%lu\t\t%lu\t\t%lu\t\t%.2f\t%lu\n",
-           id, index.leaf_pages, n_leaf_pages, n_merge, n_pages,
-           1.0 - (double)n_pages / (double)n_leaf_pages, index.max_data_size);
-}
+	if (page_type_dump) {
+		fil_page_type = create_file(page_dump_filename);
+		if (!fil_page_type) {
+			DBUG_RETURN(1);
+		}
+	}
 
-void print_leaf_stats()
-{
-  printf("\n**************************************************\n");
-  printf("index_id\t#leaf_pages\t#actual_leaf_pages\tn_merge\t"
-         "#leaf_after_merge\tdefrag\n");
-  for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin(); it != index_ids.end(); it++) {
-    const per_index_stats& index = it->second;
-    if (verbose) {
-      print_index_leaf_stats(it->first, index);
-    }
-    if (n_merge) {
-      defrag_analysis(it->first, index);
-    }
-  }
-}
+	if (is_log_enabled) {
+		log_file = create_file(log_filename);
+		if (!log_file) {
+			DBUG_RETURN(1);
+		}
+		fprintf(log_file, "InnoDB File Checksum Utility.\n");
+	}
 
-void
-print_stats()
-/*========*/
-{
-       unsigned long long i;
-
-       printf("%d\tbad checksum\n", n_bad_checksum);
-       printf("%d\tFIL_PAGE_INDEX\n", n_fil_page_index);
-       printf("%d\tFIL_PAGE_UNDO_LOG\n", n_fil_page_undo_log);
-       printf("%d\tFIL_PAGE_INODE\n", n_fil_page_inode);
-       printf("%d\tFIL_PAGE_IBUF_FREE_LIST\n", n_fil_page_ibuf_free_list);
-       printf("%d\tFIL_PAGE_TYPE_ALLOCATED\n", n_fil_page_type_allocated);
-       printf("%d\tFIL_PAGE_IBUF_BITMAP\n", n_fil_page_ibuf_bitmap);
-       printf("%d\tFIL_PAGE_TYPE_SYS\n", n_fil_page_type_sys);
-       printf("%d\tFIL_PAGE_TYPE_TRX_SYS\n", n_fil_page_type_trx_sys);
-       printf("%d\tFIL_PAGE_TYPE_FSP_HDR\n", n_fil_page_type_fsp_hdr);
-       printf("%d\tFIL_PAGE_TYPE_XDES\n", n_fil_page_type_xdes);
-       printf("%d\tFIL_PAGE_TYPE_BLOB\n", n_fil_page_type_blob);
-       printf("%d\tFIL_PAGE_TYPE_ZBLOB\n", n_fil_page_type_zblob);
-       printf("%d\tFIL_PAGE_PAGE_COMPRESSED\n", n_fil_page_type_page_compressed);
-       printf("%d\tFIL_PAGE_PAGE_COMPRESSED_ENCRYPTED\n", n_fil_page_type_page_compressed_encrypted);
-       printf("%d\tother\n", n_fil_page_type_other);
-       printf("%d\tmax index_id\n", n_fil_page_max_index_id);
-       printf("undo type: %d insert, %d update, %d other\n",
-               n_undo_insert, n_undo_update, n_undo_other);
-       printf("undo state: %d active, %d cached, %d to_free, %d to_purge,"
-               " %d prepared, %d other\n", n_undo_state_active,
-               n_undo_state_cached, n_undo_state_to_free,
-               n_undo_state_to_purge, n_undo_state_prepared,
-               n_undo_state_other);
-
-       printf("index_id\t#pages\t\t#leaf_pages\t#recs_per_page"
-               "\t#bytes_per_page\n");
-       for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin(); it != index_ids.end(); it++) {
-         const per_index_stats& index = it->second;
-         printf("%lld\t\t%lld\t\t%lld\t\t%lld\t\t%lld\n",
-                it->first, index.pages, index.leaf_pages,
-                index.total_n_recs / index.pages,
-                index.total_data_bytes / index.pages);
-       }
-       printf("\n");
-       printf("index_id\tpage_data_bytes_histgram(empty,...,oversized)\n");
-       for (std::map<unsigned long long, per_index_stats>::const_iterator it = index_ids.begin(); it != index_ids.end(); it++) {
-         printf("%lld\t", it->first);
-         const per_index_stats& index = it->second;
-         for (i = 0; i < SIZE_RANGES_FOR_PAGE+2; i++) {
-           printf("\t%lld", index.pages_in_size_range[i]);
-         }
-         printf("\n");
-       }
-       if (do_leaf) {
-         print_leaf_stats();
-       }
-}
+	if (verbose) {
+		/* JAN: TODO: MySQL 5.7
+		my_print_variables_ex(innochecksum_options, stderr);
+		*/
+		my_print_variables(innochecksum_options);
+	}
 
-int main(int argc, char **argv)
-{
-  FILE* f;                       /* our input file */
-  char* filename;                /* our input filename. */
-  unsigned char *big_buf= 0, *buf;
-  unsigned char *big_xdes= 0, *xdes;
-  ulong bytes;                   /* bytes read count */
-  ulint ct;                      /* current page number (0 based) */
-  time_t now;                    /* current time */
-  time_t lastt;                  /* last time */
-  ulint oldcsum, oldcsumfield, csum, csumfield, crc32, logseq, logseqfield;
-                                 /* ulints for checksum storage */
-  struct stat st;                /* for stat, if you couldn't guess */
-  unsigned long long int size;   /* size of file (has to be 64 bits) */
-  ulint pages;                   /* number of pages in file */
-  off_t offset= 0;
-  int fd;
-
-  printf("InnoDB offline file checksum utility.\n");
-
-  ut_crc32_init();
-
-  MY_INIT(argv[0]);
-
-  if (get_options(&argc,&argv))
-    exit(1);
-
-  if (verbose)
-    my_print_variables(innochecksum_options);
-
-  /* The file name is not optional */
-  filename = *argv;
-  if (*filename == '\0')
-  {
-    fprintf(stderr, "Error; File name missing\n");
-    goto error_out;
-  }
-
-  /* stat the file to get size and page count */
-  if (stat(filename, &st))
-  {
-    fprintf(stderr, "Error; %s cannot be found\n", filename);
-    goto error_out;
-  }
-  size= st.st_size;
-
-  /* Open the file for reading */
-  f= fopen(filename, "rb");
-  if (f == NULL)
-  {
-    fprintf(stderr, "Error; %s cannot be opened", filename);
-    perror(" ");
-    goto error_out;
-  }
-
-  big_buf = (unsigned char *)malloc(2 * UNIV_PAGE_SIZE_MAX);
-  if (big_buf == NULL)
-  {
-    fprintf(stderr, "Error; failed to allocate memory\n");
-    perror("");
-    goto error_f;
-  }
-
-  /* Make sure the page is aligned */
-  buf = (unsigned char*)ut_align_down(big_buf
-                                      + UNIV_PAGE_SIZE_MAX, UNIV_PAGE_SIZE_MAX);
-
-  big_xdes = (unsigned char *)malloc(2 * UNIV_PAGE_SIZE_MAX);
-  if (big_xdes == NULL)
-  {
-    fprintf(stderr, "Error; failed to allocate memory\n");
-    perror("");
-    goto error_big_buf;
-  }
-
-  /* Make sure the page is aligned */
-  xdes = (unsigned char*)ut_align_down(big_xdes
-                                      + UNIV_PAGE_SIZE_MAX, UNIV_PAGE_SIZE_MAX);
-
-
-  if (!get_page_size(f, buf, &logical_page_size, &physical_page_size))
-    goto error;
-
-  if (compressed)
-  {
-    printf("Table is compressed\n");
-    printf("Key block size is %lu\n", physical_page_size);
-  }
-  else
-  {
-    printf("Table is uncompressed\n");
-    printf("Page size is %lu\n", physical_page_size);
-  }
-
-  pages= (ulint) (size / physical_page_size);
-
-  if (just_count)
-  {
-    if (verbose)
-      printf("Number of pages: ");
-    printf("%lu\n", pages);
-    goto ok;
-  }
-  else if (verbose)
-  {
-    printf("file %s = %llu bytes (%lu pages)...\n", filename, size, pages);
-    if (do_one_page)
-      printf("InnoChecksum; checking page %lu\n", do_page);
-    else
-      printf("InnoChecksum; checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
-  }
-
-#ifdef UNIV_LINUX
-  if (posix_fadvise(fileno(f), 0, 0, POSIX_FADV_SEQUENTIAL) ||
-      posix_fadvise(fileno(f), 0, 0, POSIX_FADV_NOREUSE))
-  {
-    perror("posix_fadvise failed");
-  }
-#endif
 
-  /* seek to the necessary position */
-  if (start_page)
-  {
-    fd= fileno(f);
-    if (!fd)
-    {
-      perror("Error; Unable to obtain file descriptor number");
-      goto error;
-    }
-
-    offset= (off_t)start_page * (off_t)physical_page_size;
-
-    if (lseek(fd, offset, SEEK_SET) != offset)
-    {
-      perror("Error; Unable to seek to necessary offset");
-      goto error;
-    }
-  }
-
-  /* main checksumming loop */
-  ct= start_page;
-  lastt= 0;
-  while (!feof(f))
-  {
-    int page_ok = 1;
-
-    bytes= fread(buf, 1, physical_page_size, f);
-
-    if (!bytes && feof(f))
-      goto ok;
-
-    if (ferror(f))
-    {
-      fprintf(stderr, "Error reading %lu bytes", physical_page_size);
-      perror(" ");
-      goto error;
-    }
-
-    ulint page_type = mach_read_from_2(buf+FIL_PAGE_TYPE);
-    ulint key_version = mach_read_from_4(buf + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
-
-    if (key_version && page_type != FIL_PAGE_PAGE_COMPRESSED) {
-	    encrypted = true;
-    } else {
-	    encrypted = false;
-    }
-
-    ulint comp_method = 0;
-
-    if (encrypted) {
-	    comp_method = mach_read_from_2(buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE);
-    } else {
-	    comp_method = mach_read_from_8(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
-    }
-
-    ulint comp_size = mach_read_from_2(buf+FIL_PAGE_DATA);
-    ib_uint32_t encryption_checksum = mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4);
-
-
-    if (page_type == FIL_PAGE_PAGE_COMPRESSED) {
-      /* Page compressed tables do not have any checksum */
-      if (debug)
-	fprintf(stderr, "Page %lu page compressed with method %s real_size %lu\n", ct,
-	        fil_get_compression_alg_name(comp_method), comp_size);
-      page_ok = 1;
-    } else if (compressed) {
-        /* compressed pages */
-	ulint crccsum = page_zip_calc_checksum(buf, physical_page_size, SRV_CHECKSUM_ALGORITHM_CRC32);
-	ulint icsum = page_zip_calc_checksum(buf, physical_page_size,  SRV_CHECKSUM_ALGORITHM_INNODB);
-
-        if (debug) {
-	  if (key_version != 0) {
-	    fprintf(stderr,
-		    "Page %lu encrypted key_version %lu calculated = %lu; crc32 = %lu; recorded = %u\n",
-		    ct, key_version, icsum, crccsum, encryption_checksum);
-	  }
-        }
+	buf = (byte*) malloc(UNIV_PAGE_SIZE_MAX * 2);
+	tbuf = buf + UNIV_PAGE_SIZE_MAX;
+
+	/* The file name is not optional. */
+	for (int i = 0; i < argc; ++i) {
+		/* Reset parameters for each file. */
+		filename = argv[i];
+		memset(&page_type, 0, sizeof(innodb_page_type));
+		is_corrupted = false;
+		partial_page_read = false;
+		skip_page = false;
+
+		if (is_log_enabled) {
+			fprintf(log_file, "Filename = %s\n", filename);
+		}
+
+		if (*filename == '-') {
+			/* read from stdin. */
+			fil_in = stdin;
+			read_from_stdin = true;
+
+		}
+
+		/* stat the file to get size and page count. */
+		if (!read_from_stdin &&
+#ifdef _WIN32
+			_stat64(filename, &st)) {
+#else
+			stat(filename, &st)) {
+#endif /* _WIN32 */
+			fprintf(stderr, "Error: %s cannot be found\n",
+				filename);
+
+			DBUG_RETURN(1);
+		}
+
+		if (!read_from_stdin) {
+			size = st.st_size;
+			fil_in = open_file(filename);
+			/*If fil_in is NULL, terminate as some error encountered */
+			if(fil_in == NULL) {
+				DBUG_RETURN(1);
+			}
+			/* Save the current file pointer in pos variable.*/
+			if (0 != fgetpos(fil_in, &pos)) {
+				perror("fgetpos");
+				DBUG_RETURN(1);
+			}
+		}
+
+		/* Testing for lock mechanism. The innochecksum
+		acquire lock on given file. So other tools accessing the same
+		file for processsing must fail. */
+#ifdef _WIN32
+		DBUG_EXECUTE_IF("innochecksum_cause_mysqld_crash",
+			ut_ad(page_dump_filename);
+			while((_access( page_dump_filename, 0)) == 0) {
+				sleep(1);
+			}
+			DBUG_RETURN(0); );
+#else
+		DBUG_EXECUTE_IF("innochecksum_cause_mysqld_crash",
+			ut_ad(page_dump_filename);
+			struct stat status_buf;
+			while(stat(page_dump_filename, &status_buf) == 0) {
+				sleep(1);
+			}
+			DBUG_RETURN(0); );
+#endif /* _WIN32 */
+
+		/* Read the minimum page size. */
+		bytes = ulong(fread(buf, 1, UNIV_ZIP_SIZE_MIN, fil_in));
+		partial_page_read = true;
+
+		if (bytes != UNIV_ZIP_SIZE_MIN) {
+			fprintf(stderr, "Error: Was not able to read the "
+				"minimum page size ");
+			fprintf(stderr, "of %d bytes.  Bytes read was %lu\n",
+				UNIV_ZIP_SIZE_MIN, bytes);
+
+			free(buf);
+			DBUG_RETURN(1);
+		}
+
+		/* enable variable is_system_tablespace when space_id of given
+		file is zero. Use to skip the checksum verification and rewrite
+		for doublewrite pages. */
+		is_system_tablespace = (!memcmp(&space_id, buf +
+					FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, 4))
+					? true : false;
+
+		const page_size_t&	page_size = get_page_size(buf);
+
+		pages = (ulint) (size / page_size.physical());
+
+		if (just_count) {
+			if (read_from_stdin) {
+				fprintf(stderr, "Number of pages:%lu\n", pages);
+			} else {
+				printf("Number of pages:%lu\n", pages);
+			}
+			continue;
+		} else if (verbose && !read_from_stdin) {
+			if (is_log_enabled) {
+				fprintf(log_file, "file %s = %llu bytes "
+					"(%lu pages)\n", filename, size, pages);
+				if (do_one_page) {
+					fprintf(log_file, "Innochecksum: "
+						"checking page %lu \n",
+						do_page);
+				}
+			}
+		} else {
+			if (is_log_enabled) {
+				fprintf(log_file, "Innochecksum: checking "
+					"pages in range %lu to %lu\n",
+					start_page, use_end_page ?
+					end_page : (pages - 1));
+			}
+		}
+
+		/* seek to the necessary position */
+		if (start_page) {
+			if (!read_from_stdin) {
+				/* If read is not from stdin, we can use
+				fseeko() to position the file pointer to
+				the desired page. */
+				partial_page_read = false;
+
+				offset = (off_t) start_page
+					* (off_t) page_size.physical();
+#ifdef _WIN32
+				if (_fseeki64(fil_in, offset, SEEK_SET)) {
+#else
+				if (fseeko(fil_in, offset, SEEK_SET)) {
+#endif /* _WIN32 */
+					perror("Error: Unable to seek to "
+						"necessary offset");
+
+					free(buf);
+					DBUG_RETURN(1);
+				}
+				/* Save the current file pointer in
+				pos variable. */
+				if (0 != fgetpos(fil_in, &pos)) {
+					perror("fgetpos");
+
+					free(buf);
+					DBUG_RETURN(1);
+				}
+			} else {
+
+				ulong count = 0;
+
+				while (!feof(fil_in)) {
+					if (start_page == count) {
+						break;
+					}
+					/* We read a part of page to find the
+					minimum page size. We cannot reset
+					the file pointer to the beginning of
+					the page if we are reading from stdin
+					(fseeko() on stdin doesn't work). So
+					read only the remaining part of page,
+					if partial_page_read is enable. */
+					bytes = read_file(buf,
+							  partial_page_read,
+							  static_cast<ulong>(
+							  page_size.physical()),
+							  fil_in);
+
+					partial_page_read = false;
+					count++;
+
+					if (!bytes || feof(fil_in)) {
+						fprintf(stderr, "Error: Unable "
+							"to seek to necessary "
+							"offset");
+
+						free(buf);
+						DBUG_RETURN(1);
+					}
+				}
+			}
+		}
+
+		if (page_type_dump) {
+			fprintf(fil_page_type,
+				"\n\nFilename::%s\n", filename);
+			fprintf(fil_page_type,
+				"========================================"
+				"======================================\n");
+			fprintf(fil_page_type,
+				"\tPAGE_NO\t\t|\t\tPAGE_TYPE\t\t"
+				"\t|\tEXTRA INFO\n");
+			fprintf(fil_page_type,
+				"========================================"
+				"======================================\n");
+		}
+
+		/* main checksumming loop */
+		cur_page_num = start_page;
+		lastt = 0;
+		while (!feof(fil_in)) {
+
+			bytes = read_file(buf, partial_page_read,
+					  static_cast<ulong>(
+					  page_size.physical()), fil_in);
+			partial_page_read = false;
+
+			if (!bytes && feof(fil_in)) {
+				break;
+			}
+
+			if (ferror(fil_in)) {
+				fprintf(stderr, "Error reading %lu bytes",
+					page_size.physical());
+				perror(" ");
+
+				free(buf);
+				DBUG_RETURN(1);
+			}
+
+			if (bytes != page_size.physical()) {
+				fprintf(stderr, "Error: bytes read (%lu) "
+					"doesn't match page size (%lu)\n",
+					bytes, page_size.physical());
+				free(buf);
+				DBUG_RETURN(1);
+			}
+
+			if (is_system_tablespace) {
+				/* enable when page is double write buffer.*/
+				skip_page = is_page_doublewritebuffer(buf);
+			} else {
+				skip_page = false;
+
+				if (!page_decompress(buf, tbuf, page_size)) {
+
+					fprintf(stderr,
+						"Page decompress failed");
+
+					free(buf);
+					DBUG_RETURN(1);
+				}
+			}
+
+			/* If no-check is enabled, skip the
+			checksum verification.*/
+			if (!no_check) {
+				/* Checksum verification */
+				if (!skip_page) {
+					is_corrupted = is_page_corrupted(
+						buf, page_size);
+
+					if (is_corrupted) {
+						fprintf(stderr, "Fail: page "
+							"%lu invalid\n",
+							cur_page_num);
+
+						mismatch_count++;
+
+						if(mismatch_count > allow_mismatches) {
+							fprintf(stderr,
+								"Exceeded the "
+								"maximum allowed "
+								"checksum mismatch "
+								"count::%lu\n",
+								allow_mismatches);
+
+							free(buf);
+							DBUG_RETURN(1);
+						}
+					}
+				}
+			}
+
+			/* Rewrite checksum */
+			if (do_write
+			    && !write_file(filename, fil_in, buf,
+					   page_size.is_compressed(), &pos,
+					   static_cast<ulong>(page_size.physical()))) {
+
+				free(buf);
+				DBUG_RETURN(1);
+			}
+
+			/* end if this was the last page we were supposed to check */
+			if (use_end_page && (cur_page_num >= end_page)) {
+				break;
+			}
+
+			if (page_type_summary || page_type_dump) {
+				parse_page(buf, fil_page_type);
+			}
+
+			/* do counter increase and progress printing */
+			cur_page_num++;
+			if (verbose && !read_from_stdin) {
+				if ((cur_page_num % 64) == 0) {
+					now = time(0);
+					if (!lastt) {
+						lastt= now;
+					}
+					if (now - lastt >= 1
+					    && is_log_enabled) {
+						fprintf(log_file, "page %lu "
+							"okay: %.3f%% done\n",
+							(cur_page_num - 1),
+							(float) cur_page_num / pages * 100);
+						lastt = now;
+					}
+				}
+			}
+		}
+
+		if (!read_from_stdin) {
+			/* flcose() will flush the data and release the lock if
+			any acquired. */
+			fclose(fil_in);
+		}
+
+		/* Enabled for page type summary. */
+		if (page_type_summary) {
+			if (!read_from_stdin) {
+				fprintf(stdout, "\nFile::%s",filename);
+				print_summary(stdout);
+			} else {
+				print_summary(stderr);
+			}
+		}
+	}
 
-	if (encrypted) {
-	  if (encryption_checksum != 0 && crccsum != encryption_checksum && icsum != encryption_checksum) {
-	    if (debug)
-	      fprintf(stderr, "page %lu: compressed: calculated = %lu; crc32 = %lu; recorded = %u\n",
-		      ct, icsum, crccsum, encryption_checksum);
-	    fprintf(stderr, "Fail; page %lu invalid (fails compressed page checksum).\n", ct);
-	  }
-	} else {
-          if (!page_zip_verify_checksum(buf, physical_page_size)) {
-            fprintf(stderr, "Fail; page %lu invalid (fails compressed page checksum).\n", ct);
-            if (!skip_corrupt)
-              goto error;
-            page_ok = 0;
-          }
+	if (is_log_enabled) {
+		fclose(log_file);
 	}
-    } else {
-      if (key_version != 0) {
-      /* Encrypted page */
-        if (debug) {
-	  if (page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED) {
-	    fprintf(stderr,
-		    "Page %lu page compressed with method %s real_size %lu and encrypted key_version %lu checksum %u\n",
-		    ct, fil_get_compression_alg_name(comp_method), comp_size, key_version, encryption_checksum);
-	  } else {
-	    fprintf(stderr,
-		    "Page %lu encrypted key_version %lu checksum %u\n",
-		    ct, key_version, encryption_checksum);
-	  }
-        }
-      }
-
-      /* Page compressed tables do not contain FIL tailer */
-      if (page_type != FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED && page_type != FIL_PAGE_PAGE_COMPRESSED) {
-        /* check the "stored log sequence numbers" */
-         logseq= mach_read_from_4(buf + FIL_PAGE_LSN + 4);
-        logseqfield= mach_read_from_4(buf + logical_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
-        if (debug)
-          printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
-        if (logseq != logseqfield)
-        {
-          fprintf(stderr, "Fail; page %lu invalid (fails log sequence number check)\n", ct);
-          if (!skip_corrupt)
-            goto error;
-          page_ok = 0;
-        }
 
-        /* check old method of checksumming */
-        oldcsum= buf_calc_page_old_checksum(buf);
-        oldcsumfield= mach_read_from_4(buf + logical_page_size - FIL_PAGE_END_LSN_OLD_CHKSUM);
-        if (debug)
-          printf("page %lu: old style: calculated = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
-        if (oldcsumfield != mach_read_from_4(buf + FIL_PAGE_LSN) && oldcsumfield != oldcsum)
-        {
-          fprintf(stderr, "Fail;  page %lu invalid (fails old style checksum)\n", ct);
-          if (!skip_corrupt)
-            goto error;
-          page_ok = 0;
-        }
-      }
-
-      /* now check the new method */
-      csum= buf_calc_page_new_checksum(buf);
-      crc32= buf_calc_page_crc32(buf);
-      csumfield= mach_read_from_4(buf + FIL_PAGE_SPACE_OR_CHKSUM);
-
-      if (key_version)
-	      csumfield = encryption_checksum;
-
-      if (debug)
-        printf("page %lu: new style: calculated = %lu; crc32 = %lu; recorded = %lu\n",
-               ct, csum, crc32, csumfield);
-      if (csumfield != 0 && crc32 != csumfield && csum != csumfield)
-      {
-        fprintf(stderr, "Fail; page %lu invalid (fails innodb and crc32 checksum)\n", ct);
-        if (!skip_corrupt)
-          goto error;
-        page_ok = 0;
-      }
-    }
-    /* end if this was the last page we were supposed to check */
-    if (use_end_page && (ct >= end_page))
-      goto ok;
-
-    if (per_page_details)
-    {
-      printf("page %ld ", ct);
-    }
-
-    /* do counter increase and progress printing */
-    ct++;
-
-    if (!page_ok)
-    {
-      if (per_page_details)
-      {
-        printf("BAD_CHECKSUM\n");
-      }
-      n_bad_checksum++;
-      continue;
-    }
-
-    /* Can't parse compressed or/and encrypted pages */
-    if (page_type != FIL_PAGE_PAGE_COMPRESSED && !encrypted) {
-      parse_page(buf, xdes);
-    }
-
-    if (verbose)
-    {
-      if (ct % 64 == 0)
-      {
-        now= time(0);
-        if (!lastt) lastt= now;
-        if (now - lastt >= 1)
-        {
-          printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
-          lastt= now;
-        }
-      }
-    }
-  }
-
-ok:
-  if (!just_count)
-    print_stats();
-  free(big_xdes);
-  free(big_buf);
-  fclose(f);
-  my_end(0);
-  exit(0);
-
-error:
-  free(big_xdes);
-error_big_buf:
-  free(big_buf);
-error_f:
-  fclose(f);
-error_out:
-  my_end(0);
-  exit(1);
+	free(buf);
+	DBUG_RETURN(0);
 }
diff --git a/include/dur_prop.h b/include/dur_prop.h
new file mode 100644
index 0000000..558ce5a
--- /dev/null
+++ b/include/dur_prop.h
@@ -0,0 +1,32 @@
+/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
+
+#ifndef _my_dur_prop_h
+#define _my_dur_prop_h
+
+enum durability_properties
+{
+  /*
+    Preserves the durability properties defined by the engine
+  */
+  HA_REGULAR_DURABILITY= 0,
+  /*
+     Ignore the durability properties defined by the engine and
+     write only in-memory entries.
+  */
+  HA_IGNORE_DURABILITY= 1
+};
+
+#endif /* _my_dur_prop_h */
diff --git a/include/my_icp.h b/include/my_icp.h
new file mode 100644
index 0000000..8b77b7c
--- /dev/null
+++ b/include/my_icp.h
@@ -0,0 +1,48 @@
+/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; version 2 of the License.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef _my_icp_h
+#define _my_icp_h
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/**
+  Values returned by index_cond_func_xxx functions.
+*/
+
+typedef enum icp_result {
+  /** Index tuple doesn't satisfy the pushed index condition (the engine
+  should discard the tuple and go to the next one) */
+  ICP_NO_MATCH,
+
+  /** Index tuple satisfies the pushed index condition (the engine should
+  fetch and return the record) */
+  ICP_MATCH,
+
+  /** Index tuple is out of the range that we're scanning, e.g. if we're
+  scanning "t.key BETWEEN 10 AND 20" and got a "t.key=21" tuple (the engine
+  should stop scanning and return HA_ERR_END_OF_FILE right away). */
+  ICP_OUT_OF_RANGE
+
+} ICP_RESULT;
+
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _my_icp_h */
diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h
new file mode 100644
index 0000000..10593c4
--- /dev/null
+++ b/include/mysql/psi/psi_base.h
@@ -0,0 +1,147 @@
+/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software Foundation,
+  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_PSI_BASE_H
+#define MYSQL_PSI_BASE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+  @file mysql/psi/psi_base.h
+  Performance schema instrumentation interface.
+
+  @defgroup Instrumentation_interface Instrumentation Interface
+  @ingroup Performance_schema
+  @{
+*/
+
+#define PSI_INSTRUMENT_ME 0
+
+#define PSI_NOT_INSTRUMENTED 0
+
+/**
+  Global flag.
+  This flag indicate that an instrumentation point is a global variable,
+  or a singleton.
+*/
+#define PSI_FLAG_GLOBAL (1 << 0)
+
+/**
+  Mutable flag.
+  This flag indicate that an instrumentation point is a general placeholder,
+  that can mutate into a more specific instrumentation point.
+*/
+#define PSI_FLAG_MUTABLE (1 << 1)
+
+#define PSI_FLAG_THREAD (1 << 2)
+
+/**
+  Stage progress flag.
+  This flag apply to the stage instruments only.
+  It indicates the instrumentation provides progress data.
+*/
+#define PSI_FLAG_STAGE_PROGRESS (1 << 3)
+
+/**
+  Shared Exclusive flag.
+  Indicates that rwlock support the shared exclusive state.
+*/
+#define PSI_RWLOCK_FLAG_SX (1 << 4)
+
+/**
+  Transferable flag.
+  This flag indicate that an instrumented object can
+  be created by a thread and destroyed by another thread.
+*/
+#define PSI_FLAG_TRANSFER (1 << 5)
+
+#ifdef HAVE_PSI_INTERFACE
+
+/**
+  @def PSI_VERSION_1
+  Performance Schema Interface number for version 1.
+  This version is supported.
+*/
+#define PSI_VERSION_1 1
+
+/**
+  @def PSI_VERSION_2
+  Performance Schema Interface number for version 2.
+  This version is not implemented, it's a placeholder.
+*/
+#define PSI_VERSION_2 2
+
+/**
+  @def PSI_CURRENT_VERSION
+  Performance Schema Interface number for the most recent version.
+  The most current version is @c PSI_VERSION_1
+*/
+#define PSI_CURRENT_VERSION 1
+
+/**
+  @def USE_PSI_1
+  Define USE_PSI_1 to use the interface version 1.
+*/
+
+/**
+  @def USE_PSI_2
+  Define USE_PSI_2 to use the interface version 2.
+*/
+
+/**
+  @def HAVE_PSI_1
+  Define HAVE_PSI_1 if the interface version 1 needs to be compiled in.
+*/
+
+/**
+  @def HAVE_PSI_2
+  Define HAVE_PSI_2 if the interface version 2 needs to be compiled in.
+*/
+
+#ifndef USE_PSI_2
+#ifndef USE_PSI_1
+#define USE_PSI_1
+#endif
+#endif
+
+#ifdef USE_PSI_1
+#define HAVE_PSI_1
+#endif
+
+#ifdef USE_PSI_2
+#define HAVE_PSI_2
+#endif
+
+/*
+  Allow to override PSI_XXX_CALL at compile time
+  with more efficient implementations, if available.
+  If nothing better is available,
+  make a dynamic call using the PSI_server function pointer.
+*/
+
+#define PSI_DYNAMIC_CALL(M) PSI_server->M
+
+#endif /* HAVE_PSI_INTERFACE */
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MYSQL_PSI_BASE_H */
+
diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h
new file mode 100644
index 0000000..725b3ed
--- /dev/null
+++ b/include/mysql/psi/psi_memory.h
@@ -0,0 +1,155 @@
+/* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software Foundation,
+  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef MYSQL_PSI_MEMORY_H
+#define MYSQL_PSI_MEMORY_H
+
+#include "psi_base.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+  @file mysql/psi/psi_memory.h
+  Performance schema instrumentation interface.
+
+  @defgroup Instrumentation_interface Instrumentation Interface
+  @ingroup Performance_schema
+  @{
+*/
+
+#ifdef HAVE_PSI_INTERFACE
+#ifndef DISABLE_ALL_PSI
+#ifndef DISABLE_PSI_MEMORY
+#define HAVE_PSI_MEMORY_INTERFACE
+#endif /* DISABLE_PSI_MEMORY */
+#endif /* DISABLE_ALL_PSI */
+#endif /* HAVE_PSI_INTERFACE */
+
+struct PSI_thread;
+
+/**
+  Instrumented memory key.
+  To instrument memory, a memory key must be obtained using @c register_memory.
+  Using a zero key always disable the instrumentation.
+*/
+typedef unsigned int PSI_memory_key;
+
+#ifdef HAVE_PSI_1
+
+/**
+  @defgroup Group_PSI_v1 Application Binary Interface, version 1
+  @ingroup Instrumentation_interface
+  @{
+*/
+
+/**
+  Memory instrument information.
+  @since PSI_VERSION_1
+  This structure is used to register instrumented memory.
+*/
+struct PSI_memory_info_v1
+{
+  /** Pointer to the key assigned to the registered memory. */
+  PSI_memory_key *m_key;
+  /** The name of the memory instrument to register. */
+  const char *m_name;
+  /**
+    The flags of the socket instrument to register.
+    @sa PSI_FLAG_GLOBAL
+  */
+  int m_flags;
+};
+typedef struct PSI_memory_info_v1 PSI_memory_info_v1;
+
+/**
+  Memory registration API.
+  @param category a category name (typically a plugin name)
+  @param info an array of memory info to register
+  @param count the size of the info array
+*/
+typedef void (*register_memory_v1_t)
+  (const char *category, struct PSI_memory_info_v1 *info, int count);
+
+/**
+  Instrument memory allocation.
+  @param key the memory instrument key
+  @param size the size of memory allocated
+  @param[out] owner the memory owner
+  @return the effective memory instrument key
+*/
+typedef PSI_memory_key (*memory_alloc_v1_t)
+  (PSI_memory_key key, size_t size, struct PSI_thread ** owner);
+
+/**
+  Instrument memory re allocation.
+  @param key the memory instrument key
+  @param old_size the size of memory previously allocated
+  @param new_size the size of memory re allocated
+  @param[in, out] owner the memory owner
+  @return the effective memory instrument key
+*/
+typedef PSI_memory_key (*memory_realloc_v1_t)
+  (PSI_memory_key key, size_t old_size, size_t new_size, struct PSI_thread ** owner);
+
+/**
+  Instrument memory claim.
+  @param key the memory instrument key
+  @param size the size of memory allocated
+  @param[in, out] owner the memory owner
+  @return the effective memory instrument key
+*/
+typedef PSI_memory_key (*memory_claim_v1_t)
+  (PSI_memory_key key, size_t size, struct PSI_thread ** owner);
+
+/**
+  Instrument memory free.
+  @param key the memory instrument key
+  @param size the size of memory allocated
+  @param owner the memory owner
+*/
+typedef void (*memory_free_v1_t)
+  (PSI_memory_key key, size_t size, struct PSI_thread * owner);
+
+/** @} (end of group Group_PSI_v1) */
+
+#endif /* HAVE_PSI_1 */
+
+#ifdef HAVE_PSI_2
+struct PSI_memory_info_v2
+{
+  int placeholder;
+};
+
+#endif /* HAVE_PSI_2 */
+
+#ifdef USE_PSI_1
+typedef struct PSI_memory_info_v1 PSI_memory_info;
+#endif
+
+#ifdef USE_PSI_2
+typedef struct PSI_memory_info_v2 PSI_memory_info;
+#endif
+
+/** @} (end of group Instrumentation_interface) */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* MYSQL_PSI_MEMORY_H */
+
diff --git a/mysql-test/disabled.def b/mysql-test/disabled.def
index e82ddcf..75704c7 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 0000000..af8b090
--- /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 f0198ca..0d5f021 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 76a8d2d..4f7f545 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 0000000..f51b8bf
--- /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 bcb76c4..6f0fadc 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 0000000..125a4e4
--- /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 0000000..f834666
--- /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 0000000..6af83d5
--- /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 0000000..bd1c7d7
--- /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 0419dc9..3454f83 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 6b25c75..d47e7d3 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 0cddff8..afad786 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 3461038..d8e1741 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 77c74fb..9d8f8e7 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 bc1c242..8a519d6 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 84c0e66..2737d61 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 b0e89b7..818316f 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 f3167db..0b62ba9 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 c9568f7..d1ec12e 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 d53d2ed..35b1e31 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 8428936..19feae4 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 ef52346..5789fc6 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 fb8a126..0fbebba 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 daf2807..2c1913f 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 0e86675..42443bf 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 80fc942..acb3c31 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 8c0d479..ae9359f 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 8793e6b..e185740 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 cf97918..84c8c2f 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 68d8552..3449e63 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 531ba40..3ced393 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 11130a7..9d8b1dd 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 195b82f..dc55c0a 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 5869c5d..2003df0 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 63ff1dc..62b233c 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 655e302..fb62292 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 c481498..051fd60 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 f7ffc77..6efefb2 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 92130da..672202d 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 f8c59b7..5bb3b2b 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 ab95800..576b44f 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 5bbcbbe..591c5a8 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 0000000..e49e38a
--- /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 640e2be..da62c0a 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 f5dba15..69ab0d0 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 43fb736..22038c0 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 9180fb1..9fd6ac3 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 20d63b1..d0480a6 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 6d9f6c5..3bcb8d3 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 42d8008..e8e2ba0 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 def3665..0361fdd 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 0000000..7ebf81a
--- /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 0000000..0a28c16
--- /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 23e6ad7..0e23897 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 c9c86b4..8e0c9b6 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 0000000..ef63577
--- /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 8cae44a..778ce48 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 bc64937..75cab77 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 5d5dffa..80a780b 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 542ce9d..06fdeae 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 10affe7..87530bc 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 0537315..adfbc97 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 2971286..bd60d2d 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 ec5a4a8..fe4b190 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 7a8f959..f6d37b2 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 4b4f201..3ba8e0e 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 508d578..5abfb8c 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 eddedfc..6c203cc 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 e6ee836..fa49027 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 8f6ad13..80b46d3 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 bb3531e..55b4d34 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 8d3bc06..a566c94 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 eeab262..76cd5b1 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 d340801..cceff82 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 fdbc99f..1a9235f 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 a0b2f94..e1d46b0 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 98de5db..a0ac898 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 4c3ab27..a8078c0 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 e613f76..9837f56 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 0608408..ec28ead 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 0e863f5..ae4e96d 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 47413b1..562e9f8 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 fb4ac37..84a67ed 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 4c890dd..d278fee 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 569e6b0..a71dd76 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 c467193..0000000
--- 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 31a064e..3bb786c 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 5958a8d..e784c6b 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 bd3c388..cf960e3 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 d7b72b1..c7f823a 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 195775f..23c5b0cc 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 09fc0b4..b168c77 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 0e3f0ef..7c5ef13 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 656a484..b678046 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 d80c451..1c34ea9 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 8e3be13..f34ebc0 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 0ef6f65..d68879d 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 77328a3..e489911 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 fc13ba1..5a978ea 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 1b83bc2..33dc50d 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 dcdf308..6328458 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 8c58034..bda1462 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 cf5d77a..5ae1384 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 92ae163..099c673b 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 c351b22..b942904 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 f6cce75..42862fb 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 d6a6212..2f120af 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 0000000..8235b0a
--- /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 34ea9c7..83c7507 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 3cd90a0..ad09666 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 80678ce..792882b 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 8aa113f..c1f9ee5 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 33e2b86..97b259e 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 79f7999..cbf2d0c 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 d1cd187..46f1afc 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 0000000..a2a7d5f
--- /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 b929ea1..88f941e 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 b408522..208dcd5 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 368c6fc..0e0d6db 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 b1db349..6c2607e 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 4b03ac0..c61d10e 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 d139e0b..395e4de 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 c9e7748..b04c726 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 2e7306c..79a00c2 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 8553d97..0000000
--- 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 235ece0..9a96f29 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 8e1b819..1b5df7f 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 6b82bac..4107382 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 16e8882..c73571a 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 bbb6f11..de53a93 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 56c26ac..d93d510 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 13c708b..8c73af1 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 741d868..22a5d4e 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 b1d56d1..cb05ca2 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 ee04e8d..52a318f 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 1adb14e..45d66d9 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 c932e45..5d36cfd 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 4a3f752..81fd52c 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 86b56a0..48fc1ef 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 0000000..26ce7e7
--- /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 0000000..413a026
--- /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 0000000..4908dfb
--- /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 0000000..5e55293
--- /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 0000000..1bcb301
--- /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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at 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 0000000..d2fe05e
--- /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 0000000..1395245
--- /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 0000000..42e0908
--- /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 0000000..fcefd0c
--- /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 0000000..0939d45
--- /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 0000000..67569d3
--- /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 0000000..3d9f395
--- /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, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at 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, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at 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, at r, at r, at r, @r, at r, at r, at r, @r, at r, at r, at r, @r, at r, at r, at 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 0000000..721943e
--- /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, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at 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, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at 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, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('b', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('c', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('d', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('e', 48);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at 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 0000000..dc2b5ca
--- /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, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at a, at 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, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at 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, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('b', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('c', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('d', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r);
+SET @r = repeat('e', 96);
+INSERT INTO t1 VALUES(@r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r,
+ at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at r, at 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 0000000..7e165e0
--- /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 0000000..23c5b0cc
--- /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 0000000..20605eb
--- /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 0000000..e14a194
--- /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 0000000..40660f4
--- /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 0000000..c1743ca
--- /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 0000000..5b899e9
--- /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 0000000..2d80894
--- /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 0000000..7285f4d
--- /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 0000000..f010c52
--- /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 0000000..3176ffe
--- /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 0000000..694de4d
--- /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 0000000..0b6adaa
--- /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 0000000..85058c4
--- /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, at col_2, at col_3, at col_4, at cl_5, at col_6,5);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6,4);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6,3);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6,2);
+INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7)
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at 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, at col_2, at col_3, at col_4, at cl_5, at 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, at col_2, at col_3, at col_4, at cl_5, at 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, at col_2, at col_3, at col_4, at cl_5, at 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 fe3d799..1b92eb7 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 318f65d..47215a1 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 aa80e4d..161cef1 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 f4393e8..5ba2675 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 dbebb9d..3b10942 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 40c39d2..92b589c 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 1f6d694..11e90b9 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 f119880..f69fa5c 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 7d52ab1..0000000
--- 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 0000000..7070d61
--- /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 0000000..5645b1e
--- /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 0000000..5cdfe16
--- /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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9, at 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;
+ at 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 0000000..3b98527
--- /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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at 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, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5, at col_6, at col_7, at col_8, at col_9);
+INSERT INTO tab5
+VALUES (@col_1, at col_2, at col_3, at col_4, at cl_5