summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-07-25 18:42:06 +0300
commite9c1701e11e2441435223cc7c00c467f58aaff19 (patch)
tree6be7d0e8fe87272e1abb2704fdb9859481d8acc2
parent17794fb9aac9ca4fcb0b1e5904671a025a1b6b74 (diff)
parentf3eb82f048d342c11fc3869eca2e6faed9a4835d (diff)
downloadmariadb-git-e9c1701e11e2441435223cc7c00c467f58aaff19.tar.gz
Merge 10.3 into 10.4
-rw-r--r--CMakeLists.txt3
-rw-r--r--client/mysqlbinlog.cc1
-rw-r--r--cmake/cpack_rpm.cmake11
-rw-r--r--cmake/misc.cmake6
-rw-r--r--cmake/mysql_version.cmake25
-rw-r--r--cmake/systemd.cmake8
-rw-r--r--debian/control2
m---------libmariadb0
-rw-r--r--mysql-test/include/binlog_parallel_replication_marks.test9
-rw-r--r--mysql-test/include/force_restart.inc14
-rw-r--r--mysql-test/include/have_xtrabackup.inc4
-rw-r--r--mysql-test/include/wait_condition_with_debug.inc69
-rw-r--r--mysql-test/lib/My/Config.pm7
-rw-r--r--mysql-test/main/grant.result19
-rw-r--r--mysql-test/main/grant.test29
-rw-r--r--mysql-test/main/mysqld--help.result2
-rw-r--r--mysql-test/main/mysqld--help.test2
-rw-r--r--mysql-test/main/repair_symlink-5543.result4
-rw-r--r--mysql-test/main/repair_symlink-5543.test8
-rw-r--r--mysql-test/main/sp.result14
-rw-r--r--mysql-test/main/sp.test20
-rw-r--r--mysql-test/main/type_datetime.result10
-rw-r--r--mysql-test/main/type_datetime.test10
-rwxr-xr-xmysql-test/mysql-test-run.pl43
-rw-r--r--mysql-test/std_data/galera-cert.pem26
-rw-r--r--mysql-test/std_data/galera-key.pem28
-rw-r--r--mysql-test/std_data/galera-upgrade-ca-cert.pem40
-rw-r--r--mysql-test/std_data/galera-upgrade-server-cert.pem20
-rw-r--r--mysql-test/std_data/galera-upgrade-server-key.pem28
-rw-r--r--mysql-test/suite/binlog/include/drop_temp_table.test24
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_stop_never.result16
-rw-r--r--mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result8
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result4
-rw-r--r--mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test66
-rw-r--r--mysql-test/suite/galera/disabled.def21
-rw-r--r--mysql-test/suite/galera/r/GAL-419.result8
-rw-r--r--mysql-test/suite/galera/r/MW-329.result6
-rw-r--r--mysql-test/suite/galera/r/MW-336.result50
-rw-r--r--mysql-test/suite/galera/r/MW-416.result10
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid.result11
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result8
-rw-r--r--mysql-test/suite/galera/r/galera_kill_applier.result15
-rw-r--r--mysql-test/suite/galera/r/galera_kill_ddl.result12
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin.result102
-rw-r--r--mysql-test/suite/galera/r/galera_log_output_csv.result2
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff19
-rw-r--r--mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result11
-rw-r--r--mysql-test/suite/galera/r/galera_sync_wait_show.result2
-rw-r--r--mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result31
-rw-r--r--mysql-test/suite/galera/r/galera_var_gtid_domain_id.result9
-rw-r--r--mysql-test/suite/galera/r/galera_var_notify_cmd.result1
-rw-r--r--mysql-test/suite/galera/r/galera_var_slave_threads.result63
-rw-r--r--mysql-test/suite/galera/r/mdev_10518.result9
-rw-r--r--mysql-test/suite/galera/t/GAL-419.test7
-rw-r--r--mysql-test/suite/galera/t/MW-329.test5
-rw-r--r--mysql-test/suite/galera/t/MW-336.cnf7
-rw-r--r--mysql-test/suite/galera/t/MW-336.test121
-rw-r--r--mysql-test/suite/galera/t/MW-416.test8
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid.test14
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test2
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_nonprim.test1
-rw-r--r--mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test2
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test25
-rw-r--r--mysql-test/suite/galera/t/galera_kill_ddl.test13
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin.test26
-rw-r--r--mysql-test/suite/galera/t/galera_log_output_csv.test2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test4
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test4
-rw-r--r--mysql-test/suite/galera/t/galera_sync_wait_show.test2
-rw-r--r--mysql-test/suite/galera/t/galera_toi_ddl_fk_insert.test17
-rw-r--r--mysql-test/suite/galera/t/galera_var_gtid_domain_id.test11
-rw-r--r--mysql-test/suite/galera/t/galera_var_notify_cmd.test2
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.test147
-rw-r--r--mysql-test/suite/galera/t/mdev_10518.test11
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result20
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result1
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test80
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test2
-rw-r--r--mysql-test/suite/innodb/r/alter_large_dml.result49
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff25
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff25
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff25
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff25
-rw-r--r--mysql-test/suite/innodb/r/check_ibd_filesize.result20
-rw-r--r--mysql-test/suite/innodb/r/create_select.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-16k.result465
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k-crash.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k.result120
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k-crash.result5
-rw-r--r--mysql-test/suite/innodb/r/innodb-system-table-view.result178
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result18
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5980-debug.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result54
-rw-r--r--mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result73
-rw-r--r--mysql-test/suite/innodb/r/instant_alter,4k.rdiff184
-rw-r--r--mysql-test/suite/innodb/r/instant_alter.result13
-rw-r--r--mysql-test/suite/innodb/r/instant_alter_bugs.result26
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff80
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff224
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff80
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff121
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff366
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff121
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff62
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff128
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff62
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff203
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff501
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff121
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff35
-rw-r--r--mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff134
-rw-r--r--mysql-test/suite/innodb/r/max_record_size.result47
-rw-r--r--mysql-test/suite/innodb/r/strict_mode.result157
-rw-r--r--mysql-test/suite/innodb/r/trx_id_future.result13
-rw-r--r--mysql-test/suite/innodb/r/undo_log.result5
-rw-r--r--mysql-test/suite/innodb/t/alter_large_dml.opt2
-rw-r--r--mysql-test/suite/innodb/t/alter_large_dml.test53
-rw-r--r--mysql-test/suite/innodb/t/check_ibd_filesize.test53
-rw-r--r--mysql-test/suite/innodb/t/create_select.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb-16k.test478
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k-crash.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k.test135
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k-crash.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-system-table-view.opt10
-rw-r--r--mysql-test/suite/innodb/t/innodb-system-table-view.test136
-rw-r--r--mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test27
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5980-debug.test51
-rw-r--r--mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test47
-rw-r--r--mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test70
-rw-r--r--mysql-test/suite/innodb/t/instant_alter.test4
-rw-r--r--mysql-test/suite/innodb/t/instant_alter_bugs.test18
-rw-r--r--mysql-test/suite/innodb/t/max_record_size.test1422
-rw-r--r--mysql-test/suite/innodb/t/strict_mode.test157
-rw-r--r--mysql-test/suite/innodb/t/trx_id_future.test59
-rw-r--r--mysql-test/suite/innodb/t/undo_log.test5
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_misc.result5
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb_fts_misc.test8
-rw-r--r--mysql-test/suite/multi_source/disabled.def1
-rw-r--r--mysql-test/suite/multi_source/mdev-8874.cnf25
-rw-r--r--mysql-test/suite/multi_source/mdev-8874.result126
-rw-r--r--mysql-test/suite/multi_source/mdev-8874.test141
-rw-r--r--mysql-test/suite/parts/r/fulltext.result6
-rw-r--r--mysql-test/suite/parts/t/fulltext.test9
-rw-r--r--mysql-test/suite/plugins/disabled.def1
-rw-r--r--mysql-test/suite/rpl/include/rpl_drop_create_temp_table.test4
-rw-r--r--mysql-test/suite/rpl/r/create_or_replace_mix.result14
-rw-r--r--mysql-test/suite/rpl/r/create_or_replace_row.result10
-rw-r--r--mysql-test/suite/rpl/r/create_or_replace_statement.result14
-rw-r--r--mysql-test/suite/rpl/r/kill_race_condition.result11
-rw-r--r--mysql-test/suite/rpl/r/mdev_17588.result36
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result31
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result27
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_drop_temp_table.result38
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result31
-rw-r--r--mysql-test/suite/rpl/t/create_or_replace.inc13
-rw-r--r--mysql-test/suite/rpl/t/kill_race_condition.test17
-rw-r--r--mysql-test/suite/rpl/t/mdev_17588-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/mdev_17588.test39
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_drop_temp_table.test54
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled1236
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled697
-rw-r--r--mysql-test/suite/wsrep/r/variables.result29
-rw-r--r--mysql-test/suite/wsrep/t/variables.test18
-rw-r--r--plugin/server_audit/server_audit.c39
-rw-r--r--scripts/mysqld_safe.sh4
-rw-r--r--sql/item_func.cc6
-rw-r--r--sql/item_sum.cc11
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/mysqld.cc5
-rw-r--r--sql/rpl_mi.cc9
-rw-r--r--sql/sp_head.cc2
-rw-r--r--sql/sql_plugin.cc9
-rw-r--r--sql/sql_select.cc5
-rw-r--r--sql/sql_sequence.cc2
-rw-r--r--sql/sql_table.cc3
-rw-r--r--sql/table.cc6
-rw-r--r--sql/temporary_tables.cc86
-rw-r--r--sql/wsrep_mysqld.cc37
-rw-r--r--sql/wsrep_mysqld.h18
-rw-r--r--sql/wsrep_thd.cc9
-rw-r--r--sql/wsrep_var.cc18
-rw-r--r--storage/connect/CMakeLists.txt9
-rw-r--r--storage/connect/array.cpp4
-rw-r--r--storage/connect/csort.cpp22
-rw-r--r--storage/connect/ha_connect.cc6
-rw-r--r--storage/connect/odbconn.cpp2
-rw-r--r--storage/connect/valblk.cpp4
-rw-r--r--storage/connect/xindex.cpp18
-rw-r--r--storage/innobase/CMakeLists.txt3
-rw-r--r--storage/innobase/btr/btr0defragment.cc15
-rw-r--r--storage/innobase/buf/buf0buddy.cc4
-rw-r--r--storage/innobase/buf/buf0buf.cc52
-rw-r--r--storage/innobase/buf/buf0flu.cc4
-rw-r--r--storage/innobase/data/data0data.cc2
-rw-r--r--storage/innobase/dict/dict0defrag_bg.cc5
-rw-r--r--storage/innobase/dict/dict0dict.cc73
-rw-r--r--storage/innobase/dict/dict0stats.cc9
-rw-r--r--storage/innobase/dict/dict0stats_bg.cc4
-rw-r--r--storage/innobase/eval/eval0eval.cc3
-rw-r--r--storage/innobase/fil/fil0crypt.cc19
-rw-r--r--storage/innobase/fil/fil0fil.cc12
-rw-r--r--storage/innobase/fts/fts0fts.cc44
-rw-r--r--storage/innobase/fts/fts0opt.cc119
-rw-r--r--storage/innobase/handler/ha_innodb.cc84
-rw-r--r--storage/innobase/handler/ha_innodb.h7
-rw-r--r--storage/innobase/handler/handler0alter.cc221
-rw-r--r--storage/innobase/include/dict0dict.h12
-rw-r--r--storage/innobase/include/dict0dict.ic3
-rw-r--r--storage/innobase/include/dict0mem.h11
-rw-r--r--storage/innobase/include/dict0stats.h2
-rw-r--r--storage/innobase/include/fts0fts.h11
-rw-r--r--storage/innobase/include/fts0types.h5
-rw-r--r--storage/innobase/include/ha_prototypes.h8
-rw-r--r--storage/innobase/include/lock0lock.h9
-rw-r--r--storage/innobase/include/lock0types.h14
-rw-r--r--storage/innobase/include/log0recv.h4
-rw-r--r--storage/innobase/include/mem0mem.h2
-rw-r--r--storage/innobase/include/mem0mem.ic9
-rw-r--r--storage/innobase/include/row0ftsort.h41
-rw-r--r--storage/innobase/include/srv0mon.h12
-rw-r--r--storage/innobase/include/srv0srv.h12
-rw-r--r--storage/innobase/include/trx0i_s.h6
-rw-r--r--storage/innobase/include/trx0trx.h9
-rw-r--r--storage/innobase/include/ut0timer.h67
-rw-r--r--storage/innobase/include/ut0timer.ic56
-rw-r--r--storage/innobase/include/ut0ut.h67
-rw-r--r--storage/innobase/include/ut0wqueue.h2
-rw-r--r--storage/innobase/lock/lock0lock.cc157
-rw-r--r--storage/innobase/lock/lock0wait.cc53
-rw-r--r--storage/innobase/log/log0recv.cc10
-rw-r--r--storage/innobase/os/os0event.cc23
-rw-r--r--storage/innobase/os/os0file.cc10
-rw-r--r--storage/innobase/page/page0cur.cc10
-rw-r--r--storage/innobase/page/page0zip.cc10
-rw-r--r--storage/innobase/row/row0ftsort.cc43
-rw-r--r--storage/innobase/row/row0ins.cc7
-rw-r--r--storage/innobase/row/row0merge.cc6
-rw-r--r--storage/innobase/row/row0mysql.cc4
-rw-r--r--storage/innobase/row/row0vers.cc12
-rw-r--r--storage/innobase/srv/srv0srv.cc41
-rw-r--r--storage/innobase/srv/srv0start.cc1
-rw-r--r--storage/innobase/sync/sync0arr.cc10
-rw-r--r--storage/innobase/trx/trx0i_s.cc38
-rw-r--r--storage/innobase/trx/trx0purge.cc3
-rw-r--r--storage/innobase/trx/trx0roll.cc4
-rw-r--r--storage/innobase/trx/trx0trx.cc26
-rw-r--r--storage/innobase/ut/ut0crc32.cc17
-rw-r--r--storage/innobase/ut/ut0timer.cc90
-rw-r--r--storage/innobase/ut/ut0ut.cc149
-rw-r--r--storage/innobase/ut/ut0wqueue.cc2
-rw-r--r--storage/maria/ha_maria.cc5
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_checkpoint.c2
-rw-r--r--storage/maria/ma_loghandler.c17
-rw-r--r--storage/maria/ma_open.c2
-rw-r--r--storage/maria/ma_recovery.c38
-rw-r--r--storage/maria/ma_recovery_util.c12
-rw-r--r--storage/mroonga/ha_mroonga.hpp188
-rw-r--r--storage/mroonga/vendor/groonga/CMakeLists.txt5
-rw-r--r--storage/mroonga/vendor/groonga/lib/hash.c34
-rw-r--r--storage/mroonga/vendor/groonga/lib/ii.c17
-rw-r--r--storage/mroonga/vendor/groonga/lib/pat.c14
-rw-r--r--storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c49
-rw-r--r--storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt5
-rw-r--r--storage/rocksdb/build_rocksdb.cmake29
-rw-r--r--storage/rocksdb/ha_rocksdb.cc28
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/include/have_write_prepared.inc3
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result12
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result5
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/unique_check.result10
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test29
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test10
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/check_ignore_unknown_options.test42
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/disabled.def4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_per_partition.test1
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test12
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/unique_check.test11
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_rpl/combinations5
-rw-r--r--storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def2
m---------storage/rocksdb/rocksdb0
-rw-r--r--storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake2
-rw-r--r--support-files/CMakeLists.txt9
-rw-r--r--support-files/rpm/server-postin.sh2
-rw-r--r--zlib/CMakeLists.txt5
288 files changed, 7974 insertions, 5464 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5f8c2e0cca..bc4a59ab273 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,9 @@ ENDIF()
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()
+IF(POLICY CMP0075)
+ CMAKE_POLICY(SET CMP0075 NEW)
+ENDIF()
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index f11019d707b..cb1b02de81c 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1546,6 +1546,7 @@ end:
{
my_fwrite(result_file, (const uchar *) tmp_str.str, tmp_str.length,
MYF(MY_NABP));
+ fflush(result_file);
my_free(tmp_str.str);
}
}
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake
index 85965971286..c17cb1ca19a 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -45,17 +45,8 @@ SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
-SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY})
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
-SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY}
-
-It is GPL v2 licensed, which means you can use the it free of charge under the
-conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
-
-MariaDB documentation can be found at https://mariadb.com/kb
-MariaDB bug reports should be submitted through https://jira.mariadb.org
-
-")
+SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")
diff --git a/cmake/misc.cmake b/cmake/misc.cmake
index 928c33fd8d2..2a0c57b1973 100644
--- a/cmake/misc.cmake
+++ b/cmake/misc.cmake
@@ -11,3 +11,9 @@ ELSE()
SET(__msg1_${id} ${hash} CACHE INTERNAL "")
ENDFUNCTION()
ENDIF()
+
+MACRO(SET_IF_UNSET VAR VAL)
+ IF(NOT DEFINED ${VAR})
+ SET(${VAR} ${VAL})
+ ENDIF()
+ENDMACRO()
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index ae4bb07b37b..85273136a32 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -75,24 +75,27 @@ string(TOUPPER ${SERVER_MATURITY} SERVER_MATURITY)
SET(SERVER_MATURITY_LEVEL MariaDB_PLUGIN_MATURITY_${SERVER_MATURITY})
SET(MYSQL_TCP_PORT_DEFAULT 0)
-IF(NOT MYSQL_TCP_PORT)
- SET(MYSQL_TCP_PORT 3306)
-ENDIF()
+SET_IF_UNSET(MYSQL_TCP_PORT 3306)
-IF(NOT COMPILATION_COMMENT)
- SET(COMPILATION_COMMENT "Source distribution")
-ENDIF()
+SET_IF_UNSET(COMPILATION_COMMENT "Source distribution")
INCLUDE(package_name)
IF(NOT CPACK_PACKAGE_FILE_NAME)
GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
ENDIF()
-IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
- SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
-ENDIF()
-SET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
-SET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
+SET_IF_UNSET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
+SET_IF_UNSET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
+SET_IF_UNSET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
+SET_IF_UNSET(CPACK_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
+
+It is GPL v2 licensed, which means you can use the it free of charge under the
+conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
+
+MariaDB documentation can be found at https://mariadb.com/kb
+MariaDB bug reports should be submitted through https://jira.mariadb.org
+
+")
SET(CPACK_SOURCE_GENERATOR "TGZ")
# Definitions for windows version resources
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index 8e3023bad6d..e353004e7d2 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -28,13 +28,9 @@ MACRO(CHECK_SYSTEMD)
ENDIF()
ENDIF()
IF(HAVE_DLOPEN)
- SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
- #SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_CFLAGS})
- SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_LDFLAGS}")
+ SET(LIBSYSTEMD ${LIBSYSTEMD_LDFLAGS} ${LIBSYSTEMD_LIBRARIES})
ELSE()
- SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LIBRARIES})
- #SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_STATIC_CFLAGS})
- SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_STATIC_LDFLAGS}")
+ SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LDFLAGS} ${LIBSYSTEMD_STATIC_LIBRARIES})
ENDIF()
ELSE()
SET(LIBSYSTEMD systemd)
diff --git a/debian/control b/debian/control
index 2366cbc9fc2..245eac71151 100644
--- a/debian/control
+++ b/debian/control
@@ -234,7 +234,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
Package: mariadb-client-core-10.4
Architecture: any
-Depends: mariadb-common (>= ${source:Version}),
+Depends: mariadb-common (>= ${source:Version}), libmariadb3,
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-client-10.0,
diff --git a/libmariadb b/libmariadb
-Subproject c098613d289ed88fc53286e98add28ae9f2d8b4
+Subproject 5fa9c4615e71b696b84b4c77aefa197466526a1
diff --git a/mysql-test/include/binlog_parallel_replication_marks.test b/mysql-test/include/binlog_parallel_replication_marks.test
index b915d26ce99..82fa997822d 100644
--- a/mysql-test/include/binlog_parallel_replication_marks.test
+++ b/mysql-test/include/binlog_parallel_replication_marks.test
@@ -49,9 +49,16 @@ connection default;
# We need to wait for the implicit DROP TEMPORARY TABLE to be logged after
# tmp_con disconnect, otherwise we get sporadic test failures.
+# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written to
+# binlog only if the corresponding temporary table exists. In row based
+# replication temporary tables are not replicated hence their corresponding
+# DROP TEMPORARY TABLE statement will be not be written to binary log upon
+# session closure.
+
+if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) {
--let $wait_condition= SELECT variable_value > $before_drop_pos FROM information_schema.global_status WHERE variable_name = 'binlog_snapshot_position'
--source include/wait_condition.inc
-
+}
--let $binlog_pos2=query_get_value(SHOW MASTER STATUS, Position, 1)
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
diff --git a/mysql-test/include/force_restart.inc b/mysql-test/include/force_restart.inc
new file mode 100644
index 00000000000..88c9249bf99
--- /dev/null
+++ b/mysql-test/include/force_restart.inc
@@ -0,0 +1,14 @@
+# ==== Purpose ====
+#
+# Tell mtr that all servers must be restarted after the test has
+# finished.
+#
+# ==== Usage ====
+#
+# --source include/force_restart.inc
+#
+
+--let $_force_restart_datadir= `SELECT @@datadir`
+--append_file $_force_restart_datadir/mtr/force_restart
+1
+EOF
diff --git a/mysql-test/include/have_xtrabackup.inc b/mysql-test/include/have_xtrabackup.inc
new file mode 100644
index 00000000000..0dd693f2c63
--- /dev/null
+++ b/mysql-test/include/have_xtrabackup.inc
@@ -0,0 +1,4 @@
+#
+# suite.pm will make sure that all tests including this file
+# will be skipped as needed
+#
diff --git a/mysql-test/include/wait_condition_with_debug.inc b/mysql-test/include/wait_condition_with_debug.inc
new file mode 100644
index 00000000000..11af423670d
--- /dev/null
+++ b/mysql-test/include/wait_condition_with_debug.inc
@@ -0,0 +1,69 @@
+# include/wait_condition_with_debug.inc
+#
+# SUMMARY
+#
+# Waits until the passed statement returns true, or the operation
+# times out. If the operation times out, the additional error
+# statement will be executed.
+#
+# USAGE
+#
+# let $wait_condition=
+# SELECT c = 3 FROM t;
+# let $wait_condition_on_error_output= select count(*) from t;
+# [let $explicit_default_wait_timeout= N] # to override the default reset
+# --source include/wait_condition_with_debug.inc
+#
+# OR
+#
+# let $wait_timeout= 60; # Override default 30 seconds with 60.
+# let $wait_condition=
+# SELECT c = 3 FROM t;
+# let $wait_condition_on_error_output= select count(*) from t;
+# --source include/wait_condition_with_debug.inc
+# --echo Executed the test condition $wait_condition_reps times
+#
+#
+# EXAMPLE
+# events_bugs.test, events_time_zone.test
+#
+
+let $wait_counter= 300;
+if ($wait_timeout)
+{
+ let $wait_counter= `SELECT $wait_timeout * 10`;
+}
+# Reset $wait_timeout so that its value won't be used on subsequent
+# calls, and default will be used instead.
+if ($explicit_default_wait_timeout)
+{
+ --let $wait_timeout= $explicit_default_wait_timeout
+}
+if (!$explicit_default_wait_timeout)
+{
+ --let $wait_timeout= 0
+}
+
+# Keep track of how many times the wait condition is tested
+# This is used by some tests (e.g., main.status)
+let $wait_condition_reps= 0;
+while ($wait_counter)
+{
+ --error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
+ let $success= `$wait_condition`;
+ inc $wait_condition_reps;
+ if ($success)
+ {
+ let $wait_counter= 0;
+ }
+ if (!$success)
+ {
+ real_sleep 0.1;
+ dec $wait_counter;
+ }
+}
+if (!$success)
+{
+ echo Timeout in wait_condition.inc for $wait_condition;
+ --eval $wait_condition_on_error_output
+}
diff --git a/mysql-test/lib/My/Config.pm b/mysql-test/lib/My/Config.pm
index ecc0830c3df..c88b1170a80 100644
--- a/mysql-test/lib/My/Config.pm
+++ b/mysql-test/lib/My/Config.pm
@@ -338,6 +338,13 @@ sub new {
# Skip comment
next;
}
+ # Correctly process Replication Filter when they are defined
+ # with connection name.
+ elsif ( $line =~ /^([\w]+.[\w]+)\s*=\s*(.*)\s*/){
+ my $option= $1;
+ my $value= $2;
+ $self->insert($group_name, $option, $value);
+ }
else {
croak "Unexpected line '$line' found in '$path'";
}
diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result
index fad874d7d64..d544c97e636 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -2752,6 +2752,25 @@ DROP USER dummy@localhost;
# End of 10.2 tests
#
#
+# Start of 10.3 tests
+#
+#
+# MDEV-19948 'show grants' return privileges individually
+#
+CREATE USER ten2;
+GRANT ALL ON *.* TO ten2;
+SHOW GRANTS FOR ten2;
+Grants for ten2@%
+GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
+FLUSH PRIVILEGES;
+SHOW GRANTS FOR ten2;
+Grants for ten2@%
+GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
+DROP USER ten2;
+#
+# End of 10.3 tests
+#
+#
# MDEV-17932 : Assertion upon double RENAME USER
#
CREATE USER foo@localhost;
diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test
index 8ae64c9ad4d..47a274d75d1 100644
--- a/mysql-test/main/grant.test
+++ b/mysql-test/main/grant.test
@@ -2248,6 +2248,35 @@ DROP USER dummy@localhost;
--echo #
--echo #
+--echo # Start of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-19948 'show grants' return privileges individually
+--echo #
+
+# Let's cheat server that we are using `10.2` user table
+# which doesn't have `Delete_history_priv` column
+
+source include/switch_to_mysql_user.inc;
+CREATE USER ten2;
+GRANT ALL ON *.* TO ten2;
+
+# Without any patching, this should show a lot of privileges,
+# but without delete history. With patch it is showing `all privileges`
+SHOW GRANTS FOR ten2;
+FLUSH PRIVILEGES;
+
+# Now should show `all privileges` with/without patch
+SHOW GRANTS FOR ten2;
+DROP USER ten2;
+source include/switch_to_mysql_global_priv.inc;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
+--echo #
--echo # MDEV-17932 : Assertion upon double RENAME USER
--echo #
CREATE USER foo@localhost;
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index c5630770eff..ff2631a738e 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -1,4 +1,4 @@
-Windows bug: happens when a new line is exactly at the right offset.
+Windows bug: new line disappears when it is exactly at the right offset.
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index 9e67764d765..b4747e68471 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -42,7 +42,7 @@ perl;
$re2=join('|', @plugins);
$skip=0;
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
- print "Windows bug: happens when a new line is exactly at the right offset.\n";
+ print "Windows bug: new line disappears when it is exactly at the right offset.\n";
while (<F>) {
next if 1../The following groups are read/;
# formatting, skip line consisting entirely of dashes and blanks
diff --git a/mysql-test/main/repair_symlink-5543.result b/mysql-test/main/repair_symlink-5543.result
index c77e7162a51..2024c9f5684 100644
--- a/mysql-test/main/repair_symlink-5543.result
+++ b/mysql-test/main/repair_symlink-5543.result
@@ -1,7 +1,7 @@
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
-# Some systems fail with errcode 40, when doing openat, while others
-# don't have openat and fail with errcode 20.
+# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
+# while others don't have openat and fail with errcode 20.
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error 20 for record at pos 0
diff --git a/mysql-test/main/repair_symlink-5543.test b/mysql-test/main/repair_symlink-5543.test
index 4c120334d05..ac7bb497f24 100644
--- a/mysql-test/main/repair_symlink-5543.test
+++ b/mysql-test/main/repair_symlink-5543.test
@@ -9,9 +9,9 @@
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
---echo # Some systems fail with errcode 40, when doing openat, while others
---echo # don't have openat and fail with errcode 20.
---replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /40/20/ /".*"/"<errmsg>"/
+--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
+--echo # while others don't have openat and fail with errcode 20.
+--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t1;
drop table t1;
@@ -19,7 +19,7 @@ drop table t1;
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
---replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /40/20/ /".*"/"<errmsg>"/
+--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t2;
drop table t2;
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index b812334470b..62da6359e40 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -8307,6 +8307,20 @@ UNION
SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
+#
+# MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
+# Assertion `field_handlers == 0 || field_pos < field_count'
+#
+CREATE TABLE t1 (ct time);
+INSERT INTO t1 VALUES ('16:11:28');
+CREATE FUNCTION f1 () RETURNS varchar(100)
+BEGIN
+DECLARE xxx varchar(100);
+ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
+RETURN xxx;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+drop table t1;
#End of 10.1 tests
#
# MDEV-11081: CURSOR for query with GROUP BY
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 7f413c4f665..3e4b3418a2d 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -9823,6 +9823,26 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
+--echo #
+--echo # MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
+--echo # Assertion `field_handlers == 0 || field_pos < field_count'
+--echo #
+
+CREATE TABLE t1 (ct time);
+INSERT INTO t1 VALUES ('16:11:28');
+
+DELIMITER |;
+--error ER_SP_NO_RETSET
+CREATE FUNCTION f1 () RETURNS varchar(100)
+BEGIN
+DECLARE xxx varchar(100);
+ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
+RETURN xxx;
+END|
+
+DELIMITER ;|
+drop table t1;
+
--echo #End of 10.1 tests
--echo #
diff --git a/mysql-test/main/type_datetime.result b/mysql-test/main/type_datetime.result
index 64c523f26ce..0c33ddc3df1 100644
--- a/mysql-test/main/type_datetime.result
+++ b/mysql-test/main/type_datetime.result
@@ -1146,6 +1146,16 @@ a
00:01:00
DROP TABLE t1;
#
+# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
+#
+CREATE TABLE t1 (i INT, d DATETIME);
+INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
+SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
+ExtractValue('foo','bar') i MIN(d)
+ NULL 1981-09-24 01:04:47
+ 3 1976-12-14 13:21:07
+DROP TABLE t1;
+#
# End of 10.1 tests
#
#
diff --git a/mysql-test/main/type_datetime.test b/mysql-test/main/type_datetime.test
index 7bd7883f469..cecdda593d0 100644
--- a/mysql-test/main/type_datetime.test
+++ b/mysql-test/main/type_datetime.test
@@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
+--echo #
+
+CREATE TABLE t1 (i INT, d DATETIME);
+INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
+SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
+DROP TABLE t1;
+
--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 40ac09cac96..51f5617244c 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -1008,6 +1008,8 @@ sub run_test_server ($$$) {
next if (defined $t->{reserved} and $t->{reserved} != $wid);
if (! defined $t->{reserved})
{
+ # Force-restart not relevant when comparing *next* test
+ $t->{criteria} =~ s/force-restart$/no-restart/;
my $criteria= $t->{criteria};
# Reserve similar tests for this worker, but not too many
my $maxres= (@$tests - $i) / $opt_parallel + 1;
@@ -2046,7 +2048,10 @@ sub collect_mysqld_features {
if (/Copyright/ .. /^-{30,}/) {
# here we want to detect all not mandatory plugins
# they are listed in the --help output as
- # --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON, OFF, FORCE (don't start if the plugin fails to load).
+ # --archive[=name]
+ # Enable or disable ARCHIVE plugin. Possible values are ON, OFF,
+ # FORCE (don't start if the plugin fails to load),
+ # FORCE_PLUS_PERMANENT (like FORCE, but the plugin can not be uninstalled).
push @optional_plugins, $1
if /^ --([-a-z0-9]+)\[=name\] +Enable or disable \w+ plugin. One of: ON, OFF, FORCE/;
next;
@@ -3899,6 +3904,25 @@ sub find_analyze_request
return $analyze;
}
+# The test can leave a file in var/tmp/ to signal
+# that all servers should be restarted
+sub restart_forced_by_test($)
+{
+ my $file = shift;
+ my $restart = 0;
+ foreach my $mysqld ( mysqlds() )
+ {
+ my $datadir = $mysqld->value('datadir');
+ my $force_restart_file = "$datadir/mtr/$file";
+ if ( -f $force_restart_file )
+ {
+ mtr_verbose("Restart of servers forced by test");
+ $restart = 1;
+ last;
+ }
+ }
+ return $restart;
+}
# Return timezone value of tinfo or default value
sub timezone {
@@ -4259,8 +4283,12 @@ sub run_testcase ($$) {
if ( $res == 0 )
{
my $check_res;
- if ( $opt_check_testcases and
- $check_res= check_testcase($tinfo, "after"))
+ if ( restart_forced_by_test('force_restart') )
+ {
+ stop_all_servers($opt_shutdown_timeout);
+ }
+ elsif ( $opt_check_testcases and
+ $check_res= check_testcase($tinfo, "after"))
{
if ($check_res == 1) {
# Test case had sideeffects, not fatal error, just continue
@@ -4295,7 +4323,8 @@ sub run_testcase ($$) {
find_testcase_skipped_reason($tinfo);
mtr_report_test_skipped($tinfo);
# Restart if skipped due to missing perl, it may have had side effects
- if ( $tinfo->{'comment'} =~ /^perl not found/ )
+ if ( restart_forced_by_test('force_restart_if_skipped') ||
+ $tinfo->{'comment'} =~ /^perl not found/ )
{
stop_all_servers($opt_shutdown_timeout);
}
@@ -5447,6 +5476,11 @@ sub server_need_restart {
return 0;
}
+ if ( $tinfo->{'force_restart'} ) {
+ mtr_verbose_restart($server, "forced in .opt file");
+ return 1;
+ }
+
if ( $opt_force_restart ) {
mtr_verbose_restart($server, "forced restart turned on");
return 1;
@@ -6541,6 +6575,7 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, don't wait for servers
to shutdown etc.
+ force-restart Always restart servers between tests
parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
diff --git a/mysql-test/std_data/galera-cert.pem b/mysql-test/std_data/galera-cert.pem
new file mode 100644
index 00000000000..2996b330cc0
--- /dev/null
+++ b/mysql-test/std_data/galera-cert.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
+BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
+Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
+CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
+ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
+MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
+B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
+kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
+mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
+Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
+wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
+HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
+jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
+bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
+wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
+oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
+yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
+-----END CERTIFICATE-----
+-----BEGIN DH PARAMETERS-----
+MIGHAoGBAJWyvKjE+s7OP4Lj1jXKGlJGWT4Vd5YaxPljihTsRe1aXkWAgsuwISXk
+/TQ8Rx5Zmze7rtwtU0PoYxvuam9FMXYqhw2dVe4qRdeSX78DSiL/YBkQzaxlfWVy
+RE9+9dzHbCtRVDlN7K1kA+mGWH4/r7NAu4Qm/003V0NTtMwQSqebAgEC
+-----END DH PARAMETERS-----
+
diff --git a/mysql-test/std_data/galera-key.pem b/mysql-test/std_data/galera-key.pem
new file mode 100644
index 00000000000..c88c613cacf
--- /dev/null
+++ b/mysql-test/std_data/galera-key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDDzU6xLZDD5rZE
+NsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2QaMyTkvyjzf7bSFsDt
+9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BWB3lcoKXXJgMnWw0W
+Grt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5kdcIbDRVw81J4eAZ
+6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrMmhOeL8kuQV0fI8v2
+xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWXQo98swTu7mb89qVY
+mR71d3L3AgMBAAECggEBAIMT0UdZSp1quL/nrYqNGa9kuSuDz4uCM3+3jNcGZVU4
+vCYHxpmINLi0UK8W5ROJA3zC4AZKjDgOlW93NXK5iKyyiUTIN3hiJi4jiVDuGbh2
+DZtH7mmAKAU1zCx2y2osLLmurfbe8qOJF7ShhrZfgWsHFujFhhUdU92dsTkhZ7EU
+2NF8ScxCo4PbOJoHC3j0ApfwCMxUMAKZF5+08EeKYqK7OAXI79HeIvEbHn3cUDGm
+bvg6ykwlz2UUO4sg+xdCmn1Bt36HF/4e973Y5fkE/vd9mryHIlu9t7GJgWyUiPr8
+BGEoAWDSpPOMd/b9ivtxh9Gd+LW/uitMuBIfrRPgz9kCgYEA+JqeeD2xqF2IzZyq
+i1UqgKe3su2U2zhkgbu1h/1M/reNIZGylF0wFs3P+kNIB2NavmHjXcgSjdJzqRL9
+XEWfFJRmeARo9RTEQEVd8zp1Eo8ISeiksGgvbL4rrNIRR5V5MZytfISRiGCWN6jx
+ulJ6EieQk5EcvknGlWpJY/bBsQ0CgYEAyaCLqrR38gVl2Z0t6YlhW/HWAwGt+lf4
+apN1AS4uykx7wRW2B0y9QUDfsrYeVlbbeRPP4UzPmJez+J2cweoIIeFFyo3KP2L7
+79E3EVYywjXhPg52F7OjFA4Bp970XclIC5Al7kDufSgwZmWdceSx4Jjc5ixyQEC8
+Ad0ThgP6yxMCgYAvC4OFmZcvF1Q2JLmZWGqMojB/KbqLqaZLbqwxqduSMEYC3kF/
+FgttpVEAOQ8+ZqzbbkbKjnwEXpkIm9FaTsqF6HdjquH5zw48Y2QeDSfudSbKZb4U
+rAKdf3dgYvhmJYEjxFSIRcYMmsqSieQEsGrtWJNheYqI8AkmaVCuHBoXWQKBgQCj
+daelNffD2wJuQNI28axfiRjSiSsNuQHpDTCfS1ydnxH5QGu5UUphO4HfdWv03SfC
+6f/vDIGEmQBLvyOVxfDf3qzhAMCFUO8kxj1ZrcMq1dmMoNa2cmj0WkKXYNZFrmfd
+D/jgRf3Ss6FBcoIJErnudp8nb8MUOibxb9RjIpjQxwKBgEliKaGN+/QkPTNJ4vXz
+609CIilxpE+YVTzlv3YeZP5HqsJTJPS2ARIUr/Pjpbl3LHfYNeeGDCwgkJIK0JJH
+iA1M51q6t3zG2y9gKmC15FF0jShoZkRgqBxqrSHAnrCo5t2C48ElxJ3FEU8T75sz
+dlGTbkmR0Wm43Kh++dWICJ3g
+-----END PRIVATE KEY-----
diff --git a/mysql-test/std_data/galera-upgrade-ca-cert.pem b/mysql-test/std_data/galera-upgrade-ca-cert.pem
new file mode 100644
index 00000000000..13d27e84bb3
--- /dev/null
+++ b/mysql-test/std_data/galera-upgrade-ca-cert.pem
@@ -0,0 +1,40 @@
+-----BEGIN CERTIFICATE-----
+MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
+BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
+Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
+CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
+ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
+MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
+B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
+kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
+mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
+Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
+wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
+HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
+jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
+bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
+wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
+oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
+yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
+BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
+Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
+CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
+dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
+1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
+fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
+nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
+ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
+8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
+biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
+mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
+BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
+PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
+8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
+KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
+zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
+25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera-upgrade-server-cert.pem b/mysql-test/std_data/galera-upgrade-server-cert.pem
new file mode 100644
index 00000000000..3af8b1ae7dd
--- /dev/null
+++ b/mysql-test/std_data/galera-upgrade-server-cert.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
+BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
+Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
+CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
+dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
+1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
+fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
+nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
+ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
+8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
+biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
+mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
+BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
+PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
+8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
+KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
+zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
+25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
+-----END CERTIFICATE-----
diff --git a/mysql-test/std_data/galera-upgrade-server-key.pem b/mysql-test/std_data/galera-upgrade-server-key.pem
new file mode 100644
index 00000000000..d243c9e0381
--- /dev/null
+++ b/mysql-test/std_data/galera-upgrade-server-key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDUOVzO0jNKeAZ5
+NQWJuP0Znhk7vwBKmBjJJm/8NEhWf/eFsXjVlEP/q4mVvmt/VHt+kWy6ttc0MPF5
+qntv8bPZdJDL3oNubRJuwVJm21X9HZa2VPVZ/mf2LHpEuqEpJuCc/IvZ+wNrG1mH
+a7LAYkReHBcW13Hd14ij+1iK8N+XlNyy/Q2dljxWDRugFE/4USdF4k51Jrksuf5A
+k3Zdr7C61ssd7SEjqG4pRdTZhR4F+DKTWdaiXnbjVlQMKAOyhpbyvZh4k0eY0id3
+fARFuoWAUexHg3X4C1zKt+f+5BKP3OtM878+nnUqmNZ/+CPGNc9uK7kN7nSpnj5T
+iejbQQg7AgMBAAECggEBAJ4m7VG3db+uOGzFJY5fzEX1+qn6ibYNKJNmUJfrQmkr
+zgLUoc7QQehbJhnwoN1v0OQebZ+rOC7NtnZLpNdkkPmhk3JKLTnykIT3DnhWRftt
+vG2+XGUnYMQkmy1ywz0Omt6CmZnlJMQByrNPgBM8Z+SWHGLKRTHkOBCz82T/YjDr
+wqug1Yv6W0wMNM/cikgoBldVG7hABCJuShjffIbUgVysK3dEPNywNAC78neoGECm
+evPZOaIkWEr86SpAlwA6Yh+zTQZ03CXATcGonJdWJ015DvlKRv6QyRR0Q/Y1ONwb
+f115kll15MJBEspFdSyhlMcVJlwO8WMaZ2qIzlQZmdECgYEA//P469QzX00L/urK
+7IRvtSVu5CP/A/Wui90U4KoP7XgXIeExnEtzLVs1K7vjuzdpTyq+68XuC40gPcJW
+RvoX229m6gRV8nC53UiV71jM8IvkyEqFYT/gfZC9KQCMSRJLtVnDMpZ3gMxAY6/5
+p20o616Au8DKFFetQV0aD4Hj1/MCgYEA1ENV1WkgvN6yItB77E9kN/vbKLRh0hrg
+9xj0SmMXGYyDM9NpjbgbgJIZo3ukkBtp3kEY8P9JQZRcd1EcnnSrwTB7ChdInWkR
+m/LpIZBEMqNQbeu4QSzZYYS6z4tcGGx43aHqzzNBZdnQnqhYL1CvlLwhkgX6oQCo
+woXqyfMNKJkCgYEA63gD1NGPwWkcVBSlQxpDup8JeZE0Fux6++kUP+u0Y39LqLuH
+7IXtHBkAvY9JXv8HPvHQWw/og2/97VNQFFQYhqPiRgBfIX9bPpx8c4l6YQISI8GL
+G4CsglgZ7hK2/LJ8PAascWnD3xYJVqyaPNFMB90VCaW/Qx+2IKAKTaHtfskCgYBu
+1f5C4pMqrCpeTXj4Cvis1wE4PwB5QnnH7SrakOVl/N4huLn8O2948lEa8Zwbd4UP
+ffR1Gwh4iuzBjQQhpZBt30/QFBphv5RnVy7uzLMfsfF0hEqBFdcoubMGXqGnSzTN
+nhfLO9thQJxTzFnH0xzr0FTDOAYH/h0g/eZ8r0JmuQKBgQDjhXM+hJ3Pkwua+Fnl
+nZfY5MeSzkJki/9iwVo8rSDwmZS9Nsc83oZnddM7c2x63t+zYOAcMxsVCiByMDzo
+5IB781HWRBGcU8TnW1b0bAnZimjKp/qsZ/Szr38rvImqG8TjzbcSD7w0SpyRQ/Ot
+A7SZFkWYfem8/q/VImjU/CNbOQ==
+-----END PRIVATE KEY-----
diff --git a/mysql-test/suite/binlog/include/drop_temp_table.test b/mysql-test/suite/binlog/include/drop_temp_table.test
index c852ee4c8a0..4241974d813 100644
--- a/mysql-test/suite/binlog/include/drop_temp_table.test
+++ b/mysql-test/suite/binlog/include/drop_temp_table.test
@@ -14,12 +14,8 @@ CREATE TEMPORARY TABLE `table:name` (a INT);
CREATE TEMPORARY TABLE shortn2 (a INT);
##############################################################################
-# BUG#46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior
-# in ROW mode
-#
-# In RBR, 'DROP TEMPORARY TABLE ...' statement should never be binlogged no
-# matter if the tables exist or not. In contrast, both in SBR and MBR, the
-# statement should be always binlogged no matter if the tables exist or not.
+# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written
+# to binlog only if the corresponding temporary table exists.
##############################################################################
CREATE TEMPORARY TABLE tmp(c1 int);
CREATE TEMPORARY TABLE tmp1(c1 int);
@@ -30,12 +26,12 @@ CREATE TABLE t(c1 int);
DROP TEMPORARY TABLE IF EXISTS tmp;
--disable_warnings
-# Before fixing BUG#46572, 'DROP TEMPORARY TABLE IF EXISTS...' statement was
-# binlogged when the table did not exist in RBR.
+# Post MDEV-20091: Following DROP TEMPORARY TABLE statement should not be
+# logged as the table is already dropped above.
DROP TEMPORARY TABLE IF EXISTS tmp;
-# In RBR, 'DROP TEMPORARY TABLE ...' statement is never binlogged no matter if
-# the tables exist or not.
+# Post MDEV-20091: Only DROP TEMPORARY TABLE statement should be written only
+# for 'tmp1' table.
DROP TEMPORARY TABLE IF EXISTS tmp, tmp1;
DROP TEMPORARY TABLE tmp3;
@@ -79,6 +75,12 @@ DROP DATABASE `drop-temp+table-test`;
# if there are open temporary tables. As such the implicit drop
# for temporary tables on session closing must be logged.
#
+# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written to
+# binlog only if the corresponding temporary table exists. In row based
+# replication temporary tables are not replicated hence their corresponding
+# DROP TEMPORARY TABLE statement will be not be written to binary log upon
+# session closure.
+#
RESET MASTER;
@@ -92,8 +94,10 @@ SELECT @@session.binlog_format;
--disconnect con1
-- connection default
+if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) {
--let $wait_binlog_event= DROP
--source include/wait_for_binlog_event.inc
+}
-- source include/show_binlog_events.inc
RESET MASTER;
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_stop_never.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_stop_never.result
new file mode 100644
index 00000000000..e94f17b9489
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_stop_never.result
@@ -0,0 +1,16 @@
+RESET MASTER;
+include/stop_dump_threads.inc
+# Step-1: Execute some dummy statements.
+CREATE TABLE t1(i int);
+INSERT INTO t1 values (1);
+# Step-2: Disable binary log temporarily and drop the table 't1'.
+set @@SESSION.SQL_LOG_BIN = 0;
+DROP TABLE t1;
+set @@SESSION.SQL_LOG_BIN = 1;
+# Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
+# Step-4: Wait till dump thread transfer is completed.
+# Step-5: Check that the data is there.
+# Step-6: Cleanup
+# kill the dump thread serving the mysqlbinlog --stop-never process
+include/stop_dump_threads.inc
+DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result
index d63538e5318..c4a1ba9b83b 100644
--- a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result
+++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result
@@ -105,6 +105,4 @@ BEGIN
# server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number #
# server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F
COMMIT/*!*/;
-# server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl
-DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t5`
DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
index 4b35170b2db..831a1c8a9a3 100644
--- a/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
+++ b/mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result
@@ -35,15 +35,9 @@ master-bin.000001 # Query # # CREATE DATABASE `drop-temp+table-test`
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `t` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `tmp2`,`t` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1`
DROP DATABASE `drop-temp+table-test`;
RESET MASTER;
CREATE TABLE t1 ( i text );
@@ -65,7 +59,5 @@ master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES ('1')
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
RESET MASTER;
DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
index 0bff58fda2a..88d1f7dd42e 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
@@ -348,8 +348,6 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1`,`ti`
do release_lock("lock1");
drop table t0,t2;
set autocommit=0;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
index 8340420f5ad..4bca7cbe298 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result
@@ -51,12 +51,8 @@ master-bin.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TEMPORARY TABLE `tmp3` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp2` /* generated by server */
diff --git a/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test
new file mode 100644
index 00000000000..d73e453ce96
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_mysqlbinlog_stop_never.test
@@ -0,0 +1,66 @@
+# ==== Purpose ====
+#
+# Test verifies that continuous streaming of binary log content using the
+# "mysqlbinlog --stop-never" option and sourcing it to mysql client works
+# fine.
+#
+# ==== Implementation ====
+#
+# Steps:
+# 1 - Create a table on a server on which binary log is enabled and insert
+# a row.
+# 2 - Disable the binary log on the server and drop the table.
+# 3 - Capture the binary log output using "mysqlbinlog --stop_never" option
+# and source it to mysql client.
+# 4 - Query the PROCESSLIST table to ensure that the dump thread which is
+# serving "stop_never" option has read entire binlog.
+# 5 - Verify that the table is populated on the server.
+# 6 - Cleanup.
+#
+# ==== References ====
+#
+# MDEV-11154: Write_on_release_cache(log_event.cc) function will not write
+# "COMMIT", if use "mysqlbinlog ... | mysql ..."
+
+--source include/not_windows.inc
+
+# Test is not specific to any binlog format. Hence Running only for 'row'.
+--source include/have_binlog_format_row.inc
+
+# binlog file name is needed in the test. To use master-bin.000001,
+# RESET MASTER is needed.
+RESET MASTER;
+# kill the dump threads if there any dump threads (may be from previous test)
+--source include/stop_dump_threads.inc
+
+--echo # Step-1: Execute some dummy statements.
+CREATE TABLE t1(i int);
+INSERT INTO t1 values (1);
+
+--echo # Step-2: Disable binary log temporarily and drop the table 't1'.
+set @@SESSION.SQL_LOG_BIN = 0;
+DROP TABLE t1;
+set @@SESSION.SQL_LOG_BIN = 1;
+
+--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
+--write_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
+(`$MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT`) < /dev/null > /dev/null 2>&1 &
+EOF
+--exec /bin/bash $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
+
+--echo # Step-4: Wait till dump thread transfer is completed.
+let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
+--source include/wait_condition.inc
+
+--echo # Step-5: Check that the data is there.
+let $count= 1;
+let $table= test.t1;
+source include/wait_until_rows_count.inc;
+
+--echo # Step-6: Cleanup
+--echo # kill the dump thread serving the mysqlbinlog --stop-never process
+--source include/stop_dump_threads.inc
+
+DROP TABLE t1;
+--remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
+
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index fe33f035516..c141d41ed35 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -10,35 +10,30 @@
#
##############################################################################
-GAL-419 : MDEV-13549 Galera test failures
+MW-286 : MDEV-19992 Galera test failure on MW-286
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
-MW-329 : wsrep_local_replays not stable
-MW-336 : MDEV-13549 incorrect wait_condition for wsrep_slave_threads changes
+MW-329 : MDEV-19962 Galera test failure on MW-329
MW-360 : needs rewrite to be MariaDB gtid compatible
-MW-336 : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388
-MW-416 : MDEV-13549 Galera test failures
-MW-44 : MDEV-15809 Test failure on galera.MW-44
galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
-galera_autoinc_sst_mariabackup : MDEV-18177 Galera test failure on galera_autoinc_sst_mariabackup
+galera_autoinc_sst_mariabackup : MDEV-19926 Galera SST tests fail
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
+galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_flush : MariaDB does not have global.thread_statistics
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_ist_mariabackup : MDEV-18829 test leaves port open
-galera_ist_progress: MDEV-15236 fails when trying to read transfer status
-galera_kill_applier : race condition at the start of the test
-galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
+galera_ist_progress : MDEV-15236 fails when trying to read transfer status
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
@@ -51,9 +46,7 @@ galera_var_node_address : MDEV-17151 Galera test failure
galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_var_reject_queries : assertion in inline_mysql_socket_send
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
-galera_var_slave_threads : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
+galera_sst_mariabackup_encrypt_with_key : MDEV-19926 Galera SST tests fail
galera_wan : MDEV-17259: Test failure on galera.galera_wan
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
-partition : MDEV-13549 regularly showing auto_increment mismatch
-pxc-421: Lock timeout exceeded
-query_cache : MDEV-18137: Galera test failure on query_cache
+partition : MDEV-19958 Galera test failure on galera.partition
diff --git a/mysql-test/suite/galera/r/GAL-419.result b/mysql-test/suite/galera/r/GAL-419.result
index 410c91b4f98..74508a1e75e 100644
--- a/mysql-test/suite/galera/r/GAL-419.result
+++ b/mysql-test/suite/galera/r/GAL-419.result
@@ -1,4 +1,12 @@
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*");
+call mtr.add_suppression("Aborting");
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
+connection node_1;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
+connection node_1;
+connection node_2;
diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result
index 334ff9f80fb..54d55eea7ca 100644
--- a/mysql-test/suite/galera/r/MW-329.result
+++ b/mysql-test/suite/galera/r/MW-329.result
@@ -1,3 +1,5 @@
+connection node_2;
+connection node_1;
CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
@@ -7,13 +9,11 @@ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
+SELECT SLEEP(0.1);
END WHILE;
END|
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
-CALL proc_insert();;
-wsrep_local_replays
-1
connection node_1;
connection node_1b;
connection node_1;
diff --git a/mysql-test/suite/galera/r/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index 4470cca51fb..2d0ebdc95b0 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -1,41 +1,53 @@
connection node_2;
connection node_1;
-CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-INSERT INTO t1 values(0);
connection node_1;
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
+# Set slave threads to 10 step 1
SET GLOBAL wsrep_slave_threads = 1;
-# Wait 10 slave threads to start 1
connection node_2;
-SET SESSION wsrep_sync_wait=15;
-# Generate 100 replication events
+INSERT INTO t1 VALUES (1);
connection node_1;
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
COUNT(*)
-101
-# Wait 9 slave threads to exit 1
+1
SET GLOBAL wsrep_slave_threads = 10;
-# Wait 10 slave threads to start 2
+# Set slave threads to 10 step 2
SET GLOBAL wsrep_slave_threads = 20;
-# Wait 20 slave threads to start 3
+# Set slave threads to 20
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
-# Generate 100 replication events
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
connection node_1;
+SET GLOBAL wsrep_slave_threads = 10;
SELECT COUNT(*) FROM t1;
COUNT(*)
-201
-# Wait 10 slave threads to exit 3
-SET GLOBAL wsrep_slave_threads = 10;
-SET GLOBAL wsrep_slave_threads = 1;
-# Wait 10 slave threads to start 3
+11
+# Set slave threads to 10 step 3
connection node_2;
-# Generate 100 replication events
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+INSERT INTO t1 VALUES (16);
+INSERT INTO t1 VALUES (17);
+INSERT INTO t1 VALUES (18);
+INSERT INTO t1 VALUES (19);
+INSERT INTO t1 VALUES (20);
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
-301
-# Wait 10 slave threads to exit 4
-connection node_1;
+21
+SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result
index 537e648df6b..68406c4dcf4 100644
--- a/mysql-test/suite/galera/r/MW-416.result
+++ b/mysql-test/suite/galera/r/MW-416.result
@@ -1,8 +1,9 @@
+connection node_2;
+connection node_1;
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
-SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
-Variable_name Value
-wsrep_replicated 2
+connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1;
+connection userMW416;
ALTER DATABASE db CHARACTER SET = utf8;
ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db'
ALTER EVENT ev1 RENAME TO ev2;
@@ -101,6 +102,7 @@ INSTALL PLUGIN plg SONAME 'plg.so';
Got one of the listed errors
UNINSTALL PLUGIN plg;
Got one of the listed errors
+connection node_1;
DROP USER 'userMW416'@'localhost';
SHOW DATABASES;
Database
@@ -109,5 +111,3 @@ mtr
mysql
performance_schema
test
-wsrep_replicated_after_diff
-1
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid.result b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
index 180b72bf729..3f4137a3b28 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_gtid.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid.result
@@ -24,3 +24,14 @@ connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
+#cleanup
+connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_2;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_3;
+reset master;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
index fc10cc01a45..aba5a098b69 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_gtid_replicate_do_db_cc.result
@@ -1,7 +1,13 @@
-RESET MASTER;
+connection node_2;
+connection node_1;
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
+connection node_3;
+RESET MASTER;
+connection node_2;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_kill_applier.result b/mysql-test/suite/galera/r/galera_kill_applier.result
index 6fa632c242f..25600744d73 100644
--- a/mysql-test/suite/galera/r/galera_kill_applier.result
+++ b/mysql-test/suite/galera/r/galera_kill_applier.result
@@ -1,5 +1,20 @@
+connection node_2;
connection node_1;
+connection node_2;
+SET GLOBAL wsrep_slave_threads=2;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
+SET GLOBAL wsrep_slave_threads=1;
+connection node_1;
+create table t1(a int not null primary key) engine=innodb;
+insert into t1 values (1);
+insert into t1 values (2);
+connection node_2;
+set global wsrep_sync_wait=15;
+select count(*) from t1;
+count(*)
+2
+connection node_1;
+drop table t1;
diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result
index 9d66140465c..33a1b19095f 100644
--- a/mysql-test/suite/galera/r/galera_kill_ddl.result
+++ b/mysql-test/suite/galera/r/galera_kill_ddl.result
@@ -1,17 +1,19 @@
connection node_2;
connection node_1;
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
connection node_1;
+connection node_2;
+connection node_1;
+call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
Killing server ...
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
connection node_2a;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
-COUNT(*) = 2
-1
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+COUNT(*)
+2
connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_log_bin.result b/mysql-test/suite/galera/r/galera_log_bin.result
index 12e5e59a426..57bc2c9e2ae 100644
--- a/mysql-test/suite/galera/r/galera_log_bin.result
+++ b/mysql-test/suite/galera/r/galera_log_bin.result
@@ -1,5 +1,13 @@
connection node_2;
connection node_1;
+connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_2;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
@@ -14,60 +22,64 @@ COUNT(*) = 2
1
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-FLUSH LOGS;
-SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
-mysqld-bin.000002 # Gtid # # GTID 0-1-1
-mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
-mysqld-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (1)
-mysqld-bin.000002 # Table_map # # table_id: # (test.t1)
-mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000002 # Gtid # # GTID 0-1-3
-mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
-mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
-mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
-mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
-mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
-mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000002 # Gtid # # GTID 0-1-6
-mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
connection node_2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
-SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
-mysqld-bin.000003 # Gtid # # GTID 0-1-1
-mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
-mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
-mysqld-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (1)
-mysqld-bin.000003 # Table_map # # table_id: # (test.t1)
-mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000003 # Gtid # # GTID 0-1-3
-mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
-mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
-mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
-mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
-mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
-mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
-mysqld-bin.000003 # Gtid # # GTID 0-1-6
-mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
+mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
+mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
+mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+mysqld-bin.000001 # Xid # # COMMIT /* XID */
+mysqld-bin.000001 # Gtid # # GTID #-#-#
+mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
+#cleanup
connection node_1;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
+connection node_2;
+SET GLOBAL wsrep_on=OFF;
+reset master;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/r/galera_log_output_csv.result b/mysql-test/suite/galera/r/galera_log_output_csv.result
index efe8c73c986..06b0838d976 100644
--- a/mysql-test/suite/galera/r/galera_log_output_csv.result
+++ b/mysql-test/suite/galera/r/galera_log_output_csv.result
@@ -20,3 +20,5 @@ COUNT(*) = 1
1
connection node_1;
DROP TABLE t1;
+truncate table mysql.slow_log;
+truncate table mysql.general_log;
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
index 4a7db96dc22..aee525936d1 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key,debug.rdiff
@@ -1,11 +1,12 @@
---- r/galera_sst_mysqldump_with_key.result 2018-11-19 09:56:30.081976558 +0200
-+++ r/galera_sst_mysqldump_with_key.reject 2018-11-19 10:47:41.609299365 +0200
-@@ -183,6 +183,103 @@
+--- r/galera_sst_mysqldump_with_key.result 2019-07-04 09:39:54.993971174 +0300
++++ r/galera_sst_mysqldump_with_key.reject 2019-07-04 09:55:34.171175305 +0300
+@@ -204,6 +204,114 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
++connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
@@ -14,6 +15,7 @@
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
++connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
@@ -22,9 +24,12 @@
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
++connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
++connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
++connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
@@ -39,6 +44,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
++connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -46,7 +52,9 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
++connection node_2;
+Performing --wsrep-recover ...
++connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
@@ -57,6 +65,7 @@
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
++connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
@@ -71,6 +80,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
++connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
@@ -88,6 +98,7 @@
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
++connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
@@ -101,6 +112,6 @@
+COMMIT;
+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
+ connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
- CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
index 3de446fec32..de52ac2fd1d 100644
--- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
+++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result
@@ -205,17 +205,6 @@ DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
connection node_1;
-connection node_2;
-connection node_1;
-connection node_2;
-connection node_1;
-connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
-connection node_2;
-connection node_2;
-connection node_1;
-connection node_1a_galera_st_kill_slave_ddl;
-connection node_1;
-connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
connection node_2;
diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result
index 4ec83a7f33f..793da3246ff 100644
--- a/mysql-test/suite/galera/r/galera_sync_wait_show.result
+++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result
@@ -49,8 +49,6 @@ tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE
DROP TABLE t1;
connection node_1;
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
-Warnings:
-Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection node_2;
SHOW CREATE EVENT event1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
index 0ecc4a4619f..6e55c59ad15 100644
--- a/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
+++ b/mysql-test/suite/galera/r/galera_toi_ddl_fk_insert.result
@@ -1,11 +1,10 @@
connection node_2;
connection node_1;
-CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
id INT PRIMARY KEY AUTO_INCREMENT,
-f2 INTEGER,
-KEY (id)
+f2 INTEGER
) ENGINE=InnoDB;
CREATE TABLE child (
id INT PRIMARY KEY AUTO_INCREMENT,
@@ -25,19 +24,21 @@ connection node_1b;
connection node_2;
connection node_2a;
connection node_1;
-SELECT COUNT(*) = 20001 FROM parent;
-COUNT(*) = 20001
-1
-SELECT COUNT(*) = 10000 FROM child;
-COUNT(*) = 10000
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) FROM parent;
+COUNT(*)
+20001
+SELECT COUNT(*) FROM child;
+COUNT(*)
+10000
connection node_2;
-SELECT COUNT(*) = 20001 FROM parent;
-COUNT(*) = 20001
-1
-SELECT COUNT(*) = 10000 FROM child;
-COUNT(*) = 10000
-1
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) FROM parent;
+COUNT(*)
+20001
+SELECT COUNT(*) FROM child;
+COUNT(*)
+10000
DROP TABLE child;
DROP TABLE parent;
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
index d2faf5ff463..3a23f0c8122 100644
--- a/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
+++ b/mysql-test/suite/galera/r/galera_var_gtid_domain_id.result
@@ -80,6 +80,15 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
+#cleanup
+connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_2;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_var_notify_cmd.result b/mysql-test/suite/galera/r/galera_var_notify_cmd.result
index bcd9875743a..3f0dd57aa3b 100644
--- a/mysql-test/suite/galera/r/galera_var_notify_cmd.result
+++ b/mysql-test/suite/galera/r/galera_var_notify_cmd.result
@@ -8,4 +8,3 @@ MAX(size) = 2
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
COUNT(DISTINCT idx) = 2
1
-DROP SCHEMA mtr_wsrep_notify;
diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result
index 168b45154b8..36dc79bdf82 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -17,67 +17,44 @@ SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
-COUNT(*)
-3
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
-SET GLOBAL wsrep_slave_threads = 64;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*)
-1
+SET GLOBAL wsrep_slave_threads = 64;
SET GLOBAL wsrep_slave_threads = 1;
connection node_1;
connection node_2;
SELECT COUNT(*) FROM t2;
COUNT(*)
-64
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-COUNT(*)
-1
-SET GLOBAL wsrep_slave_threads = 5;
+70
SET GLOBAL wsrep_slave_threads = 1;
-connection node_2;
-Shutting down server ...
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
+#
connection node_1;
-show status like 'wsrep_cluster_size';
-Variable_name Value
-wsrep_cluster_size 1
-SET GLOBAL wsrep_slave_threads = 6;
-SET GLOBAL wsrep_slave_threads = 1;
-SET GLOBAL wsrep_cluster_address='';
-SET GLOBAL wsrep_cluster_address='gcomm://';
-SET GLOBAL wsrep_slave_threads = 10;
+CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
connection node_2;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
-COUNT(*)
-3
-connection node_1;
+SET GLOBAL wsrep_slave_threads = 4;
SET GLOBAL wsrep_slave_threads = 1;
-connection node_2;
-SET GLOBAL wsrep_slave_threads = 1;
-connection node_1;
-connection node_2;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1
-SELECT COUNT(*) FROM t2;
-COUNT(*)
-192
connection node_1;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-1
-SELECT COUNT(*) FROM t2;
-COUNT(*)
-192
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
-DROP TABLE t2;
+connection node_2;
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
+NAME
# End of tests
diff --git a/mysql-test/suite/galera/r/mdev_10518.result b/mysql-test/suite/galera/r/mdev_10518.result
index 252aa244f77..b07f5303586 100644
--- a/mysql-test/suite/galera/r/mdev_10518.result
+++ b/mysql-test/suite/galera/r/mdev_10518.result
@@ -80,6 +80,15 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
+#cleanup
+connection node_1;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+connection node_2;
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/t/GAL-419.test b/mysql-test/suite/galera/t/GAL-419.test
index 07abcbcc47b..d304b01ed5e 100644
--- a/mysql-test/suite/galera/t/GAL-419.test
+++ b/mysql-test/suite/galera/t/GAL-419.test
@@ -5,11 +5,14 @@
--source include/galera_cluster.inc
--source include/big_test.inc
---connection node_1
+call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*");
+call mtr.add_suppression("Aborting");
+
+--connection node_2
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
---connection node_2
+--connection node_1
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test
index 78755fc3b42..904fc2f95d8 100644
--- a/mysql-test/suite/galera/t/MW-329.test
+++ b/mysql-test/suite/galera/t/MW-329.test
@@ -22,6 +22,7 @@ BEGIN
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
+ SELECT SLEEP(0.1);
END WHILE;
END|
DELIMITER ;|
@@ -29,6 +30,8 @@ DELIMITER ;|
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1b
--let $connection_id = `SELECT CONNECTION_ID()`
+--disable_query_log
+--disable_result_log
--send CALL proc_insert();
#
@@ -88,6 +91,8 @@ while ($count)
--connection node_1b
--error 0,2013,1317
--reap
+--enable_query_log
+--enable_result_log
--connection node_1
DROP PROCEDURE proc_insert;
diff --git a/mysql-test/suite/galera/t/MW-336.cnf b/mysql-test/suite/galera/t/MW-336.cnf
new file mode 100644
index 00000000000..e68f891792c
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-336.cnf
@@ -0,0 +1,7 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep-debug=SERVER
+
+[mysqld.2]
+wsrep-debug=SERVER
diff --git a/mysql-test/suite/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
index 6f778722831..b6df78ac7a6 100644
--- a/mysql-test/suite/galera/t/MW-336.test
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -4,110 +4,77 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
-
-CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
-INSERT INTO t1 values(0);
+--source include/force_restart.inc
--connection node_1
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
-SET GLOBAL wsrep_slave_threads = 1;
---echo # Wait 10 slave threads to start 1
---let $wait_timeout=600
---let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
+# ensure that the threads have actually started running
+--echo # Set slave threads to 10 step 1
+--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
-SET SESSION wsrep_sync_wait=15;
-# Wait until inserts are replicated
---let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
---source include/wait_condition.inc
---echo # Generate 100 replication events
---disable_query_log
---disable_result_log
---let $count = 100
-while ($count)
-{
- INSERT INTO t1 VALUES (1);
- --dec $count
-}
---enable_result_log
---enable_query_log
+INSERT INTO t1 VALUES (1);
--connection node_1
SET SESSION wsrep_sync_wait=15;
-
SELECT COUNT(*) FROM t1;
---echo # Wait 9 slave threads to exit 1
-# Wait until appliers exit
---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
-
SET GLOBAL wsrep_slave_threads = 10;
---echo # Wait 10 slave threads to start 2
---let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
+--echo # Set slave threads to 10 step 2
+--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
SET GLOBAL wsrep_slave_threads = 20;
---echo # Wait 20 slave threads to start 3
---let $wait_condition = SELECT COUNT(*) = 22 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
+--echo # Set slave threads to 20
+--let $wait_condition = SELECT COUNT(*) = 20 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 20 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
---echo # Generate 100 replication events
---disable_query_log
---disable_result_log
---let $count = 100
-while ($count)
-{
- INSERT INTO t1 VALUES (1);
- --dec $count
-}
---enable_query_log
---enable_result_log
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+INSERT INTO t1 VALUES (3);
+INSERT INTO t1 VALUES (4);
+INSERT INTO t1 VALUES (5);
+INSERT INTO t1 VALUES (6);
+INSERT INTO t1 VALUES (7);
+INSERT INTO t1 VALUES (8);
+INSERT INTO t1 VALUES (9);
+INSERT INTO t1 VALUES (10);
--connection node_1
-SELECT COUNT(*) FROM t1;
-
---echo # Wait 10 slave threads to exit 3
-# Wait until appliers exit
---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
-
SET GLOBAL wsrep_slave_threads = 10;
-SET GLOBAL wsrep_slave_threads = 1;
-
---echo # Wait 10 slave threads to start 3
---let $wait_timeout=600
---let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
+SELECT COUNT(*) FROM t1;
+--echo # Set slave threads to 10 step 3
+--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
--connection node_2
---echo # Generate 100 replication events
---disable_query_log
---disable_result_log
---let $count = 100
-while ($count)
-{
- INSERT INTO t1 VALUES (1);
- --dec $count
-}
---enable_result_log
---enable_query_log
+INSERT INTO t1 VALUES (11);
+INSERT INTO t1 VALUES (12);
+INSERT INTO t1 VALUES (13);
+INSERT INTO t1 VALUES (14);
+INSERT INTO t1 VALUES (15);
+INSERT INTO t1 VALUES (16);
+INSERT INTO t1 VALUES (17);
+INSERT INTO t1 VALUES (18);
+INSERT INTO t1 VALUES (19);
+INSERT INTO t1 VALUES (20);
--connection node_1
SELECT COUNT(*) FROM t1;
-
---echo # Wait 10 slave threads to exit 4
-# Wait until appliers exit
---let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
---source include/wait_condition.inc
-
---connection node_1
+SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test
index 48eada95cb8..f9a1b47e2ff 100644
--- a/mysql-test/suite/galera/t/MW-416.test
+++ b/mysql-test/suite/galera/t/MW-416.test
@@ -2,11 +2,10 @@
--source include/have_innodb.inc
--source include/wait_until_ready.inc
+
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
---let $wsrep_replicated_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
-
--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1
--connection userMW416
@@ -130,7 +129,4 @@ UNINSTALL PLUGIN plg;
--connection node_1
DROP USER 'userMW416'@'localhost';
SHOW DATABASES;
---let $wsrep_replicated_after = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
---disable_query_log
---eval SELECT $wsrep_replicated_after - $wsrep_replicated_before AS wsrep_replicated_after_diff
---enable_query_log
+
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid.test b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
index 3b0f191ad83..f5222b4322b 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid.test
@@ -70,3 +70,17 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
+
+--echo #cleanup
+--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
+--connection node_2
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
+--connection node_3
+reset master;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
index 1604016f3c3..27698121c0d 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_gtid_replicate_do_db_cc.test
@@ -18,9 +18,7 @@ SET GLOBAL wsrep_on=ON;
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
-SET global wsrep_on=OFF;
RESET MASTER;
-SET global wsrep_on=ON;
--connection node_2
SET global wsrep_on=OFF;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
index 31c0b9ca162..0d878db29b8 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
@@ -91,6 +91,5 @@ CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
-
--connection node_4
RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
index d3889a89016..817f4f82b43 100644
--- a/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
+++ b/mysql-test/suite/galera/t/galera_binlog_stmt_autoinc.test
@@ -66,6 +66,8 @@ show variables like 'binlog_format';
SET GLOBAL wsrep_auto_increment_control='OFF';
+let $increment_node1 = `SELECT @@session.auto_increment_increment`;
+let $offset_node1 = `SELECT @@session.auto_increment_offset`;
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index b66e0bcbbd0..4136bac5dc6 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -4,9 +4,16 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--source include/force_restart.inc
---connection node_1
---let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE IS NULL LIMIT 1`
+--connection node_2
+SET GLOBAL wsrep_slave_threads=2;
+
+--let $wait_condition = SELECT COUNT(*) >= 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 2 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1`
--disable_query_log
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
@@ -23,3 +30,17 @@
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
--enable_query_log
+
+SET GLOBAL wsrep_slave_threads=1;
+
+--connection node_1
+create table t1(a int not null primary key) engine=innodb;
+insert into t1 values (1);
+insert into t1 values (2);
+
+--connection node_2
+set global wsrep_sync_wait=15;
+select count(*) from t1;
+
+--connection node_1
+drop table t1;
diff --git a/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test
index ca59264ced4..1034b81eddf 100644
--- a/mysql-test/suite/galera/t/galera_kill_ddl.test
+++ b/mysql-test/suite/galera/t/galera_kill_ddl.test
@@ -5,16 +5,20 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
-call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
+call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
# Enable the master to continue running during the split-brain situation that
# occurs when the slave is killed
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
-CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
--source include/kill_galera.inc
@@ -36,7 +40,10 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
+
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
--connection node_1
--disable_query_log
diff --git a/mysql-test/suite/galera/t/galera_log_bin.test b/mysql-test/suite/galera/t/galera_log_bin.test
index 57df53e29b1..828869a7e0f 100644
--- a/mysql-test/suite/galera/t/galera_log_bin.test
+++ b/mysql-test/suite/galera/t/galera_log_bin.test
@@ -1,6 +1,15 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+--connection node_2
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
#
# Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used,
@@ -20,22 +29,23 @@ SELECT COUNT(*) = 2 FROM t2;
--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
-
-FLUSH LOGS;
---replace_column 2 # 4 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
-SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
+--let $MASTER_MYPORT=$NODE_MYPORT_1
+--source include/show_binlog_events.inc
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
---replace_column 2 # 4 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
-SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
+--let $MASTER_MYPORT=$NODE_MYPORT_2
+--source include/show_binlog_events.inc
DROP TABLE t1;
DROP TABLE t2;
+--echo #cleanup
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
+--connection node_2
+SET GLOBAL wsrep_on=OFF;
+reset master;
+SET GLOBAL wsrep_on=ON;
diff --git a/mysql-test/suite/galera/t/galera_log_output_csv.test b/mysql-test/suite/galera/t/galera_log_output_csv.test
index 94ae3dd6168..eeccc953187 100644
--- a/mysql-test/suite/galera/t/galera_log_output_csv.test
+++ b/mysql-test/suite/galera/t/galera_log_output_csv.test
@@ -22,3 +22,5 @@ SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
--connection node_1
DROP TABLE t1;
+truncate table mysql.slow_log;
+truncate table mysql.general_log;
diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
index 31fbb6914c9..0730f0380f5 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
+--source include/force_restart.inc
# Create a second connection to node1 so that we can run transactions concurrently
--let $galera_connection_name = node_1a
@@ -20,8 +21,9 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
--connection node_2
set session wsrep_sync_wait=15;
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+
SET GLOBAL wsrep_slave_threads = 4;
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
index 1db5ee3bdc7..b82a160657d 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
+--source include/force_restart.inc
--connection node_1
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
@@ -24,8 +25,9 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
--connection node_2
set session wsrep_sync_wait=15;
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+
SET GLOBAL wsrep_slave_threads = 4;
---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_sync_wait_show.test b/mysql-test/suite/galera/t/galera_sync_wait_show.test
index edad2840da2..1d240cc40d4 100644
--- a/mysql-test/suite/galera/t/galera_sync_wait_show.test
+++ b/mysql-test/suite/galera/t/galera_sync_wait_show.test
@@ -64,7 +64,9 @@ DROP TABLE t1;
--connection node_1
+--disable_warnings
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
+--enable_warnings
--connection node_2
SHOW CREATE EVENT event1;
diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_fk_insert.test b/mysql-test/suite/galera/t/galera_toi_ddl_fk_insert.test
index 9f161afc52e..fadc94d78ff 100644
--- a/mysql-test/suite/galera/t/galera_toi_ddl_fk_insert.test
+++ b/mysql-test/suite/galera/t/galera_toi_ddl_fk_insert.test
@@ -6,13 +6,12 @@
# This test creates a new FK constraint while concurrent INSERTS are running
#
-CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
id INT PRIMARY KEY AUTO_INCREMENT,
- f2 INTEGER,
- KEY (id)
+ f2 INTEGER
) ENGINE=InnoDB;
CREATE TABLE child (
@@ -41,7 +40,6 @@ INSERT INTO parent VALUES (1, 0);
--let $galera_server_number = 1
--source include/galera_connect.inc
--connection node_1b
---sleep 2
--send ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id);
--connection node_1a
@@ -57,14 +55,15 @@ INSERT INTO parent VALUES (1, 0);
--reap
--connection node_1
-SELECT COUNT(*) = 20001 FROM parent;
-SELECT COUNT(*) = 10000 FROM child;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) FROM parent;
+SELECT COUNT(*) FROM child;
--connection node_2
-SELECT COUNT(*) = 20001 FROM parent;
-SELECT COUNT(*) = 10000 FROM child;
+SET SESSION wsrep_sync_wait=15;
+SELECT COUNT(*) FROM parent;
+SELECT COUNT(*) FROM child;
DROP TABLE child;
DROP TABLE parent;
-
DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test b/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
index c4127b4f655..eec47507e3a 100644
--- a/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
+++ b/mysql-test/suite/galera/t/galera_var_gtid_domain_id.test
@@ -48,6 +48,17 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;
+--echo #cleanup
+--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
+--connection node_2
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/galera_var_notify_cmd.test b/mysql-test/suite/galera/t/galera_var_notify_cmd.test
index 4fea69f62bb..b261f878ced 100644
--- a/mysql-test/suite/galera/t/galera_var_notify_cmd.test
+++ b/mysql-test/suite/galera/t/galera_var_notify_cmd.test
@@ -10,5 +10,3 @@
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status;
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
-
-DROP SCHEMA mtr_wsrep_notify;
diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test
index 12d8006db4b..4a2dd07098c 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -6,7 +6,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
+--source include/force_restart.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@@ -14,6 +14,7 @@
--source include/auto_increment_offset_save.inc
--connection node_1
+--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB;
@@ -26,28 +27,25 @@ SELECT @@wsrep_slave_threads = 1;
SET GLOBAL wsrep_slave_threads = 1;
# There is a separate wsrep_aborter thread at all times
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-#
-# Increase the number of slave threads. The change takes effect immediately
-#
-
-SET GLOBAL wsrep_slave_threads = 64;
-
--connection node_1
INSERT INTO t1 VALUES (1);
--connection node_2
+
+--let $wait_timeout=600
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+
SELECT COUNT(*) FROM t1;
#
-# note, in wsrep API #26, we have 2 rollbacker threads, counted as system user's
+# Increase the number of slave threads. The change takes effect immediately
#
+SET GLOBAL wsrep_slave_threads = 64;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--let $wait_condition = SELECT VARIABLE_VALUE = 64 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
#
@@ -60,8 +58,8 @@ SET GLOBAL wsrep_slave_threads = 1;
--disable_result_log
--disable_query_log
-# Generate 64 replication events
---let $count = 64
+# Generate 70 replication events
+--let $count = 70
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
@@ -73,120 +71,49 @@ while ($count)
--connection node_2
SELECT COUNT(*) FROM t2;
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
-
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
---source include/wait_condition.inc
-
---let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
---let $wsrep_provider_node2 = `SELECT @@wsrep_provider`
-
-SET GLOBAL wsrep_slave_threads = 5;
-
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
-SET GLOBAL wsrep_slave_threads = 1;
+--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
-#
-# test phase for bug https://github.com/codership/mysql-wsrep/issues/319
-#
+DROP TABLE t1;
+DROP TABLE t2;
-# shutdown node 2
---connection node_2
---echo Shutting down server ...
---source include/shutdown_mysqld.inc
+--echo #
+--echo # lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
+--echo #
-# wait until node_1 is ready as one node cluster
--connection node_1
+CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
---source include/wait_condition.inc
-show status like 'wsrep_cluster_size';
-
-# step up slave threads to 6, and make sure all appliers and rollbacker thread are running
-SET GLOBAL wsrep_slave_threads = 6;
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--connection node_2
+SET GLOBAL wsrep_slave_threads = 4;
+--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
-# change to invalid cluster address
SET GLOBAL wsrep_slave_threads = 1;
-SET GLOBAL wsrep_cluster_address='';
-
-# join back to single node cluster
-SET GLOBAL wsrep_cluster_address='gcomm://';
---source include/wait_until_connected_again.inc
-# we should have 1 applier thread now
---let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'
---source include/wait_condition.inc
-
-# test if we can increase applier count now (fails in bug #319)
-SET GLOBAL wsrep_slave_threads = 10;
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
---source include/wait_condition.inc
+--connection node_1
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+INSERT INTO t1 VALUES (DEFAULT);
+DROP TABLE t1;
-# restart node 2
--connection node_2
---source include/start_mysqld.inc
---source include/wait_until_connected_again.inc
-
-SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
-#
+# Wait until above DDL is replicated
#
-# cleanup to original state
+# make sure that we are left with exactly one applier thread before we leaving the test
#
---connection node_1
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
-
---connection node_2
---eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
-
-
---disable_result_log
---disable_query_log
-# Generate 64 replication events, to help node 1 to purge excessive applier threads
---let $count = 64
-while ($count)
-{
- INSERT INTO t2 VALUES (DEFAULT);
- --dec $count
-}
---enable_query_log
---enable_result_log
-
---connection node_1
---disable_result_log
---disable_query_log
-# Generate 64 replication events, to help node 2 to purge excessive applier threads
---let $count = 64
-while ($count)
-{
- INSERT INTO t2 VALUES (DEFAULT);
- --dec $count
-}
---enable_query_log
---enable_result_log
-
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
---source include/wait_condition.inc
-
-
---connection node_2
---let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
-SELECT COUNT(*) FROM t1;
-SELECT COUNT(*) FROM t2;
-
---connection node_1
-
-SELECT COUNT(*) FROM t1;
-SELECT COUNT(*) FROM t2;
-
-DROP TABLE t1;
-DROP TABLE t2;
+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/mdev_10518.test b/mysql-test/suite/galera/t/mdev_10518.test
index c4127b4f655..eec47507e3a 100644
--- a/mysql-test/suite/galera/t/mdev_10518.test
+++ b/mysql-test/suite/galera/t/mdev_10518.test
@@ -48,6 +48,17 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;
+--echo #cleanup
+--connection node_1
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
+--connection node_2
+set global wsrep_on=OFF;
+reset master;
+set global wsrep_on=ON;
+
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result b/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result
new file mode 100644
index 00000000000..e3935c32fda
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/r/galera_innobackupex_backup.result
@@ -0,0 +1,20 @@
+connection node_2;
+connection node_1;
+connection node_1;
+connection node_2;
+connection node_3;
+connection node_1;
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+connection node_2;
+SELECT COUNT(*) = 10 FROM t1;
+COUNT(*) = 10
+1
+Killing server ...
+connection node_1;
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+# restart
+SELECT COUNT(*) = 20 FROM t1;
+COUNT(*) = 20
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
index 8ec1ff090ff..dc72260d979 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mariabackup_section.result
@@ -20,5 +20,6 @@ DROP TABLE t1;
connection node_1;
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
+connection node_2;
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]]
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
new file mode 100644
index 00000000000..8dfb4660f3e
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
@@ -0,0 +1,80 @@
+#
+# This test uses innobackupex to take a backup on node #2 and then restores that node from backup
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_mariabackup.inc
+
+--let $galera_connection_name = node_3
+--let $galera_server_number = 3
+--source include/galera_connect.inc
+
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+--connection node_2
+SELECT COUNT(*) = 10 FROM t1;
+
+--exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
+--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-backup.log
+--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-apply.log
+
+--source ../galera/include/kill_galera.inc
+--sleep 1
+
+--connection node_1
+INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
+
+--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/*
+--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back --port=$NODE_MYPORT_2 --host=127.0.0.1 $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-restore.log
+
+#
+# Convert the xtrabackup_galera_info into a grastate.dat file
+#
+
+--perl
+ use strict;
+ my $xtrabackup_galera_info_file = $ENV{'MYSQL_TMP_DIR'}.'/innobackupex_backup/xtrabackup_galera_info';
+ open(XTRABACKUP_GALERA_INFO, $xtrabackup_galera_info_file) or die "Can not open $xtrabackup_galera_info_file: $!";
+ my $xtrabackup_galera_info = <XTRABACKUP_GALERA_INFO>;
+ my ($uuid, $seqno) = split(':', $xtrabackup_galera_info);
+
+ my $grastate_dat_file = $ENV{'MYSQLTEST_VARDIR'}.'/mysqld.2/data/grastate.dat';
+ die "grastate.dat already exists" if -e $grastate_dat_file;
+
+ open(GRASTATE_DAT, ">$grastate_dat_file") or die "Can not write to $grastate_dat_file: $!";
+ print GRASTATE_DAT "version: 2.1\n";
+ print GRASTATE_DAT "uuid: $uuid\n";
+ print GRASTATE_DAT "seqno: $seqno\n";
+ print GRASTATE_DAT "cert_index:\n";
+ exit(0);
+EOF
+
+--source include/start_mysqld.inc
+--sleep 5
+
+--source include/wait_until_connected_again.inc
+--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+SELECT COUNT(*) = 20 FROM t1;
+
+DROP TABLE t1;
+
+--sleep 10
+
+--let $galera_connection_name = node_2a
+--let $galera_server_number = 2
+--source include/galera_connect.inc
+--let $node_2=node_2a
+
+# Restore original auto_increment_offset values.
+--source ../galera/include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
index 7f73e36c0b8..fd76c3586ca 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mariabackup_section.test
@@ -53,7 +53,9 @@ DROP TABLE t1;
--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
--source include/assert_grep.inc
+--connection node_2
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
+--let $assert_only_after = CURRENT_TEST
# There are two ISTs on joiner, the first at the initial startup, the second
# during the actual test.
diff --git a/mysql-test/suite/innodb/r/alter_large_dml.result b/mysql-test/suite/innodb/r/alter_large_dml.result
new file mode 100644
index 00000000000..056e8fdd768
--- /dev/null
+++ b/mysql-test/suite/innodb/r/alter_large_dml.result
@@ -0,0 +1,49 @@
+CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
+f4 char(200), f5 char(200), f6 char(200),
+f7 char(200), f8 char(200))ENGINE=InnoDB;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL rebuilt WAIT_FOR dml_pause';
+SET DEBUG_SYNC = 'alter_table_inplace_before_lock_upgrade SIGNAL dml_restart WAIT_FOR dml_done';
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL ddl_start';
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
+connect con1,localhost,root,,test;
+SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
+BEGIN;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+SET DEBUG_SYNC = 'now SIGNAL dml_pause';
+SET DEBUG_SYNC = 'now WAIT_FOR dml_restart';
+ROLLBACK;
+BEGIN;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+ROLLBACK;
+BEGIN;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ROLLBACK;
+SET DEBUG_SYNC = 'now SIGNAL dml_done';
+connect con2, localhost,root,,test;
+SET DEBUG_SYNC = 'now WAIT_FOR ddl_start';
+CREATE TABLE t2(f1 INT NOT NULL)ENGINE=InnoDB;
+connection default;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` char(200) DEFAULT NULL,
+ `f2` char(200) DEFAULT NULL,
+ `f3` char(200) DEFAULT NULL,
+ `f4` char(200) DEFAULT NULL,
+ `f5` char(200) DEFAULT NULL,
+ `f6` char(200) DEFAULT NULL,
+ `f7` char(200) DEFAULT NULL,
+ `f8` char(200) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+16384
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
new file mode 100644
index 00000000000..6cf0fdf4159
--- /dev/null
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,32k.rdiff
@@ -0,0 +1,25 @@
+--- check_ibd_filesize.result
++++ check_ibd_filesize.result,32k
+@@ -3,18 +3,12 @@
+ # SPACE IN 5.7 THAN IN 5.6
+ #
+ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 196608
+ INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+-# bytes: 9437184
++# bytes: 786432
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 196608
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 4194304
+-DROP TABLE t1;
+-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+-# bytes: 65536
+-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 65536
++# bytes: 786432
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
new file mode 100644
index 00000000000..52cd6832755
--- /dev/null
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,4k.rdiff
@@ -0,0 +1,25 @@
+--- check_ibd_filesize.result
++++ check_ibd_filesize.result,4k
+@@ -3,18 +3,18 @@
+ # SPACE IN 5.7 THAN IN 5.6
+ #
+ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 24576
+ INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+ # bytes: 9437184
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 24576
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+ # bytes: 4194304
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+-# bytes: 65536
++# bytes: 16384
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 65536
++# bytes: 25600
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
new file mode 100644
index 00000000000..23d9fbe608f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,64k.rdiff
@@ -0,0 +1,25 @@
+--- check_ibd_filesize.result
++++ check_ibd_filesize.result,64k
+@@ -3,18 +3,12 @@
+ # SPACE IN 5.7 THAN IN 5.6
+ #
+ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 393216
+ INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+-# bytes: 9437184
++# bytes: 983040
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 393216
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 4194304
+-DROP TABLE t1;
+-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+-# bytes: 65536
+-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 65536
++# bytes: 1572864
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
new file mode 100644
index 00000000000..17936a3def9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize,8k.rdiff
@@ -0,0 +1,25 @@
+--- check_ibd_filesize.result
++++ check_ibd_filesize.result,8k
+@@ -3,18 +3,18 @@
+ # SPACE IN 5.7 THAN IN 5.6
+ #
+ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 49152
+ INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+ # bytes: 9437184
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+-# bytes: 98304
++# bytes: 49152
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+ # bytes: 4194304
+ DROP TABLE t1;
+ CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+ ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+-# bytes: 65536
++# bytes: 32768
+ INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+-# bytes: 65536
++# bytes: 32768
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/check_ibd_filesize.result b/mysql-test/suite/innodb/r/check_ibd_filesize.result
new file mode 100644
index 00000000000..a6f5fbd9387
--- /dev/null
+++ b/mysql-test/suite/innodb/r/check_ibd_filesize.result
@@ -0,0 +1,20 @@
+#
+# Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
+# SPACE IN 5.7 THAN IN 5.6
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+# bytes: 98304
+INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+# bytes: 9437184
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+# bytes: 98304
+INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+# bytes: 4194304
+DROP TABLE t1;
+CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+# bytes: 65536
+INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+# bytes: 65536
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/create_select.result b/mysql-test/suite/innodb/r/create_select.result
new file mode 100644
index 00000000000..f5db880816e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/create_select.result
@@ -0,0 +1,10 @@
+connect con1, localhost, root,,;
+connection default;
+CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
+connection con1;
+KILL QUERY @id;
+disconnect con1;
+connection default;
+ERROR 70100: Query execution was interrupted
+CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result
index b99aba15f0f..14bff3a5eba 100644
--- a/mysql-test/suite/innodb/r/innodb-16k.result
+++ b/mysql-test/suite/innodb/r/innodb-16k.result
@@ -18,50 +18,6 @@ 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;
@@ -76,28 +32,6 @@ 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,
@@ -568,402 +502,3 @@ DROP TABLE t1;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;
DROP TABLE tlong2;
-SET SESSION innodb_strict_mode = on;
-CREATE TABLE t2(COL1 TEXT,
-COL2 TEXT,
-COL3 TEXT,
-COL4 TEXT,
-COL5 TEXT,
-COL6 TEXT,
-COL7 TEXT,
-COL8 TEXT,
-COL9 TEXT,
-COL10 TEXT,
-COL11 TEXT,
-COL12 TEXT,
-COL13 TEXT,
-COL14 TEXT,
-COL15 TEXT,
-COL16 TEXT,
-COL17 TEXT,
-COL18 TEXT,
-COL19 TEXT,
-COL20 TEXT,
-COL21 TEXT,
-COL22 TEXT,
-COL23 TEXT,
-COL24 TEXT,
-COL25 TEXT,
-COL26 TEXT,
-COL27 TEXT,
-COL28 TEXT,
-COL29 TEXT,
-COL30 TEXT,
-COL31 TEXT,
-COL32 TEXT,
-COL33 TEXT,
-COL34 TEXT,
-COL35 TEXT,
-COL36 TEXT,
-COL37 TEXT,
-COL38 TEXT,
-COL39 TEXT,
-COL40 TEXT,
-COL41 TEXT,
-COL42 TEXT,
-COL43 TEXT,
-COL44 TEXT,
-COL45 TEXT,
-COL46 TEXT,
-COL47 TEXT,
-COL48 TEXT,
-COL49 TEXT,
-COL50 TEXT,
-COL51 TEXT,
-COL52 TEXT,
-COL53 TEXT,
-COL54 TEXT,
-COL55 TEXT,
-COL56 TEXT,
-COL57 TEXT,
-COL58 TEXT,
-COL59 TEXT,
-COL60 TEXT,
-COL61 TEXT,
-COL62 TEXT,
-COL63 TEXT,
-COL64 TEXT,
-COL65 TEXT,
-COL66 TEXT,
-COL67 TEXT,
-COL68 TEXT,
-COL69 TEXT,
-COL70 TEXT,
-COL71 TEXT,
-COL72 TEXT,
-COL73 TEXT,
-COL74 TEXT,
-COL75 TEXT,
-COL76 TEXT,
-COL77 TEXT,
-COL78 TEXT,
-COL79 TEXT,
-COL80 TEXT,
-COL81 TEXT,
-COL82 TEXT,
-COL83 TEXT,
-COL84 TEXT,
-COL85 TEXT,
-COL86 TEXT,
-COL87 TEXT,
-COL88 TEXT,
-COL89 TEXT,
-COL90 TEXT,
-COL91 TEXT,
-COL92 TEXT,
-COL93 TEXT,
-COL94 TEXT,
-COL95 TEXT,
-COL96 TEXT,
-COL97 TEXT,
-COL98 TEXT,
-COL99 TEXT,
-COL100 TEXT,
-COL101 TEXT,
-COL102 TEXT,
-COL103 TEXT,
-COL104 TEXT,
-COL105 TEXT,
-COL106 TEXT,
-COL107 TEXT,
-COL108 TEXT,
-COL109 TEXT,
-COL110 TEXT,
-COL111 TEXT,
-COL112 TEXT,
-COL113 TEXT,
-COL114 TEXT,
-COL115 TEXT,
-COL116 TEXT,
-COL117 TEXT,
-COL118 TEXT,
-COL119 TEXT,
-COL120 TEXT,
-COL121 TEXT,
-COL122 TEXT,
-COL123 TEXT,
-COL124 TEXT,
-COL125 TEXT,
-COL126 TEXT,
-COL127 TEXT,
-COL128 TEXT,
-COL129 TEXT,
-COL130 TEXT,
-COL131 TEXT,
-COL132 TEXT,
-COL133 TEXT,
-COL134 TEXT,
-COL135 TEXT,
-COL136 TEXT,
-COL137 TEXT,
-COL138 TEXT,
-COL139 TEXT,
-COL140 TEXT,
-COL141 TEXT,
-COL142 TEXT,
-COL143 TEXT,
-COL144 TEXT,
-COL145 TEXT,
-COL146 TEXT,
-COL147 TEXT,
-COL148 TEXT,
-COL149 TEXT,
-COL150 TEXT,
-COL151 TEXT,
-COL152 TEXT,
-COL153 TEXT,
-COL154 TEXT,
-COL155 TEXT,
-COL156 TEXT,
-COL157 TEXT,
-COL158 TEXT,
-COL159 TEXT,
-COL160 TEXT,
-COL161 TEXT,
-COL162 TEXT,
-COL163 TEXT,
-COL164 TEXT,
-COL165 TEXT,
-COL166 TEXT,
-COL167 TEXT,
-COL168 TEXT,
-COL169 TEXT,
-COL170 TEXT,
-COL171 TEXT,
-COL172 TEXT,
-COL173 TEXT,
-COL174 TEXT,
-COL175 TEXT,
-COL176 TEXT,
-COL177 TEXT,
-COL178 TEXT,
-COL179 TEXT,
-COL180 TEXT,
-COL181 TEXT,
-COL182 TEXT,
-COL183 TEXT,
-COL184 TEXT,
-COL185 TEXT,
-COL186 TEXT,
-COL187 TEXT,
-COL188 TEXT,
-COL189 TEXT,
-COL190 TEXT,
-COL191 TEXT,
-COL192 TEXT,
-COL193 TEXT,
-COL194 TEXT,
-COL195 TEXT,
-COL196 TEXT,
-COL197 TEXT)
-row_format=dynamic,ENGINE=INNODB;
-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 t2(COL1 TEXT,
-COL2 TEXT,
-COL3 TEXT,
-COL4 TEXT,
-COL5 TEXT,
-COL6 TEXT,
-COL7 TEXT,
-COL8 TEXT,
-COL9 TEXT,
-COL10 TEXT,
-COL11 TEXT,
-COL12 TEXT,
-COL13 TEXT,
-COL14 TEXT,
-COL15 TEXT,
-COL16 TEXT,
-COL17 TEXT,
-COL18 TEXT,
-COL19 TEXT,
-COL20 TEXT,
-COL21 TEXT,
-COL22 TEXT,
-COL23 TEXT,
-COL24 TEXT,
-COL25 TEXT,
-COL26 TEXT,
-COL27 TEXT,
-COL28 TEXT,
-COL29 TEXT,
-COL30 TEXT,
-COL31 TEXT,
-COL32 TEXT,
-COL33 TEXT,
-COL34 TEXT,
-COL35 TEXT,
-COL36 TEXT,
-COL37 TEXT,
-COL38 TEXT,
-COL39 TEXT,
-COL40 TEXT,
-COL41 TEXT,
-COL42 TEXT,
-COL43 TEXT,
-COL44 TEXT,
-COL45 TEXT,
-COL46 TEXT,
-COL47 TEXT,
-COL48 TEXT,
-COL49 TEXT,
-COL50 TEXT,
-COL51 TEXT,
-COL52 TEXT,
-COL53 TEXT,
-COL54 TEXT,
-COL55 TEXT,
-COL56 TEXT,
-COL57 TEXT,
-COL58 TEXT,
-COL59 TEXT,
-COL60 TEXT,
-COL61 TEXT,
-COL62 TEXT,
-COL63 TEXT,
-COL64 TEXT,
-COL65 TEXT,
-COL66 TEXT,
-COL67 TEXT,
-COL68 TEXT,
-COL69 TEXT,
-COL70 TEXT,
-COL71 TEXT,
-COL72 TEXT,
-COL73 TEXT,
-COL74 TEXT,
-COL75 TEXT,
-COL76 TEXT,
-COL77 TEXT,
-COL78 TEXT,
-COL79 TEXT,
-COL80 TEXT,
-COL81 TEXT,
-COL82 TEXT,
-COL83 TEXT,
-COL84 TEXT,
-COL85 TEXT,
-COL86 TEXT,
-COL87 TEXT,
-COL88 TEXT,
-COL89 TEXT,
-COL90 TEXT,
-COL91 TEXT,
-COL92 TEXT,
-COL93 TEXT,
-COL94 TEXT,
-COL95 TEXT,
-COL96 TEXT,
-COL97 TEXT,
-COL98 TEXT,
-COL99 TEXT,
-COL100 TEXT,
-COL101 TEXT,
-COL102 TEXT,
-COL103 TEXT,
-COL104 TEXT,
-COL105 TEXT,
-COL106 TEXT,
-COL107 TEXT,
-COL108 TEXT,
-COL109 TEXT,
-COL110 TEXT,
-COL111 TEXT,
-COL112 TEXT,
-COL113 TEXT,
-COL114 TEXT,
-COL115 TEXT,
-COL116 TEXT,
-COL117 TEXT,
-COL118 TEXT,
-COL119 TEXT,
-COL120 TEXT,
-COL121 TEXT,
-COL122 TEXT,
-COL123 TEXT,
-COL124 TEXT,
-COL125 TEXT,
-COL126 TEXT,
-COL127 TEXT,
-COL128 TEXT,
-COL129 TEXT,
-COL130 TEXT,
-COL131 TEXT,
-COL132 TEXT,
-COL133 TEXT,
-COL134 TEXT,
-COL135 TEXT,
-COL136 TEXT,
-COL137 TEXT,
-COL138 TEXT,
-COL139 TEXT,
-COL140 TEXT,
-COL141 TEXT,
-COL142 TEXT,
-COL143 TEXT,
-COL144 TEXT,
-COL145 TEXT,
-COL146 TEXT,
-COL147 TEXT,
-COL148 TEXT,
-COL149 TEXT,
-COL150 TEXT,
-COL151 TEXT,
-COL152 TEXT,
-COL153 TEXT,
-COL154 TEXT,
-COL155 TEXT,
-COL156 TEXT,
-COL157 TEXT,
-COL158 TEXT,
-COL159 TEXT,
-COL160 TEXT,
-COL161 TEXT,
-COL162 TEXT,
-COL163 TEXT,
-COL164 TEXT,
-COL165 TEXT,
-COL166 TEXT,
-COL167 TEXT,
-COL168 TEXT,
-COL169 TEXT,
-COL170 TEXT,
-COL171 TEXT,
-COL172 TEXT,
-COL173 TEXT,
-COL174 TEXT,
-COL175 TEXT,
-COL176 TEXT,
-COL177 TEXT,
-COL178 TEXT,
-COL179 TEXT,
-COL180 TEXT,
-COL181 TEXT,
-COL182 TEXT,
-COL183 TEXT,
-COL184 TEXT,
-COL185 TEXT,
-COL186 TEXT,
-COL187 TEXT,
-COL188 TEXT,
-COL189 TEXT,
-COL190 TEXT,
-COL191 TEXT,
-COL192 TEXT,
-COL193 TEXT,
-COL194 TEXT,
-COL195 TEXT,
-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.
diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result
index 8e5249a55d5..4c79015f2bc 100644
--- a/mysql-test/suite/innodb/r/innodb-32k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is");
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,
@@ -7,6 +8,7 @@ ha blob,ia blob,ja blob,ka blob,la blob,ma blob,na blob,
oa blob,pa blob,qa blob,ra blob,sa blob,ta blob,ua blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET innodb_strict_mode=OFF;
CREATE TABLE t2(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,
@@ -16,6 +18,9 @@ ha blob,ia blob,ja blob,ka blob,la blob,ma blob,na blob,
oa blob,pa blob,qa blob,ra blob,sa blob,ta blob,ua blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=compact;
+Warnings:
+Warning 139 Row size too large (> 16318). 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.
+SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
SET @c = repeat('c', 767);
diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result
index 3e0671f5408..8b67dac8237 100644
--- a/mysql-test/suite/innodb/r/innodb-32k.result
+++ b/mysql-test/suite/innodb/r/innodb-32k.result
@@ -27,129 +27,9 @@ c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(121)
-) 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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(122)
-) 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(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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(82)
-) 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(200), c40 char(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(83)
-) 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(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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(63)
) ROW_FORMAT=compressed;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(82)
-) 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(200), c40 char(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(83)
-) 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(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result
index 765abbc2cd4..da481e0ec29 100644
--- a/mysql-test/suite/innodb/r/innodb-64k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is");
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,
@@ -15,6 +16,7 @@ hc blob, ic blob, jc blob, kc blob, lc blob,mc blob,nc blob,
oc blob, pc blob, qc blob, rc blob, sc blob,tc blob,uc blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET innodb_strict_mode=OFF;
CREATE TABLE t2(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,
@@ -32,6 +34,9 @@ hc blob, ic blob, jc blob, kc blob, lc blob,mc blob,nc blob,
oc blob, pc blob, qc blob, rc blob, sc blob,tc blob,uc blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=compact;
+Warnings:
+Warning 139 Row size too large (> 32702). 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.
+SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
SET @c = repeat('c', 767);
diff --git a/mysql-test/suite/innodb/r/innodb-system-table-view.result b/mysql-test/suite/innodb/r/innodb-system-table-view.result
new file mode 100644
index 00000000000..46730ef3aac
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-system-table-view.result
@@ -0,0 +1,178 @@
+SELECT table_id INTO @table_stats_id FROM information_schema.innodb_sys_tables
+WHERE name = 'mysql/innodb_table_stats';
+SELECT table_id INTO @index_stats_id FROM information_schema.innodb_sys_tables
+WHERE name = 'mysql/innodb_index_stats';
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY table_id;
+TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
+11 SYS_FOREIGN 0 7 0 Redundant 0 System
+12 SYS_FOREIGN_COLS 0 7 0 Redundant 0 System
+13 SYS_TABLESPACES 0 6 0 Redundant 0 System
+14 SYS_DATAFILES 0 5 0 Redundant 0 System
+15 SYS_VIRTUAL 0 6 0 Redundant 0 System
+18 mysql/transaction_registry 33 8 3 Dynamic 0 Single
+SELECT table_id,pos,mtype,prtype,len,name
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id)
+ORDER BY table_id, pos;
+table_id pos mtype prtype len name
+11 0 1 524292 0 ID
+11 1 1 524292 0 FOR_NAME
+11 2 1 524292 0 REF_NAME
+11 3 6 0 4 N_COLS
+12 0 1 524292 0 ID
+12 1 6 0 4 POS
+12 2 1 524292 0 FOR_COL_NAME
+12 3 1 524292 0 REF_COL_NAME
+13 0 6 0 4 SPACE
+13 1 1 524292 0 NAME
+13 2 6 0 4 FLAGS
+14 0 6 0 4 SPACE
+14 1 1 524292 0 PATH
+15 0 6 0 8 TABLE_ID
+15 1 6 0 4 POS
+15 2 6 0 4 BASE_POS
+18 0 6 1800 8 transaction_id
+18 1 6 1800 8 commit_id
+18 2 3 526087 7 begin_timestamp
+18 3 3 526087 7 commit_timestamp
+18 4 6 1022 1 isolation_level
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY index_id;
+INDEX_ID NAME TABLE_ID TYPE N_FIELDS PAGE_NO SPACE MERGE_THRESHOLD
+# ID_IND # 3 1 # # 50
+# FOR_IND # 0 1 # # 50
+# REF_IND # 0 1 # # 50
+# ID_IND # 3 2 # # 50
+# SYS_TABLESPACES_SPACE # 3 1 # # 50
+# SYS_DATAFILES_SPACE # 3 1 # # 50
+# BASE_IDX # 3 3 # # 50
+# PRIMARY # 3 1 # # 50
+# commit_id # 2 1 # # 50
+# begin_timestamp # 0 1 # # 50
+# commit_timestamp # 0 2 # # 50
+SELECT index_id,pos,name FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS
+WHERE name NOT IN ('database_name', 'table_name', 'index_name', 'stat_name')
+ORDER BY index_id, pos;
+index_id pos name
+11 0 ID
+12 0 FOR_NAME
+13 0 REF_NAME
+14 0 ID
+14 1 POS
+15 0 SPACE
+16 0 SPACE
+17 0 TABLE_ID
+17 1 POS
+17 2 BASE_POS
+20 0 transaction_id
+21 0 commit_id
+22 0 begin_timestamp
+23 0 commit_timestamp
+23 1 transaction_id
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+ID FOR_NAME REF_NAME N_COLS TYPE
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+ID FOR_COL_NAME REF_COL_NAME POS
+CREATE TABLE t_redundant (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t_compact (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t_compressed (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb KEY_BLOCK_SIZE=2;
+CREATE TABLE t_dynamic (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
+Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
+test/t_compact test/t_compact 1 5 Compact 0 Single
+test/t_compressed test/t_compressed 37 5 Compressed 2048 Single
+test/t_dynamic test/t_dynamic 33 5 Dynamic 0 Single
+test/t_redundant test/t_redundant 0 5 Redundant 0 Single
+=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
+Space_Name Space_Type Page_Size Zip_Size Path
+test/t_redundant Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_redundant.ibd
+test/t_compact Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_compact.ibd
+test/t_compressed Single DEFAULT 2048 MYSQLD_DATADIR/test/t_compressed.ibd
+test/t_dynamic Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_dynamic.ibd
+DROP TABLE t_redundant, t_compact, t_compressed, t_dynamic;
+SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
+count(*)
+8
+CREATE TABLE parent (id INT NOT NULL,
+PRIMARY KEY (id)) ENGINE=INNODB;
+CREATE TABLE child (id INT, parent_id INT,
+INDEX par_ind (parent_id),
+CONSTRAINT constraint_test
+FOREIGN KEY (parent_id) REFERENCES parent(id)
+ON DELETE CASCADE) ENGINE=INNODB;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+ID FOR_NAME REF_NAME N_COLS TYPE
+test/constraint_test test/child test/parent 1 1
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+ID FOR_COL_NAME REF_COL_NAME POS
+test/constraint_test parent_id id 0
+INSERT INTO parent VALUES(1);
+SELECT name, num_rows, ref_count
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name LIKE "%parent";
+name num_rows ref_count
+test/parent 1 1
+SELECT NAME, FLAG, N_COLS FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE name NOT LIKE 'sys/%';
+NAME FLAG N_COLS
+SYS_DATAFILES 0 5
+SYS_FOREIGN 0 7
+SYS_FOREIGN_COLS 0 7
+SYS_TABLESPACES 0 6
+SYS_VIRTUAL 0 6
+mysql/innodb_index_stats 33 11
+mysql/innodb_table_stats 33 9
+mysql/transaction_registry 33 8
+test/child 33 5
+test/parent 33 4
+SELECT name, n_fields
+from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id In (SELECT table_id from
+INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE name LIKE "%parent%");
+name n_fields
+PRIMARY 1
+SELECT name, n_fields
+from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id In (SELECT table_id from
+INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE name LIKE "%child%");
+name n_fields
+GEN_CLUST_INDEX 0
+par_ind 1
+SELECT name, pos, mtype, len
+from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id In (SELECT table_id from
+INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE name LIKE "%child%");
+name pos mtype len
+id 0 6 4
+parent_id 1 6 4
+DROP TABLE child;
+DROP TABLE parent;
+CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL,
+PRIMARY KEY (id, newid)) ENGINE=INNODB;
+CREATE TABLE child (id INT, parent_id INT,
+INDEX par_ind (parent_id),
+CONSTRAINT constraint_test
+FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid)
+ON DELETE CASCADE) ENGINE=INNODB;
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+ID FOR_NAME REF_NAME N_COLS TYPE
+test/constraint_test test/child test/parent 2 1
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+ID FOR_COL_NAME REF_COL_NAME POS
+test/constraint_test id id 0
+test/constraint_test parent_id newid 1
+INSERT INTO parent VALUES(1, 9);
+SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
+id newid
+1 9
+SELECT name, num_rows, ref_count
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name LIKE "%parent";
+name num_rows ref_count
+test/parent 1 2
+DROP TABLE child;
+DROP TABLE parent;
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result b/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result
new file mode 100644
index 00000000000..efe43945c69
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result
@@ -0,0 +1,18 @@
+CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB;
+INSERT INTO t1 () VALUES (),();
+connect con1,localhost,root,,test;
+ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY;
+SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open";
+DELETE FROM t1;
+connection default;
+SET debug_sync= "now WAIT_FOR delete_open";
+SET debug_sync= "ib_open_after_dict_open SIGNAL another_open";
+SELECT a FROM t1;
+a
+NULL
+NULL
+connection con1;
+disconnect con1;
+connection default;
+SET debug_sync= "RESET";
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-debug.result b/mysql-test/suite/innodb/r/innodb-wl5980-debug.result
new file mode 100644
index 00000000000..51cff4393aa
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-wl5980-debug.result
@@ -0,0 +1,27 @@
+call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache");
+call mtr.add_suppression("Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'.");
+#
+# WL5980 Remote tablespace debug error injection tests.
+#
+CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir' ;
+INSERT INTO t1 VALUES (1, 'tablespace');
+SELECT * FROM t1;
+a b
+1 tablespace
+#
+# Test the second injection point in fil_rename_tablespace().
+# Make sure the table is useable after this failure.
+#
+SET @save_dbug=@@debug_dbug;
+SET debug_dbug="+d,fil_rename_tablespace_failure_2";
+RENAME TABLE t1 TO t2;
+SET debug_dbug=@save_dbug;
+INSERT INTO t1 VALUES (2, 'tablespace');
+SELECT * FROM t1;
+a b
+1 tablespace
+2 tablespace
+#
+# Cleanup
+#
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
index c20c981653c..f62aa132108 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result
@@ -14,53 +14,6 @@ col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255)
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT= COMPACT;
-ERROR 42000: Row size too large (> 16318). 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 tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT= DYNAMIC;
-ERROR 42000: Row size too large (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-show warnings;
-Level Code Message
-Error 1118 Row size too large (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-Warning 1030 Got error 139 "Too big row" from storage engine InnoDB
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT=REDUNDANT;
-ERROR 42000: Row size too large (> 16315). 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.
-show warnings;
-Level Code Message
-Error 1118 Row size too large (> 16315). 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 1030 Got error 139 "Too big row" from storage engine InnoDB
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=FIXED;
ERROR HY000: Can't create table `test`.`tab5` (errno: 140 "Wrong create options")
show warnings;
@@ -133,6 +86,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=COMPACT;
+Warnings:
+Warning 139 Row size too large (> NNNN). 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.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
@@ -191,6 +146,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=DYNAMIC;
+Warnings:
+Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
@@ -265,6 +222,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=REDUNDANT;
+Warnings:
+Warning 139 Row size too large (> NNNN). 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.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
@@ -310,6 +269,7 @@ col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col6
ENGINE = innodb ROW_FORMAT=COMPRESSED;
Warnings:
Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > NNNNk. Assuming ROW_FORMAT=DYNAMIC.
+Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
DROP TABLE tab5;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
diff --git a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
index a74e7826729..f65d2995429 100644
--- a/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
+++ b/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result
@@ -13,73 +13,6 @@ col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255)
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
-ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
-ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
-ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
-ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
-ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
-ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
-ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
-ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
-ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
-ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
-ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
-)
-ENGINE = innodb ROW_FORMAT= COMPACT;
-ERROR 42000: Row size too large (> 16383). 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 tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
-ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
-ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
-ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
-ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
-ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
-ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
-ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
-ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
-ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
-ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
-ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
-)
-ENGINE = innodb ROW_FORMAT= DYNAMIC;
-ERROR 42000: Row size too large (> 16383). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT=REDUNDANT;
-ERROR 42000: Row size too large (> 16382). 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.
-show warnings;
-Level Code Message
-Error 1118 Row size too large (> 16382). 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 1030 Got error 139 "Too big row" from storage engine InnoDB
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=FIXED;
ERROR HY000: Can't create table `test`.`tab5` (errno: 140 "Wrong create options")
@@ -190,6 +123,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=COMPACT;
+Warnings:
+Warning 139 Row size too large (> 32702). 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.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
@@ -300,6 +235,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=DYNAMIC;
+Warnings:
+Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
@@ -440,6 +377,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=REDUNDANT;
+Warnings:
+Warning 139 Row size too large (> NNNN). 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.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
diff --git a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
index d274d834faa..75926282133 100644
--- a/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
+++ b/mysql-test/suite/innodb/r/instant_alter,4k.rdiff
@@ -1,6 +1,17 @@
--- instant_alter.result
+++ instant_alter,4k.result
-@@ -181,7 +181,7 @@
+@@ -227,7 +227,9 @@
+ COMMIT;
+ ALTER TABLE t2 ADD COLUMN d1 VARCHAR(2000) DEFAULT REPEAT('asdf',500);
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ SELECT id, c1, ST_AsText(p) p, d1 FROM t2;
+ id c1 p d1
+ 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa LINESTRING(0 0,0 1,1 1) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd
+@@ -241,7 +243,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -9,7 +20,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -250,7 +250,7 @@
+@@ -251,7 +253,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -18,7 +29,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -261,7 +261,7 @@
+@@ -262,7 +264,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -27,7 +38,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -271,7 +271,7 @@
+@@ -272,7 +274,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -36,7 +47,55 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -374,7 +374,7 @@
+@@ -318,10 +320,14 @@
+ ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8
+ DEFAULT 'The quick brown fox jumps over the lazy dog';
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ INSERT INTO t3 SET id=4;
+ ERROR HY000: Field 'c2' doesn't have a default value
+ INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1;
+@@ -334,7 +340,9 @@
+ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
+ CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
+ affected rows: 4
+-info: Records: 4 Duplicates: 0 Warnings: 0
++info: Records: 4 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ INSERT INTO t3 SET id=5, c2=9;
+ Warnings:
+ Note 1265 Data truncated for column 'c7' at row 1
+@@ -348,7 +356,9 @@
+ 5 9 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01 ääH binary line of business
+ ALTER TABLE t3 DROP c3, DROP c7;
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ SET innodb_strict_mode = OFF;
+ affected rows: 0
+ SELECT * FROM t3;
+@@ -378,6 +388,8 @@
+ (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000),
+ p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p))
+ ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ BEGIN;
+ INSERT INTO big
+ SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159);
+@@ -395,13 +407,15 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -45,7 +104,16 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -397,7 +397,7 @@
+ d3 TIMESTAMP NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp);
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1979). 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.
+ CHECKSUM TABLE big;
+ Table Checksum
+ test.big 1705165209
+@@ -418,7 +432,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -54,7 +122,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -410,7 +410,7 @@
+@@ -431,7 +445,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -62,8 +130,19 @@
+8
connection default;
InnoDB 0 transactions not purged
- DROP TABLE t1,t2,t3,big;
-@@ -600,7 +600,7 @@
+ DROP TABLE t1,t2,t3,t4,big;
+@@ -663,7 +677,9 @@
+ COMMIT;
+ ALTER TABLE t2 ADD COLUMN d1 VARCHAR(2000) DEFAULT REPEAT('asdf',500);
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ SELECT id, c1, ST_AsText(p) p, d1 FROM t2;
+ id c1 p d1
+ 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa LINESTRING(0 0,0 1,1 1) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd
+@@ -677,7 +693,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -72,7 +151,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -610,7 +610,7 @@
+@@ -687,7 +703,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -81,7 +160,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -621,7 +621,7 @@
+@@ -698,7 +714,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -90,7 +169,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -631,7 +631,7 @@
+@@ -708,7 +724,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -99,7 +178,55 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -734,7 +734,7 @@
+@@ -754,10 +770,14 @@
+ ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8
+ DEFAULT 'The quick brown fox jumps over the lazy dog';
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ INSERT INTO t3 SET id=4;
+ ERROR HY000: Field 'c2' doesn't have a default value
+ INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1;
+@@ -770,7 +790,9 @@
+ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
+ CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
+ affected rows: 4
+-info: Records: 4 Duplicates: 0 Warnings: 0
++info: Records: 4 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ INSERT INTO t3 SET id=5, c2=9;
+ Warnings:
+ Note 1265 Data truncated for column 'c7' at row 1
+@@ -784,7 +806,9 @@
+ 5 9 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01 ääH binary line of business
+ ALTER TABLE t3 DROP c3, DROP c7;
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ SET innodb_strict_mode = OFF;
+ affected rows: 0
+ SELECT * FROM t3;
+@@ -814,6 +838,8 @@
+ (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000),
+ p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p))
+ ENGINE=InnoDB ROW_FORMAT=COMPACT;
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ BEGIN;
+ INSERT INTO big
+ SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159);
+@@ -831,13 +857,15 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -108,7 +235,16 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -757,7 +757,7 @@
+ d3 TIMESTAMP NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp);
+ affected rows: 0
+-info: Records: 0 Duplicates: 0 Warnings: 0
++info: Records: 0 Duplicates: 0 Warnings: 1
++Warnings:
++Warning 139 Row size too large (> 1982). 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.
+ CHECKSUM TABLE big;
+ Table Checksum
+ test.big 1705165209
+@@ -854,7 +882,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -117,7 +253,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -770,7 +770,7 @@
+@@ -867,7 +895,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -125,8 +261,8 @@
+7
connection default;
InnoDB 0 transactions not purged
- DROP TABLE t1,t2,t3,big;
-@@ -960,7 +960,7 @@
+ DROP TABLE t1,t2,t3,t4,big;
+@@ -1113,7 +1141,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -135,7 +271,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -970,7 +970,7 @@
+@@ -1123,7 +1151,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -144,7 +280,7 @@
connection default;
BEGIN;
UPDATE t2 SET d1 = repeat(id, 200);
-@@ -981,7 +981,7 @@
+@@ -1134,7 +1162,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -153,7 +289,7 @@
connection default;
ROLLBACK;
connection analyze;
-@@ -991,7 +991,7 @@
+@@ -1144,7 +1172,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/t2';
clust_index_size
@@ -162,7 +298,7 @@
connection default;
ALTER TABLE t2 DROP p;
affected rows: 0
-@@ -1094,7 +1094,7 @@
+@@ -1267,7 +1295,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -171,7 +307,7 @@
connection default;
ALTER TABLE big ADD COLUMN
(d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde',
-@@ -1117,7 +1117,7 @@
+@@ -1290,7 +1318,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -180,7 +316,7 @@
connection default;
ROLLBACK;
CHECKSUM TABLE big;
-@@ -1130,7 +1130,7 @@
+@@ -1303,7 +1331,7 @@
SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name = 'test/big';
clust_index_size
@@ -188,4 +324,4 @@
+7
connection default;
InnoDB 0 transactions not purged
- DROP TABLE t1,t2,t3,big;
+ DROP TABLE t1,t2,t3,t4,big;
diff --git a/mysql-test/suite/innodb/r/instant_alter.result b/mysql-test/suite/innodb/r/instant_alter.result
index 0723559fd10..3122c15fae0 100644
--- a/mysql-test/suite/innodb/r/instant_alter.result
+++ b/mysql-test/suite/innodb/r/instant_alter.result
@@ -1,6 +1,7 @@
#
# MDEV-11369: Instant ADD COLUMN for InnoDB
#
+call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
INSERT INTO t SET a=1;
@@ -332,6 +333,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
+SET innodb_strict_mode = OFF;
+affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
@@ -350,6 +353,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
+SET innodb_strict_mode = OFF;
+affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
@@ -1156,6 +1161,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
+SET innodb_strict_mode = OFF;
+affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
@@ -1174,6 +1181,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
+SET innodb_strict_mode = OFF;
+affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
@@ -1980,6 +1989,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
+SET innodb_strict_mode = OFF;
+affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
@@ -1998,6 +2009,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
+SET innodb_strict_mode = OFF;
+affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result
index ab43f90d4ab..5e3c2f87bf1 100644
--- a/mysql-test/suite/innodb/r/instant_alter_bugs.result
+++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result
@@ -128,6 +128,32 @@ HANDLER h READ `PRIMARY` PREV WHERE 0;
pk f1 f2 f3 f4 f5 f6 f7 f8 filler
HANDLER h CLOSE;
DROP TABLE t1;
+CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb;
+CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL,
+status ENUM ('a', 'b', 'c'), INDEX idx1(f2),
+PRIMARY KEY(f1),
+FOREIGN KEY (f2) REFERENCES t1(f1))ENGINE=InnoDB;
+ALTER TABLE t1 CHANGE f1 f1_id INT NOT NULL, ADD f3 VARCHAR(255) DEFAULT NULL;
+ALTER TABLE t1 CHANGE f1_id f1 INT NOT NULL;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `f1` int(11) NOT NULL,
+ `f3` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `f1` int(11) NOT NULL AUTO_INCREMENT,
+ `f2` int(11) NOT NULL,
+ `status` enum('a','b','c') DEFAULT NULL,
+ PRIMARY KEY (`f1`),
+ KEY `idx1` (`f2`),
+ CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL;
+DROP TABLE t2, t1;
create table t (
a varchar(9),
b int,
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff
new file mode 100644
index 00000000000..118145bec2e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,compact,innodb.rdiff
@@ -0,0 +1,80 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:51:26.070418078 +0300
+@@ -3,45 +3,65 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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 (> 4027). 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 (> 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff
new file mode 100644
index 00000000000..33067866b82
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,dynamic,innodb.rdiff
@@ -0,0 +1,224 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:52:54.580956978 +0300
+@@ -3,45 +3,207 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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 (> 4027). 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 (> 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
++CREATE TABLE t1 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
diff --git a/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff
new file mode 100644
index 00000000000..e50e4d2be3a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,16k,innodb,redundant.rdiff
@@ -0,0 +1,80 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:55:05.258762945 +0300
+@@ -3,45 +3,65 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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 (> 4027). 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 (> 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff
new file mode 100644
index 00000000000..1bc03a5d97a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,compact,innodb.rdiff
@@ -0,0 +1,121 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:27:08.004932026 +0300
+@@ -3,45 +3,104 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large (> 16318). 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 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff
new file mode 100644
index 00000000000..71c4c2e41b7
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,dynamic,innodb.rdiff
@@ -0,0 +1,366 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:38:41.609328820 +0300
+@@ -3,45 +3,351 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
++c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
++c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
++c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
++c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
++c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
++c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
++c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
++c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
++c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
++c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
++c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
++c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
++c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
++c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
++c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
++c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
++c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
++c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
++c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
++c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
++c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
++c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
++c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
++c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
++c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
++c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
++c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
++c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
++c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
++c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
++c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
++c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
++c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
++c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
++c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
++c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
++c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
++c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
++c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
++c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
++c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
++c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
++c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
++c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
++c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
++c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
++c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
++c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
++c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
++c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
++c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
++c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
++c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
++c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
++c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
++c771 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
++c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
++c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
++c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
++c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
++c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
++c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
++c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
++c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
++c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
++c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
++c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
++c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
++c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
++c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
++c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
++c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
++c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
++c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
++c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
++c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
++c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
++c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
++c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
++c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
++c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
++c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
++c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
++c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
++c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
++c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
++c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
++c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
++c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
++c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
++c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
++c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
++c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
++c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
++c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
++c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
++c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
++c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
++c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
++c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
++c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
++c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
++c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
++c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
++c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
++c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
++c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
++c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
++c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
++c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
++c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
++c771 TEXT, c772 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
diff --git a/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff
new file mode 100644
index 00000000000..e42b3de8845
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,32k,innodb,redundant.rdiff
@@ -0,0 +1,121 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:41:03.319664978 +0300
+@@ -3,45 +3,104 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16315). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16315). 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large (> 16315). 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 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16315). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff
new file mode 100644
index 00000000000..6f08dab3ca1
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,compact,innodb.rdiff
@@ -0,0 +1,62 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:56:23.489432164 +0300
+@@ -1,47 +1,37 @@
+ call mtr.add_suppression("Cannot add field `.*` in table `test`.`t1` because after adding it, the row size is");
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). 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 (
+-c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c1 VARCHAR(788), c2 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff
new file mode 100644
index 00000000000..bd37d4354e7
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,dynamic,innodb.rdiff
@@ -0,0 +1,128 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:57:38.636143710 +0300
+@@ -1,47 +1,103 @@
+ call mtr.add_suppression("Cannot add field `.*` in table `test`.`t1` because after adding it, the row size is");
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
++CREATE TABLE t1 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1982). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
diff --git a/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff
new file mode 100644
index 00000000000..93c39ff6714
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,4k,innodb,redundant.rdiff
@@ -0,0 +1,62 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:58:58.318768169 +0300
+@@ -1,47 +1,37 @@
+ call mtr.add_suppression("Cannot add field `.*` in table `test`.`t1` because after adding it, the row size is");
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+-c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+-c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1979). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+-c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+-c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1979). 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 (
+-c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c1 VARCHAR(788), c2 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1979). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 1979). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff
new file mode 100644
index 00000000000..5e6c62212d1
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,compact,innodb.rdiff
@@ -0,0 +1,203 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:45:21.760116841 +0300
+@@ -3,45 +3,186 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
++c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
++c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
++c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
++c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
++c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
++c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
++c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
++c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
++c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
++c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
++c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
++c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
++c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
++c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
++c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
++c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
++c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
++c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
++c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
++c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
++c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
++c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
++c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
++c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
++c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
++c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
++c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
++c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
++c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
++c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
++c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
++c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255),
++c129 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16383). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
++c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
++c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
++c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
++c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
++c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
++c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
++c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
++c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
++c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
++c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
++c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
++c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
++c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
++c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
++c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
++c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
++c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
++c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
++c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
++c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
++c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
++c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
++c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
++c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
++c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
++c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
++c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
++c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
++c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
++c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
++c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
++c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255), c128 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16383). 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large (> 16383). 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 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16383). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff
new file mode 100644
index 00000000000..2cbf4cd9c54
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,dynamic,innodb.rdiff
@@ -0,0 +1,501 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:48:32.453208310 +0300
+@@ -3,45 +3,486 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
++c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
++c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
++c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
++c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
++c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
++c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
++c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
++c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
++c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
++c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
++c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
++c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
++c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
++c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
++c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
++c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
++c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
++c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
++c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
++c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
++c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
++c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
++c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
++c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
++c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
++c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
++c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
++c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
++c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
++c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
++c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
++c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255),
++c129 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16383). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
++c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
++c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
++c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
++c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
++c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
++c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
++c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
++c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
++c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
++c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
++c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
++c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
++c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
++c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
++c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
++c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
++c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
++c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
++c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
++c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
++c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
++c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
++c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
++c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
++c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
++c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
++c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
++c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
++c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
++c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
++c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
++c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255), c128 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16383). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
++c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
++c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
++c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
++c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
++c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
++c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
++c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
++c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
++c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
++c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
++c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
++c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
++c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
++c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
++c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
++c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
++c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
++c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
++c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
++c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
++c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
++c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
++c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
++c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
++c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
++c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
++c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
++c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
++c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
++c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
++c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
++c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
++c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
++c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
++c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
++c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
++c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
++c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
++c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
++c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
++c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
++c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
++c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
++c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
++c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
++c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
++c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
++c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
++c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
++c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
++c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
++c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
++c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
++c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
++c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
++c771 TEXT, c772 TEXT, c773 TEXT, c774 TEXT, c775 TEXT, c776 TEXT, c777 TEXT,
++c778 TEXT, c779 TEXT, c780 TEXT, c781 TEXT, c782 TEXT, c783 TEXT, c784 TEXT,
++c785 TEXT, c786 TEXT, c787 TEXT, c788 TEXT, c789 TEXT, c790 TEXT, c791 TEXT,
++c792 TEXT, c793 TEXT, c794 TEXT, c795 TEXT, c796 TEXT, c797 TEXT, c798 TEXT,
++c799 TEXT, c800 TEXT, c801 TEXT, c802 TEXT, c803 TEXT, c804 TEXT, c805 TEXT,
++c806 TEXT, c807 TEXT, c808 TEXT, c809 TEXT, c810 TEXT, c811 TEXT, c812 TEXT,
++c813 TEXT, c814 TEXT, c815 TEXT, c816 TEXT, c817 TEXT, c818 TEXT, c819 TEXT,
++c820 TEXT, c821 TEXT, c822 TEXT, c823 TEXT, c824 TEXT, c825 TEXT, c826 TEXT,
++c827 TEXT, c828 TEXT, c829 TEXT, c830 TEXT, c831 TEXT, c832 TEXT, c833 TEXT,
++c834 TEXT, c835 TEXT, c836 TEXT, c837 TEXT, c838 TEXT, c839 TEXT, c840 TEXT,
++c841 TEXT, c842 TEXT, c843 TEXT, c844 TEXT, c845 TEXT, c846 TEXT, c847 TEXT,
++c848 TEXT, c849 TEXT, c850 TEXT, c851 TEXT, c852 TEXT, c853 TEXT, c854 TEXT,
++c855 TEXT, c856 TEXT, c857 TEXT, c858 TEXT, c859 TEXT, c860 TEXT, c861 TEXT,
++c862 TEXT, c863 TEXT, c864 TEXT, c865 TEXT, c866 TEXT, c867 TEXT, c868 TEXT,
++c869 TEXT, c870 TEXT, c871 TEXT, c872 TEXT, c873 TEXT, c874 TEXT, c875 TEXT,
++c876 TEXT, c877 TEXT, c878 TEXT, c879 TEXT, c880 TEXT, c881 TEXT, c882 TEXT,
++c883 TEXT, c884 TEXT, c885 TEXT, c886 TEXT, c887 TEXT, c888 TEXT, c889 TEXT,
++c890 TEXT, c891 TEXT, c892 TEXT, c893 TEXT, c894 TEXT, c895 TEXT, c896 TEXT,
++c897 TEXT, c898 TEXT, c899 TEXT, c900 TEXT, c901 TEXT, c902 TEXT, c903 TEXT,
++c904 TEXT, c905 TEXT, c906 TEXT, c907 TEXT, c908 TEXT, c909 TEXT, c910 TEXT,
++c911 TEXT, c912 TEXT, c913 TEXT, c914 TEXT, c915 TEXT, c916 TEXT, c917 TEXT,
++c918 TEXT, c919 TEXT, c920 TEXT, c921 TEXT, c922 TEXT, c923 TEXT, c924 TEXT,
++c925 TEXT, c926 TEXT, c927 TEXT, c928 TEXT, c929 TEXT, c930 TEXT, c931 TEXT,
++c932 TEXT, c933 TEXT, c934 TEXT, c935 TEXT, c936 TEXT, c937 TEXT, c938 TEXT,
++c939 TEXT, c940 TEXT, c941 TEXT, c942 TEXT, c943 TEXT, c944 TEXT, c945 TEXT,
++c946 TEXT, c947 TEXT, c948 TEXT, c949 TEXT, c950 TEXT, c951 TEXT, c952 TEXT,
++c953 TEXT, c954 TEXT, c955 TEXT, c956 TEXT, c957 TEXT, c958 TEXT, c959 TEXT,
++c960 TEXT, c961 TEXT, c962 TEXT, c963 TEXT, c964 TEXT, c965 TEXT, c966 TEXT,
++c967 TEXT, c968 TEXT, c969 TEXT, c970 TEXT, c971 TEXT, c972 TEXT, c973 TEXT,
++c974 TEXT, c975 TEXT, c976 TEXT, c977 TEXT, c978 TEXT, c979 TEXT, c980 TEXT,
++c981 TEXT, c982 TEXT, c983 TEXT, c984 TEXT, c985 TEXT, c986 TEXT, c987 TEXT,
++c988 TEXT, c989 TEXT, c990 TEXT, c991 TEXT, c992 TEXT, c993 TEXT, c994 TEXT,
++c995 TEXT, c996 TEXT, c997 TEXT, c998 TEXT, c999 TEXT, c1000 TEXT, c1001 TEXT,
++c1002 TEXT, c1003 TEXT, c1004 TEXT, c1005 TEXT, c1006 TEXT, c1007 TEXT, c1008 TEXT,
++c1009 TEXT, c1010 TEXT, c1011 TEXT, c1012 TEXT, c1013 TEXT, c1014 TEXT, c1015 TEXT,
++c1016 TEXT, c1017 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
++c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
++c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
++c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
++c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
++c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
++c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
++c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
++c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
++c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
++c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
++c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
++c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
++c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
++c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
++c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
++c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
++c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
++c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
++c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
++c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
++c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
++c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
++c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
++c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
++c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
++c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
++c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
++c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
++c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
++c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
++c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
++c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
++c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
++c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
++c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
++c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
++c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
++c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
++c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
++c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
++c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
++c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
++c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
++c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
++c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
++c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
++c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
++c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
++c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
++c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
++c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
++c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
++c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
++c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
++c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
++c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
++c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
++c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
++c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
++c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
++c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
++c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
++c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
++c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
++c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
++c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
++c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
++c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
++c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
++c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
++c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
++c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
++c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
++c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
++c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
++c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
++c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
++c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
++c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
++c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
++c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
++c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
++c771 TEXT, c772 TEXT, c773 TEXT, c774 TEXT, c775 TEXT, c776 TEXT, c777 TEXT,
++c778 TEXT, c779 TEXT, c780 TEXT, c781 TEXT, c782 TEXT, c783 TEXT, c784 TEXT,
++c785 TEXT, c786 TEXT, c787 TEXT, c788 TEXT, c789 TEXT, c790 TEXT, c791 TEXT,
++c792 TEXT, c793 TEXT, c794 TEXT, c795 TEXT, c796 TEXT, c797 TEXT, c798 TEXT,
++c799 TEXT, c800 TEXT, c801 TEXT, c802 TEXT, c803 TEXT, c804 TEXT, c805 TEXT,
++c806 TEXT, c807 TEXT, c808 TEXT, c809 TEXT, c810 TEXT, c811 TEXT, c812 TEXT,
++c813 TEXT, c814 TEXT, c815 TEXT, c816 TEXT, c817 TEXT, c818 TEXT, c819 TEXT,
++c820 TEXT, c821 TEXT, c822 TEXT, c823 TEXT, c824 TEXT, c825 TEXT, c826 TEXT,
++c827 TEXT, c828 TEXT, c829 TEXT, c830 TEXT, c831 TEXT, c832 TEXT, c833 TEXT,
++c834 TEXT, c835 TEXT, c836 TEXT, c837 TEXT, c838 TEXT, c839 TEXT, c840 TEXT,
++c841 TEXT, c842 TEXT, c843 TEXT, c844 TEXT, c845 TEXT, c846 TEXT, c847 TEXT,
++c848 TEXT, c849 TEXT, c850 TEXT, c851 TEXT, c852 TEXT, c853 TEXT, c854 TEXT,
++c855 TEXT, c856 TEXT, c857 TEXT, c858 TEXT, c859 TEXT, c860 TEXT, c861 TEXT,
++c862 TEXT, c863 TEXT, c864 TEXT, c865 TEXT, c866 TEXT, c867 TEXT, c868 TEXT,
++c869 TEXT, c870 TEXT, c871 TEXT, c872 TEXT, c873 TEXT, c874 TEXT, c875 TEXT,
++c876 TEXT, c877 TEXT, c878 TEXT, c879 TEXT, c880 TEXT, c881 TEXT, c882 TEXT,
++c883 TEXT, c884 TEXT, c885 TEXT, c886 TEXT, c887 TEXT, c888 TEXT, c889 TEXT,
++c890 TEXT, c891 TEXT, c892 TEXT, c893 TEXT, c894 TEXT, c895 TEXT, c896 TEXT,
++c897 TEXT, c898 TEXT, c899 TEXT, c900 TEXT, c901 TEXT, c902 TEXT, c903 TEXT,
++c904 TEXT, c905 TEXT, c906 TEXT, c907 TEXT, c908 TEXT, c909 TEXT, c910 TEXT,
++c911 TEXT, c912 TEXT, c913 TEXT, c914 TEXT, c915 TEXT, c916 TEXT, c917 TEXT,
++c918 TEXT, c919 TEXT, c920 TEXT, c921 TEXT, c922 TEXT, c923 TEXT, c924 TEXT,
++c925 TEXT, c926 TEXT, c927 TEXT, c928 TEXT, c929 TEXT, c930 TEXT, c931 TEXT,
++c932 TEXT, c933 TEXT, c934 TEXT, c935 TEXT, c936 TEXT, c937 TEXT, c938 TEXT,
++c939 TEXT, c940 TEXT, c941 TEXT, c942 TEXT, c943 TEXT, c944 TEXT, c945 TEXT,
++c946 TEXT, c947 TEXT, c948 TEXT, c949 TEXT, c950 TEXT, c951 TEXT, c952 TEXT,
++c953 TEXT, c954 TEXT, c955 TEXT, c956 TEXT, c957 TEXT, c958 TEXT, c959 TEXT,
++c960 TEXT, c961 TEXT, c962 TEXT, c963 TEXT, c964 TEXT, c965 TEXT, c966 TEXT,
++c967 TEXT, c968 TEXT, c969 TEXT, c970 TEXT, c971 TEXT, c972 TEXT, c973 TEXT,
++c974 TEXT, c975 TEXT, c976 TEXT, c977 TEXT, c978 TEXT, c979 TEXT, c980 TEXT,
++c981 TEXT, c982 TEXT, c983 TEXT, c984 TEXT, c985 TEXT, c986 TEXT, c987 TEXT,
++c988 TEXT, c989 TEXT, c990 TEXT, c991 TEXT, c992 TEXT, c993 TEXT, c994 TEXT,
++c995 TEXT, c996 TEXT, c997 TEXT, c998 TEXT, c999 TEXT, c1000 TEXT, c1001 TEXT,
++c1002 TEXT, c1003 TEXT, c1004 TEXT, c1005 TEXT, c1006 TEXT, c1007 TEXT, c1008 TEXT,
++c1009 TEXT, c1010 TEXT, c1011 TEXT, c1012 TEXT, c1013 TEXT, c1014 TEXT, c1015 TEXT,
++c1016 TEXT, c1017 TEXT, c1018 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 HY000: Can't create table `test`.`t1` (errno: 185 "Too many columns")
diff --git a/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff b/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff
new file mode 100644
index 00000000000..c324969fb21
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,64k,innodb,redundant.rdiff
@@ -0,0 +1,121 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 12:50:05.663724193 +0300
+@@ -3,45 +3,104 @@
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
++c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
++c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
++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),
++c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
++c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
++c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
++c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
++c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
++c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
++c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
++c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16382). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
++c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
++c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
++c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
++c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
++c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
++c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
++c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
++c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
++c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
++c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
++c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
++c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
++c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16382). 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large (> 16382). 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 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 16382). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff
new file mode 100644
index 00000000000..4db669a8aa6
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,compact,innodb.rdiff
@@ -0,0 +1,35 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 13:00:25.037261867 +0300
+@@ -12,7 +12,7 @@
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). 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 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+@@ -26,7 +26,7 @@
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). 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 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788)
+@@ -36,7 +36,7 @@
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). 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 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
+ ) ENGINE=INNODB;
+@@ -44,4 +44,4 @@
+ CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). 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.
diff --git a/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff
new file mode 100644
index 00000000000..5f79d77e7f9
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size,8k,dynamic,innodb.rdiff
@@ -0,0 +1,134 @@
+--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
++++ max_record_size.reject 2019-07-03 13:01:51.215756779 +0300
+@@ -12,7 +12,7 @@
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+@@ -26,22 +26,113 @@
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788)
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788)
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+-c5 VARCHAR(788), c6 VARCHAR(788)
+-) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
++c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
++c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
++c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
++c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
++c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
++c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
++c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
++c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
++c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
++c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
++c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
++c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
++c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
++c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
++c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
++c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
++c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
++c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
++c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
++c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
++) ENGINE=INNODB;
++ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
++CREATE TABLE t1 (
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT
+ ) ENGINE=INNODB;
+ DROP TABLE t1;
+ CREATE TABLE t1 (
+-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
++c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
++c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
++c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
++c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
++c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
++c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
++c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
++c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
++c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
++c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
++c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
++c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
++c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
++c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
++c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
++c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
++c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
++c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
++c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
++c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
++c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
++c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
++c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
++c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
++c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
++c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
++c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
++c190 TEXT
+ ) ENGINE=INNODB;
+-ERROR 42000: Row size too large (> 4027). 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 (> 4030). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
diff --git a/mysql-test/suite/innodb/r/max_record_size.result b/mysql-test/suite/innodb/r/max_record_size.result
new file mode 100644
index 00000000000..6eefd262937
--- /dev/null
+++ b/mysql-test/suite/innodb/r/max_record_size.result
@@ -0,0 +1,47 @@
+call mtr.add_suppression("Cannot add field `.*` in table `test`.`t1` because after adding it, the row size is");
+CREATE TABLE t1 (
+c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
+) ENGINE=INNODB;
+ERROR 42000: Row size too large (> 4027). 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 (
+c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
+) ENGINE=INNODB;
+ERROR 42000: Row size too large (> 4027). 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 (
+c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+c5 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+c5 VARCHAR(788), c6 VARCHAR(788)
+) ENGINE=INNODB;
+ERROR 42000: Row size too large (> 4027). 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 (
+c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+CREATE TABLE t1 (
+c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
+) ENGINE=INNODB;
+ERROR 42000: Row size too large (> 4027). 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.
diff --git a/mysql-test/suite/innodb/r/strict_mode.result b/mysql-test/suite/innodb/r/strict_mode.result
index 33afae708b4..7be5f961ccc 100644
--- a/mysql-test/suite/innodb/r/strict_mode.result
+++ b/mysql-test/suite/innodb/r/strict_mode.result
@@ -233,7 +233,162 @@ col224 text,
col225 text,
col226 text,
col227 text,
-col228 text
+col228 text,
+col229 text,
+col230 text,
+col231 text,
+col232 text,
+col233 text,
+col234 text,
+col235 text,
+col236 text,
+col237 text,
+col238 text,
+col239 text,
+col240 text,
+col241 text,
+col242 text,
+col243 text,
+col244 text,
+col245 text,
+col246 text,
+col247 text,
+col248 text,
+col249 text,
+col250 text,
+col251 text,
+col252 text,
+col253 text,
+col254 text,
+col255 text,
+col256 text,
+col257 text,
+col258 text,
+col259 text,
+col260 text,
+col261 text,
+col262 text,
+col263 text,
+col264 text,
+col265 text,
+col266 text,
+col267 text,
+col268 text,
+col269 text,
+col270 text,
+col271 text,
+col272 text,
+col273 text,
+col274 text,
+col275 text,
+col276 text,
+col277 text,
+col278 text,
+col279 text,
+col280 text,
+col281 text,
+col282 text,
+col283 text,
+col284 text,
+col285 text,
+col286 text,
+col287 text,
+col288 text,
+col289 text,
+col290 text,
+col291 text,
+col292 text,
+col293 text,
+col294 text,
+col295 text,
+col296 text,
+col297 text,
+col298 text,
+col299 text,
+col300 text,
+col301 text,
+col302 text,
+col303 text,
+col304 text,
+col305 text,
+col306 text,
+col307 text,
+col308 text,
+col309 text,
+col310 text,
+col311 text,
+col312 text,
+col313 text,
+col314 text,
+col315 text,
+col316 text,
+col317 text,
+col318 text,
+col319 text,
+col320 text,
+col321 text,
+col322 text,
+col323 text,
+col324 text,
+col325 text,
+col326 text,
+col327 text,
+col328 text,
+col329 text,
+col330 text,
+col331 text,
+col332 text,
+col333 text,
+col334 text,
+col335 text,
+col336 text,
+col337 text,
+col338 text,
+col339 text,
+col340 text,
+col341 text,
+col342 text,
+col343 text,
+col344 text,
+col345 text,
+col346 text,
+col347 text,
+col348 text,
+col349 text,
+col350 text,
+col351 text,
+col352 text,
+col353 text,
+col354 text,
+col355 text,
+col356 text,
+col357 text,
+col358 text,
+col359 text,
+col360 text,
+col361 text,
+col362 text,
+col363 text,
+col364 text,
+col365 text,
+col366 text,
+col367 text,
+col368 text,
+col369 text,
+col370 text,
+col371 text,
+col372 text,
+col373 text,
+col374 text,
+col375 text,
+col376 text,
+col377 text,
+col378 text,
+col379 text,
+col380 text,
+col381 text,
+col382 text,
+col383 text
) ENGINE=InnoDB;
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.
diff --git a/mysql-test/suite/innodb/r/trx_id_future.result b/mysql-test/suite/innodb/r/trx_id_future.result
new file mode 100644
index 00000000000..887d11ddcc2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/trx_id_future.result
@@ -0,0 +1,13 @@
+#
+# Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
+# IN THE FUTURE
+#
+CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
+INSERT INTO t1 VALUES(1);
+NOT FOUND /\[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum/ in mysqld.1.err
+call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+SELECT * FROM t1;
+a
+Warnings:
+Warning 1642 InnoDB: Transaction id in a record of table `test`.`t1` is newer than system-wide maximum.
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/undo_log.result b/mysql-test/suite/innodb/r/undo_log.result
index 6fe0da3da47..7892e26d896 100644
--- a/mysql-test/suite/innodb/r/undo_log.result
+++ b/mysql-test/suite/innodb/r/undo_log.result
@@ -1,3 +1,5 @@
+call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is");
+SET innodb_strict_mode=OFF;
CREATE TABLE test_tab (
a_str_18 mediumtext,
b_str_3 varchar(32) DEFAULT NULL,
@@ -123,6 +125,9 @@ KEY b_str_5 (b_str_5),
KEY b_str_31 (b_str_31),
KEY a_ref_11 (a_ref_11)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
+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.
+SET innodb_strict_mode=ON;
BEGIN;
INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES
('a', REPEAT('f',4031), REPEAT('g', 4031));
diff --git a/mysql-test/suite/innodb/t/alter_large_dml.opt b/mysql-test/suite/innodb/t/alter_large_dml.opt
new file mode 100644
index 00000000000..f6d3b8428c9
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_large_dml.opt
@@ -0,0 +1,2 @@
+--innodb_fatal_semaphore_wait_threshold=20
+--innodb_online_alter_log_max_size=536870912
diff --git a/mysql-test/suite/innodb/t/alter_large_dml.test b/mysql-test/suite/innodb/t/alter_large_dml.test
new file mode 100644
index 00000000000..5ab3f394115
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_large_dml.test
@@ -0,0 +1,53 @@
+--source include/big_test.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_sequence.inc
+
+CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
+ f4 char(200), f5 char(200), f6 char(200),
+ f7 char(200), f8 char(200))ENGINE=InnoDB;
+
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+
+SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL rebuilt WAIT_FOR dml_pause';
+SET DEBUG_SYNC = 'alter_table_inplace_before_lock_upgrade SIGNAL dml_restart WAIT_FOR dml_done';
+SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL ddl_start';
+--send
+ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
+
+--connect(con1,localhost,root,,test)
+SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
+BEGIN;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+SET DEBUG_SYNC = 'now SIGNAL dml_pause';
+SET DEBUG_SYNC = 'now WAIT_FOR dml_restart';
+ROLLBACK;
+
+BEGIN;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
+ROLLBACK;
+
+BEGIN;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+INSERT INTO t1 SELECT * FROM t1;
+ROLLBACK;
+
+SET DEBUG_SYNC = 'now SIGNAL dml_done';
+
+--connect(con2, localhost,root,,test)
+SET DEBUG_SYNC = 'now WAIT_FOR ddl_start';
+CREATE TABLE t2(f1 INT NOT NULL)ENGINE=InnoDB;
+
+connection default;
+reap;
+SHOW CREATE TABLE t1;
+
+SELECT COUNT(*) FROM t1;
+SET DEBUG_SYNC = 'RESET';
+DROP TABLE t1, t2;
diff --git a/mysql-test/suite/innodb/t/check_ibd_filesize.test b/mysql-test/suite/innodb/t/check_ibd_filesize.test
new file mode 100644
index 00000000000..92f9061a3f6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/check_ibd_filesize.test
@@ -0,0 +1,53 @@
+--source include/innodb_page_size.inc
+--source include/have_sequence.inc
+
+--echo #
+--echo # Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
+--echo # SPACE IN 5.7 THAN IN 5.6
+--echo #
+
+#
+# Table 1: small rows
+#
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+let MYSQLD_DATADIR=`select @@datadir`;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+
+INSERT INTO t1 SELECT * FROM seq_1_to_25000;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+DROP TABLE t1;
+
+#
+# Table 2: BLOB
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+DROP TABLE t1;
+
+let $page_size=`SELECT @@innodb_page_size`;
+if ($page_size < 32768)
+{
+#
+# Table 3: compressed BLOB
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
+ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
+perl;
+print "# bytes: ", (-s "$ENV{MYSQLD_DATADIR}/test/t1.ibd"), "\n";
+EOF
+DROP TABLE t1;
+}
diff --git a/mysql-test/suite/innodb/t/create_select.test b/mysql-test/suite/innodb/t/create_select.test
new file mode 100644
index 00000000000..8103902e5f6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/create_select.test
@@ -0,0 +1,28 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/count_sessions.inc
+
+let $ID= `SELECT @id := CONNECTION_ID()`;
+
+connect (con1, localhost, root,,);
+let $ignore= `SELECT @id := $ID`;
+
+connection default;
+send CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
+
+connection con1;
+let $wait_condition=
+ select count(*) = 1 from information_schema.processlist
+ where state = 'Sending data'
+ and info = 'CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000';
+--source include/wait_condition.inc
+KILL QUERY @id;
+disconnect con1;
+
+connection default;
+--error ER_QUERY_INTERRUPTED
+reap;
+
+CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
+DROP TABLE t1;
+--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test
index d83351ea7bf..89819ba7b6d 100644
--- a/mysql-test/suite/innodb/t/innodb-16k.test
+++ b/mysql-test/suite/innodb/t/innodb-16k.test
@@ -19,56 +19,6 @@ SELECT variable_value FROM information_schema.global_status
SET SESSION innodb_strict_mode = ON;
-# Redundant table; 8011 bytes with 40 char fields
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(211)
-) ROW_FORMAT=redundant;
-
-DROP TABLE t1;
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(212)
-) ROW_FORMAT=redundant;
-
-# Compact table; 8096 bytes with 40 CHAR fields
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
-) ROW_FORMAT=compact;
-
-DROP TABLE t1;
-
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
-) ROW_FORMAT=compact;
# Compressed table; 7959 bytes with 40 CHAR fields
CREATE TABLE t1 (
@@ -96,32 +46,6 @@ c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(160)
) ROW_FORMAT=compressed;
-# Dynamic table; 8096 bytes with 40 CHAR fields
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(246)
-) ROW_FORMAT=dynamic;
-
-DROP TABLE t1;
-
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(250), c40 char(247)
-) ROW_FORMAT=dynamic;
-
#
# Test the maximum key length
# Max Key Length is 3072 for 16k pages.
@@ -536,405 +460,3 @@ DROP TABLE t1;
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
DROP TABLE tlong;
DROP TABLE tlong2;
-
-SET SESSION innodb_strict_mode = on;
-
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t2(COL1 TEXT,
-COL2 TEXT,
-COL3 TEXT,
-COL4 TEXT,
-COL5 TEXT,
-COL6 TEXT,
-COL7 TEXT,
-COL8 TEXT,
-COL9 TEXT,
-COL10 TEXT,
-COL11 TEXT,
-COL12 TEXT,
-COL13 TEXT,
-COL14 TEXT,
-COL15 TEXT,
-COL16 TEXT,
-COL17 TEXT,
-COL18 TEXT,
-COL19 TEXT,
-COL20 TEXT,
-COL21 TEXT,
-COL22 TEXT,
-COL23 TEXT,
-COL24 TEXT,
-COL25 TEXT,
-COL26 TEXT,
-COL27 TEXT,
-COL28 TEXT,
-COL29 TEXT,
-COL30 TEXT,
-COL31 TEXT,
-COL32 TEXT,
-COL33 TEXT,
-COL34 TEXT,
-COL35 TEXT,
-COL36 TEXT,
-COL37 TEXT,
-COL38 TEXT,
-COL39 TEXT,
-COL40 TEXT,
-COL41 TEXT,
-COL42 TEXT,
-COL43 TEXT,
-COL44 TEXT,
-COL45 TEXT,
-COL46 TEXT,
-COL47 TEXT,
-COL48 TEXT,
-COL49 TEXT,
-COL50 TEXT,
-COL51 TEXT,
-COL52 TEXT,
-COL53 TEXT,
-COL54 TEXT,
-COL55 TEXT,
-COL56 TEXT,
-COL57 TEXT,
-COL58 TEXT,
-COL59 TEXT,
-COL60 TEXT,
-COL61 TEXT,
-COL62 TEXT,
-COL63 TEXT,
-COL64 TEXT,
-COL65 TEXT,
-COL66 TEXT,
-COL67 TEXT,
-COL68 TEXT,
-COL69 TEXT,
-COL70 TEXT,
-COL71 TEXT,
-COL72 TEXT,
-COL73 TEXT,
-COL74 TEXT,
-COL75 TEXT,
-COL76 TEXT,
-COL77 TEXT,
-COL78 TEXT,
-COL79 TEXT,
-COL80 TEXT,
-COL81 TEXT,
-COL82 TEXT,
-COL83 TEXT,
-COL84 TEXT,
-COL85 TEXT,
-COL86 TEXT,
-COL87 TEXT,
-COL88 TEXT,
-COL89 TEXT,
-COL90 TEXT,
-COL91 TEXT,
-COL92 TEXT,
-COL93 TEXT,
-COL94 TEXT,
-COL95 TEXT,
-COL96 TEXT,
-COL97 TEXT,
-COL98 TEXT,
-COL99 TEXT,
-COL100 TEXT,
-COL101 TEXT,
-COL102 TEXT,
-COL103 TEXT,
-COL104 TEXT,
-COL105 TEXT,
-COL106 TEXT,
-COL107 TEXT,
-COL108 TEXT,
-COL109 TEXT,
-COL110 TEXT,
-COL111 TEXT,
-COL112 TEXT,
-COL113 TEXT,
-COL114 TEXT,
-COL115 TEXT,
-COL116 TEXT,
-COL117 TEXT,
-COL118 TEXT,
-COL119 TEXT,
-COL120 TEXT,
-COL121 TEXT,
-COL122 TEXT,
-COL123 TEXT,
-COL124 TEXT,
-COL125 TEXT,
-COL126 TEXT,
-COL127 TEXT,
-COL128 TEXT,
-COL129 TEXT,
-COL130 TEXT,
-COL131 TEXT,
-COL132 TEXT,
-COL133 TEXT,
-COL134 TEXT,
-COL135 TEXT,
-COL136 TEXT,
-COL137 TEXT,
-COL138 TEXT,
-COL139 TEXT,
-COL140 TEXT,
-COL141 TEXT,
-COL142 TEXT,
-COL143 TEXT,
-COL144 TEXT,
-COL145 TEXT,
-COL146 TEXT,
-COL147 TEXT,
-COL148 TEXT,
-COL149 TEXT,
-COL150 TEXT,
-COL151 TEXT,
-COL152 TEXT,
-COL153 TEXT,
-COL154 TEXT,
-COL155 TEXT,
-COL156 TEXT,
-COL157 TEXT,
-COL158 TEXT,
-COL159 TEXT,
-COL160 TEXT,
-COL161 TEXT,
-COL162 TEXT,
-COL163 TEXT,
-COL164 TEXT,
-COL165 TEXT,
-COL166 TEXT,
-COL167 TEXT,
-COL168 TEXT,
-COL169 TEXT,
-COL170 TEXT,
-COL171 TEXT,
-COL172 TEXT,
-COL173 TEXT,
-COL174 TEXT,
-COL175 TEXT,
-COL176 TEXT,
-COL177 TEXT,
-COL178 TEXT,
-COL179 TEXT,
-COL180 TEXT,
-COL181 TEXT,
-COL182 TEXT,
-COL183 TEXT,
-COL184 TEXT,
-COL185 TEXT,
-COL186 TEXT,
-COL187 TEXT,
-COL188 TEXT,
-COL189 TEXT,
-COL190 TEXT,
-COL191 TEXT,
-COL192 TEXT,
-COL193 TEXT,
-COL194 TEXT,
-COL195 TEXT,
-COL196 TEXT,
-COL197 TEXT)
-row_format=dynamic,ENGINE=INNODB;
-
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t2(COL1 TEXT,
-COL2 TEXT,
-COL3 TEXT,
-COL4 TEXT,
-COL5 TEXT,
-COL6 TEXT,
-COL7 TEXT,
-COL8 TEXT,
-COL9 TEXT,
-COL10 TEXT,
-COL11 TEXT,
-COL12 TEXT,
-COL13 TEXT,
-COL14 TEXT,
-COL15 TEXT,
-COL16 TEXT,
-COL17 TEXT,
-COL18 TEXT,
-COL19 TEXT,
-COL20 TEXT,
-COL21 TEXT,
-COL22 TEXT,
-COL23 TEXT,
-COL24 TEXT,
-COL25 TEXT,
-COL26 TEXT,
-COL27 TEXT,
-COL28 TEXT,
-COL29 TEXT,
-COL30 TEXT,
-COL31 TEXT,
-COL32 TEXT,
-COL33 TEXT,
-COL34 TEXT,
-COL35 TEXT,
-COL36 TEXT,
-COL37 TEXT,
-COL38 TEXT,
-COL39 TEXT,
-COL40 TEXT,
-COL41 TEXT,
-COL42 TEXT,
-COL43 TEXT,
-COL44 TEXT,
-COL45 TEXT,
-COL46 TEXT,
-COL47 TEXT,
-COL48 TEXT,
-COL49 TEXT,
-COL50 TEXT,
-COL51 TEXT,
-COL52 TEXT,
-COL53 TEXT,
-COL54 TEXT,
-COL55 TEXT,
-COL56 TEXT,
-COL57 TEXT,
-COL58 TEXT,
-COL59 TEXT,
-COL60 TEXT,
-COL61 TEXT,
-COL62 TEXT,
-COL63 TEXT,
-COL64 TEXT,
-COL65 TEXT,
-COL66 TEXT,
-COL67 TEXT,
-COL68 TEXT,
-COL69 TEXT,
-COL70 TEXT,
-COL71 TEXT,
-COL72 TEXT,
-COL73 TEXT,
-COL74 TEXT,
-COL75 TEXT,
-COL76 TEXT,
-COL77 TEXT,
-COL78 TEXT,
-COL79 TEXT,
-COL80 TEXT,
-COL81 TEXT,
-COL82 TEXT,
-COL83 TEXT,
-COL84 TEXT,
-COL85 TEXT,
-COL86 TEXT,
-COL87 TEXT,
-COL88 TEXT,
-COL89 TEXT,
-COL90 TEXT,
-COL91 TEXT,
-COL92 TEXT,
-COL93 TEXT,
-COL94 TEXT,
-COL95 TEXT,
-COL96 TEXT,
-COL97 TEXT,
-COL98 TEXT,
-COL99 TEXT,
-COL100 TEXT,
-COL101 TEXT,
-COL102 TEXT,
-COL103 TEXT,
-COL104 TEXT,
-COL105 TEXT,
-COL106 TEXT,
-COL107 TEXT,
-COL108 TEXT,
-COL109 TEXT,
-COL110 TEXT,
-COL111 TEXT,
-COL112 TEXT,
-COL113 TEXT,
-COL114 TEXT,
-COL115 TEXT,
-COL116 TEXT,
-COL117 TEXT,
-COL118 TEXT,
-COL119 TEXT,
-COL120 TEXT,
-COL121 TEXT,
-COL122 TEXT,
-COL123 TEXT,
-COL124 TEXT,
-COL125 TEXT,
-COL126 TEXT,
-COL127 TEXT,
-COL128 TEXT,
-COL129 TEXT,
-COL130 TEXT,
-COL131 TEXT,
-COL132 TEXT,
-COL133 TEXT,
-COL134 TEXT,
-COL135 TEXT,
-COL136 TEXT,
-COL137 TEXT,
-COL138 TEXT,
-COL139 TEXT,
-COL140 TEXT,
-COL141 TEXT,
-COL142 TEXT,
-COL143 TEXT,
-COL144 TEXT,
-COL145 TEXT,
-COL146 TEXT,
-COL147 TEXT,
-COL148 TEXT,
-COL149 TEXT,
-COL150 TEXT,
-COL151 TEXT,
-COL152 TEXT,
-COL153 TEXT,
-COL154 TEXT,
-COL155 TEXT,
-COL156 TEXT,
-COL157 TEXT,
-COL158 TEXT,
-COL159 TEXT,
-COL160 TEXT,
-COL161 TEXT,
-COL162 TEXT,
-COL163 TEXT,
-COL164 TEXT,
-COL165 TEXT,
-COL166 TEXT,
-COL167 TEXT,
-COL168 TEXT,
-COL169 TEXT,
-COL170 TEXT,
-COL171 TEXT,
-COL172 TEXT,
-COL173 TEXT,
-COL174 TEXT,
-COL175 TEXT,
-COL176 TEXT,
-COL177 TEXT,
-COL178 TEXT,
-COL179 TEXT,
-COL180 TEXT,
-COL181 TEXT,
-COL182 TEXT,
-COL183 TEXT,
-COL184 TEXT,
-COL185 TEXT,
-COL186 TEXT,
-COL187 TEXT,
-COL188 TEXT,
-COL189 TEXT,
-COL190 TEXT,
-COL191 TEXT,
-COL192 TEXT,
-COL193 TEXT,
-COL194 TEXT,
-COL195 TEXT,
-COL196 TEXT,
-COL197 TEXT)
-row_format=compact,ENGINE=INNODB;
diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test
index b510c115dab..da6d91f351e 100644
--- a/mysql-test/suite/innodb/t/innodb-32k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test
@@ -5,6 +5,8 @@
let $MYSQLD_DATADIR= `select @@datadir`;
+call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is");
+
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,
@@ -15,6 +17,7 @@ CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET innodb_strict_mode=OFF;
CREATE TABLE t2(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,
@@ -24,6 +27,7 @@ CREATE TABLE t2(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
oa blob,pa blob,qa blob,ra blob,sa blob,ta blob,ua blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=compact;
+SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test
index a0e314aea03..a9645d65998 100644
--- a/mysql-test/suite/innodb/t/innodb-32k.test
+++ b/mysql-test/suite/innodb/t/innodb-32k.test
@@ -19,97 +19,6 @@ SELECT variable_value FROM information_schema.global_status
SET SESSION innodb_strict_mode = ON;
-# Redundant table; 16121 bytes with 81 char fields
-
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(121)
-) ROW_FORMAT=redundant;
-
-DROP TABLE t1;
-
---replace_regex /> [0-9]*/> max_row_size/
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(122)
-) ROW_FORMAT=redundant;
-
-# Compact table; 16282 bytes with 82 CHAR fields
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(82)
-) ROW_FORMAT=compact;
-
-DROP TABLE t1;
-
---replace_regex /> [0-9]*/> max_row_size/
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(83)
-) ROW_FORMAT=compact;
-
--replace_regex /> [0-9]*/> max_row_size/
--error 1005
CREATE TABLE t1 (
@@ -132,50 +41,6 @@ c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(63)
) ROW_FORMAT=compressed;
-# Dynamic table; 16282 bytes with 82 CHAR fields
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
-c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
-c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
-c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
-c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(82)
-) ROW_FORMAT=dynamic;
-
-DROP TABLE t1;
-
---replace_regex /> [0-9]*/> max_row_size/
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE t1 (
-c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
-c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
-c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
-c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(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(200),
-c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
-c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
-c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
-c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
-c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
-c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
-c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
-c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
-c81 char(200), c82 char(83)
-) ROW_FORMAT=dynamic;
#
# Test the maximum key length
diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test
index 950c1752ccd..cbec1a452c7 100644
--- a/mysql-test/suite/innodb/t/innodb-64k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test
@@ -5,6 +5,8 @@
let $MYSQLD_DATADIR= `select @@datadir`;
+call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is");
+
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,
@@ -23,6 +25,7 @@ CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=dynamic;
+SET innodb_strict_mode=OFF;
CREATE TABLE t2(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,
@@ -40,6 +43,7 @@ CREATE TABLE t2(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
oc blob, pc blob, qc blob, rc blob, sc blob,tc blob,uc blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=compact;
+SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.opt b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
new file mode 100644
index 00000000000..b5a61b9ec4b
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.opt
@@ -0,0 +1,10 @@
+--innodb
+--innodb-sys-tablespaces
+--innodb-sys-datafiles
+--innodb-sys-tablestats
+--innodb-sys-tables
+--innodb-sys-columns
+--innodb-sys-indexes
+--innodb-sys-fields
+--innodb-sys-foreign
+--innodb-sys-foreign-cols
diff --git a/mysql-test/suite/innodb/t/innodb-system-table-view.test b/mysql-test/suite/innodb/t/innodb-system-table-view.test
new file mode 100644
index 00000000000..087c0a22eca
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-system-table-view.test
@@ -0,0 +1,136 @@
+# This is the test for Information Schema System Table View
+# that displays the InnoDB system table content through
+# information schema tables.
+
+--source include/innodb_page_size_small.inc
+
+LET $MYSQLD_DATADIR = `select @@datadir`;
+LET $INNODB_PAGE_SIZE = `select @@innodb_page_size`;
+
+# The IDs of mysql.innodb_table_stats and mysql.innodb_index_stats may
+# vary depending on whether the tables have been rebuilt
+# by previously run tests.
+SELECT table_id INTO @table_stats_id FROM information_schema.innodb_sys_tables
+WHERE name = 'mysql/innodb_table_stats';
+SELECT table_id INTO @index_stats_id FROM information_schema.innodb_sys_tables
+WHERE name = 'mysql/innodb_index_stats';
+
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY table_id;
+
+SELECT table_id,pos,mtype,prtype,len,name
+FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id)
+ORDER BY table_id, pos;
+
+--replace_column 1 # 3 # 6 # 7 #
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY index_id;
+
+SELECT index_id,pos,name FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS
+WHERE name NOT IN ('database_name', 'table_name', 'index_name', 'stat_name')
+ORDER BY index_id, pos;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+
+CREATE TABLE t_redundant (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
+CREATE TABLE t_compact (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
+CREATE TABLE t_compressed (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb KEY_BLOCK_SIZE=2;
+CREATE TABLE t_dynamic (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
+
+--source suite/innodb/include/show_i_s_tables.inc
+--source suite/innodb/include/show_i_s_tablespaces.inc
+
+DROP TABLE t_redundant, t_compact, t_compressed, t_dynamic;
+
+SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
+
+# Create a foreign key constraint, and verify the information
+# in INFORMATION_SCHEMA.INNODB_SYS_FOREIGN and
+# INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS
+CREATE TABLE parent (id INT NOT NULL,
+ PRIMARY KEY (id)) ENGINE=INNODB;
+
+CREATE TABLE child (id INT, parent_id INT,
+ INDEX par_ind (parent_id),
+ CONSTRAINT constraint_test
+ FOREIGN KEY (parent_id) REFERENCES parent(id)
+ ON DELETE CASCADE) ENGINE=INNODB;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+
+# Insert a row in the table "parent", and see whether that reflected in
+# INNODB_SYS_TABLESTATS
+INSERT INTO parent VALUES(1);
+
+--sorted_result
+SELECT name, num_rows, ref_count
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name LIKE "%parent";
+
+--sorted_result
+SELECT NAME, FLAG, N_COLS FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
+ WHERE name NOT LIKE 'sys/%';
+
+--sorted_result
+SELECT name, n_fields
+from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id In (SELECT table_id from
+ INFORMATION_SCHEMA.INNODB_SYS_TABLES
+ WHERE name LIKE "%parent%");
+
+--sorted_result
+SELECT name, n_fields
+from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
+WHERE table_id In (SELECT table_id from
+ INFORMATION_SCHEMA.INNODB_SYS_TABLES
+ WHERE name LIKE "%child%");
+
+--sorted_result
+SELECT name, pos, mtype, len
+from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
+WHERE table_id In (SELECT table_id from
+ INFORMATION_SCHEMA.INNODB_SYS_TABLES
+ WHERE name LIKE "%child%");
+
+DROP TABLE child;
+
+DROP TABLE parent;
+
+# Create table with 2 columns in the foreign key constraint
+CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL,
+ PRIMARY KEY (id, newid)) ENGINE=INNODB;
+
+CREATE TABLE child (id INT, parent_id INT,
+ INDEX par_ind (parent_id),
+ CONSTRAINT constraint_test
+ FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid)
+ ON DELETE CASCADE) ENGINE=INNODB;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
+
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
+
+INSERT INTO parent VALUES(1, 9);
+
+# Nested query will open the table handle twice
+--sorted_result
+SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
+
+--sorted_result
+SELECT name, num_rows, ref_count
+FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
+WHERE name LIKE "%parent";
+
+DROP TABLE child;
+
+DROP TABLE parent;
diff --git a/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test b/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test
new file mode 100644
index 00000000000..6de43dd80f8
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test
@@ -0,0 +1,27 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+
+#
+# MDEV-17005 ASAN heap-use-after-free in innobase_get_computed_value
+#
+CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB;
+
+INSERT INTO t1 () VALUES (),();
+--connect (con1,localhost,root,,test)
+ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY;
+SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open";
+--send
+DELETE FROM t1;
+--connection default
+SET debug_sync= "now WAIT_FOR delete_open";
+SET debug_sync= "ib_open_after_dict_open SIGNAL another_open";
+SELECT a FROM t1;
+--connection con1
+--reap
+
+# Cleanup
+--disconnect con1
+--connection default
+SET debug_sync= "RESET";
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-debug.test b/mysql-test/suite/innodb/t/innodb-wl5980-debug.test
new file mode 100644
index 00000000000..2c5e2b48870
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-wl5980-debug.test
@@ -0,0 +1,51 @@
+#
+# This testcase is to check the various debug injection points
+# to make sure error conditions react corectly and acheive
+# better code coverage.
+#
+
+# Not supported in embedded
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_innodb.inc
+
+# These messages are expected in the log
+call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache");
+call mtr.add_suppression("Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'.");
+
+# Set up some variables
+LET $MYSQL_DATA_DIR = `select @@datadir`;
+LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
+--enable_query_log
+
+--echo #
+--echo # WL5980 Remote tablespace debug error injection tests.
+--echo #
+
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb $data_directory_clause ;
+INSERT INTO t1 VALUES (1, 'tablespace');
+SELECT * FROM t1;
+
+--echo #
+--echo # Test the second injection point in fil_rename_tablespace().
+--echo # Make sure the table is useable after this failure.
+--echo #
+SET @save_dbug=@@debug_dbug;
+SET debug_dbug="+d,fil_rename_tablespace_failure_2";
+--disable_result_log
+--error ER_ERROR_ON_RENAME
+RENAME TABLE t1 TO t2;
+--enable_result_log
+SET debug_dbug=@save_dbug;
+INSERT INTO t1 VALUES (2, 'tablespace');
+SELECT * FROM t1;
+
+--echo #
+--echo # Cleanup
+--echo #
+
+DROP TABLE t1;
+
+--rmdir $MYSQL_TMP_DIR/alt_dir/test
+--rmdir $MYSQL_TMP_DIR/alt_dir
diff --git a/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test b/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test
index aa816a9b0e8..5041612bec1 100644
--- a/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test
+++ b/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test
@@ -8,53 +8,6 @@ SELECT @@innodb_page_size;
SET innodb_strict_mode=ON;
-# Check the error when the max record length > 16K for innodb_page_size=32k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT= COMPACT;
-
-# Check the error when the max record length > 16K for innodb_page_size=32k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT= DYNAMIC;
-show warnings;
-
-# Check the error when the max record length > 16K for innodb_page_size=32k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT=REDUNDANT;
-show warnings;
-
# FIXED not supported
-- error 1005
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
diff --git a/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test b/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test
index 598cc3d77bf..5b06b57d4b4 100644
--- a/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test
+++ b/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test
@@ -8,76 +8,6 @@ SELECT @@innodb_page_size;
SET innodb_strict_mode=ON;
-# Check the error when the max record length > 32K for innodb_page_size=64k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
-ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
-ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
-ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
-ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
-ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
-ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
-ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
-ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
-ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
-ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
-ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
-)
-ENGINE = innodb ROW_FORMAT= COMPACT;
-
-# Check the error when the max record length > 16K for innodb_page_size=64k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
-ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
-ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
-ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
-ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
-ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
-ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
-ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
-ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
-ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
-ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
-ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
-)
-ENGINE = innodb ROW_FORMAT= DYNAMIC;
-
-# Check the error when the max record length > 16K for innodb_page_size=64k
---error ER_TOO_BIG_ROWSIZE
-CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
-col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
-col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
-col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
-col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
-col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
-col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
-col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
-col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
-col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
-col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
-ENGINE = innodb ROW_FORMAT=REDUNDANT;
-show warnings;
-
# FIXED not supported
-- error 1005
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
diff --git a/mysql-test/suite/innodb/t/instant_alter.test b/mysql-test/suite/innodb/t/instant_alter.test
index 71c4e22de2f..dc6fe45fa69 100644
--- a/mysql-test/suite/innodb/t/instant_alter.test
+++ b/mysql-test/suite/innodb/t/instant_alter.test
@@ -4,6 +4,8 @@
--echo # MDEV-11369: Instant ADD COLUMN for InnoDB
--echo #
+call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
+
let $format= `SELECT CASE WHEN @@GLOBAL.innodb_page_size>16384
THEN 'DYNAMIC' ELSE 'COMPRESSED' END`;
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
@@ -226,6 +228,7 @@ ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL;
INSERT INTO t3 SET id=4;
INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1;
+SET innodb_strict_mode = OFF;
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
--disable_info
@@ -233,6 +236,7 @@ INSERT INTO t3 SET id=5, c2=9;
SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8, phrase, b FROM t3;
--enable_info
ALTER TABLE t3 DROP c3, DROP c7;
+SET innodb_strict_mode = OFF;
--disable_info
SELECT * FROM t3;
diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test
index e66ddcb5688..3cf3de54ba5 100644
--- a/mysql-test/suite/innodb/t/instant_alter_bugs.test
+++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test
@@ -134,6 +134,24 @@ HANDLER h READ `PRIMARY` PREV WHERE 0;
# Cleanup
HANDLER h CLOSE;
DROP TABLE t1;
+
+# MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys which are pointed
+# to the table being altered
+CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb;
+CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL,
+ status ENUM ('a', 'b', 'c'), INDEX idx1(f2),
+ PRIMARY KEY(f1),
+ FOREIGN KEY (f2) REFERENCES t1(f1))ENGINE=InnoDB;
+
+ALTER TABLE t1 CHANGE f1 f1_id INT NOT NULL, ADD f3 VARCHAR(255) DEFAULT NULL;
+ALTER TABLE t1 CHANGE f1_id f1 INT NOT NULL;
+
+SHOW CREATE TABLE t1;
+SHOW CREATE TABLE t2;
+
+ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL;
+DROP TABLE t2, t1;
+
--let $datadir= `select @@datadir`
--remove_file $datadir/test/load.data
diff --git a/mysql-test/suite/innodb/t/max_record_size.test b/mysql-test/suite/innodb/t/max_record_size.test
new file mode 100644
index 00000000000..f21ff923344
--- /dev/null
+++ b/mysql-test/suite/innodb/t/max_record_size.test
@@ -0,0 +1,1422 @@
+--source include/have_innodb.inc
+--source include/innodb_page_size.inc
+--source include/innodb_row_format.inc
+
+--let $row_format= `SELECT @@GLOBAL.innodb_default_row_format`
+--let $page_size= `SELECT @@GLOBAL.innodb_page_size`
+
+call mtr.add_suppression("Cannot add field `.*` in table `test`.`t1` because after adding it, the row size is");
+
+
+if ($page_size == 4096) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255)
+) ENGINE=INNODB;
+}
+
+
+if ($page_size == 8192) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
+) ENGINE=INNODB;
+}
+
+
+if ($page_size == 16384) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255)
+) ENGINE=INNODB;
+}
+
+
+if ($page_size == 32768) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+) ENGINE=INNODB;
+}
+
+
+if ($row_format == 'redundant') { if ($page_size == 65536) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255)
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format != 'redundant') { if ($page_size == 65536) {
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
+ c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
+ c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
+ c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
+ c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
+ c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
+ c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
+ c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
+ c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
+ c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
+ c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
+ c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
+ c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
+ c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
+ c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
+ c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
+ c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
+ c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
+ c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
+ c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+ c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+ 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),
+ c33 CHAR(255), c34 CHAR(255), c35 CHAR(255), c36 CHAR(255),
+ c37 CHAR(255), c38 CHAR(255), c39 CHAR(255), c40 CHAR(255),
+ c41 CHAR(255), c42 CHAR(255), c43 CHAR(255), c44 CHAR(255),
+ c45 CHAR(255), c46 CHAR(255), c47 CHAR(255), c48 CHAR(255),
+ c49 CHAR(255), c50 CHAR(255), c51 CHAR(255), c52 CHAR(255),
+ c53 CHAR(255), c54 CHAR(255), c55 CHAR(255), c56 CHAR(255),
+ c57 CHAR(255), c58 CHAR(255), c59 CHAR(255), c60 CHAR(255),
+ c61 CHAR(255), c62 CHAR(255), c63 CHAR(255), c64 CHAR(255),
+ c65 CHAR(255), c66 CHAR(255), c67 CHAR(255), c68 CHAR(255),
+ c69 CHAR(255), c70 CHAR(255), c71 CHAR(255), c72 CHAR(255),
+ c73 CHAR(255), c74 CHAR(255), c75 CHAR(255), c76 CHAR(255),
+ c77 CHAR(255), c78 CHAR(255), c79 CHAR(255), c80 CHAR(255),
+ c81 CHAR(255), c82 CHAR(255), c83 CHAR(255), c84 CHAR(255),
+ c85 CHAR(255), c86 CHAR(255), c87 CHAR(255), c88 CHAR(255),
+ c89 CHAR(255), c90 CHAR(255), c91 CHAR(255), c92 CHAR(255),
+ c93 CHAR(255), c94 CHAR(255), c95 CHAR(255), c96 CHAR(255),
+ c97 CHAR(255), c98 CHAR(255), c99 CHAR(255), c100 CHAR(255),
+ c101 CHAR(255), c102 CHAR(255), c103 CHAR(255), c104 CHAR(255),
+ c105 CHAR(255), c106 CHAR(255), c107 CHAR(255), c108 CHAR(255),
+ c109 CHAR(255), c110 CHAR(255), c111 CHAR(255), c112 CHAR(255),
+ c113 CHAR(255), c114 CHAR(255), c115 CHAR(255), c116 CHAR(255),
+ c117 CHAR(255), c118 CHAR(255), c119 CHAR(255), c120 CHAR(255),
+ c121 CHAR(255), c122 CHAR(255), c123 CHAR(255), c124 CHAR(255),
+ c125 CHAR(255), c126 CHAR(255), c127 CHAR(255), c128 CHAR(255),
+ c129 CHAR(255)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
+ c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
+ c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
+ c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
+ c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
+ c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
+ c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
+ c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
+ c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
+ c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
+ c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
+ c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
+ c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
+ c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
+ c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
+ c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
+ c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
+ c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
+ c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
+ c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+ c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+ c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+ c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+ c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255),
+ c33 VARCHAR(255), c34 VARCHAR(255), c35 VARCHAR(255), c36 VARCHAR(255),
+ c37 VARCHAR(255), c38 VARCHAR(255), c39 VARCHAR(255), c40 VARCHAR(255),
+ c41 VARCHAR(255), c42 VARCHAR(255), c43 VARCHAR(255), c44 VARCHAR(255),
+ c45 VARCHAR(255), c46 VARCHAR(255), c47 VARCHAR(255), c48 VARCHAR(255),
+ c49 VARCHAR(255), c50 VARCHAR(255), c51 VARCHAR(255), c52 VARCHAR(255),
+ c53 VARCHAR(255), c54 VARCHAR(255), c55 VARCHAR(255), c56 VARCHAR(255),
+ c57 VARCHAR(255), c58 VARCHAR(255), c59 VARCHAR(255), c60 VARCHAR(255),
+ c61 VARCHAR(255), c62 VARCHAR(255), c63 VARCHAR(255), c64 VARCHAR(255),
+ c65 VARCHAR(255), c66 VARCHAR(255), c67 VARCHAR(255), c68 VARCHAR(255),
+ c69 VARCHAR(255), c70 VARCHAR(255), c71 VARCHAR(255), c72 VARCHAR(255),
+ c73 VARCHAR(255), c74 VARCHAR(255), c75 VARCHAR(255), c76 VARCHAR(255),
+ c77 VARCHAR(255), c78 VARCHAR(255), c79 VARCHAR(255), c80 VARCHAR(255),
+ c81 VARCHAR(255), c82 VARCHAR(255), c83 VARCHAR(255), c84 VARCHAR(255),
+ c85 VARCHAR(255), c86 VARCHAR(255), c87 VARCHAR(255), c88 VARCHAR(255),
+ c89 VARCHAR(255), c90 VARCHAR(255), c91 VARCHAR(255), c92 VARCHAR(255),
+ c93 VARCHAR(255), c94 VARCHAR(255), c95 VARCHAR(255), c96 VARCHAR(255),
+ c97 VARCHAR(255), c98 VARCHAR(255), c99 VARCHAR(255), c100 VARCHAR(255),
+ c101 VARCHAR(255), c102 VARCHAR(255), c103 VARCHAR(255), c104 VARCHAR(255),
+ c105 VARCHAR(255), c106 VARCHAR(255), c107 VARCHAR(255), c108 VARCHAR(255),
+ c109 VARCHAR(255), c110 VARCHAR(255), c111 VARCHAR(255), c112 VARCHAR(255),
+ c113 VARCHAR(255), c114 VARCHAR(255), c115 VARCHAR(255), c116 VARCHAR(255),
+ c117 VARCHAR(255), c118 VARCHAR(255), c119 VARCHAR(255), c120 VARCHAR(255),
+ c121 VARCHAR(255), c122 VARCHAR(255), c123 VARCHAR(255), c124 VARCHAR(255),
+ c125 VARCHAR(255), c126 VARCHAR(255), c127 VARCHAR(255), c128 VARCHAR(255)
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format != 'dynamic') { if ($page_size == 4096) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format != 'dynamic') { if ($page_size == 8192) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format != 'dynamic') { if ($page_size == 16384) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format != 'dynamic') { if ($page_size == 32768) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'redundant') { if ($page_size == 65536) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'compact') { if ($page_size == 65536) {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
+ c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
+ c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
+ c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
+ c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
+ c41 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
+ c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
+ c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
+ c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
+ c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
+ c41 VARCHAR(788), c42 VARCHAR(788)
+) ENGINE=INNODB;
+
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'dynamic') {
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
+ c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
+ c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
+ c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
+ c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
+ c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
+ c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
+ c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
+ c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
+ c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
+ c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
+ c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
+ c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
+ c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
+ c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
+ c81 VARCHAR(788), c82 VARCHAR(788)
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
+ c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+ c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788), c12 VARCHAR(788),
+ c13 VARCHAR(788), c14 VARCHAR(788), c15 VARCHAR(788), c16 VARCHAR(788),
+ c17 VARCHAR(788), c18 VARCHAR(788), c19 VARCHAR(788), c20 VARCHAR(788),
+ c21 VARCHAR(788), c22 VARCHAR(788), c23 VARCHAR(788), c24 VARCHAR(788),
+ c25 VARCHAR(788), c26 VARCHAR(788), c27 VARCHAR(788), c28 VARCHAR(788),
+ c29 VARCHAR(788), c30 VARCHAR(788), c31 VARCHAR(788), c32 VARCHAR(788),
+ c33 VARCHAR(788), c34 VARCHAR(788), c35 VARCHAR(788), c36 VARCHAR(788),
+ c37 VARCHAR(788), c38 VARCHAR(788), c39 VARCHAR(788), c40 VARCHAR(788),
+ c41 VARCHAR(788), c42 VARCHAR(788), c43 VARCHAR(788), c44 VARCHAR(788),
+ c45 VARCHAR(788), c46 VARCHAR(788), c47 VARCHAR(788), c48 VARCHAR(788),
+ c49 VARCHAR(788), c50 VARCHAR(788), c51 VARCHAR(788), c52 VARCHAR(788),
+ c53 VARCHAR(788), c54 VARCHAR(788), c55 VARCHAR(788), c56 VARCHAR(788),
+ c57 VARCHAR(788), c58 VARCHAR(788), c59 VARCHAR(788), c60 VARCHAR(788),
+ c61 VARCHAR(788), c62 VARCHAR(788), c63 VARCHAR(788), c64 VARCHAR(788),
+ c65 VARCHAR(788), c66 VARCHAR(788), c67 VARCHAR(788), c68 VARCHAR(788),
+ c69 VARCHAR(788), c70 VARCHAR(788), c71 VARCHAR(788), c72 VARCHAR(788),
+ c73 VARCHAR(788), c74 VARCHAR(788), c75 VARCHAR(788), c76 VARCHAR(788),
+ c77 VARCHAR(788), c78 VARCHAR(788), c79 VARCHAR(788), c80 VARCHAR(788),
+ c81 VARCHAR(788), c82 VARCHAR(788), c83 VARCHAR(788)
+) ENGINE=INNODB;
+}
+
+
+if ($row_format == 'dynamic') { if ($page_size == 4096) {
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'dynamic') { if ($page_size == 8192) {
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'dynamic') { if ($page_size == 16384) {
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'dynamic') { if ($page_size == 32768) {
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
+ c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
+ c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
+ c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
+ c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
+ c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
+ c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
+ c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
+ c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
+ c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
+ c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
+ c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
+ c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
+ c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
+ c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
+ c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
+ c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
+ c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
+ c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
+ c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
+ c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
+ c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
+ c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
+ c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
+ c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
+ c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
+ c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
+ c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
+ c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
+ c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
+ c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
+ c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
+ c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
+ c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
+ c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
+ c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
+ c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
+ c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
+ c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
+ c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
+ c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
+ c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
+ c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
+ c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
+ c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
+ c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
+ c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
+ c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
+ c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
+ c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
+ c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
+ c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
+ c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
+ c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
+ c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
+ c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
+ c771 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_TOO_BIG_ROWSIZE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
+ c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
+ c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
+ c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
+ c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
+ c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
+ c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
+ c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
+ c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
+ c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
+ c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
+ c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
+ c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
+ c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
+ c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
+ c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
+ c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
+ c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
+ c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
+ c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
+ c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
+ c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
+ c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
+ c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
+ c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
+ c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
+ c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
+ c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
+ c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
+ c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
+ c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
+ c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
+ c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
+ c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
+ c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
+ c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
+ c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
+ c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
+ c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
+ c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
+ c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
+ c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
+ c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
+ c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
+ c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
+ c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
+ c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
+ c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
+ c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
+ c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
+ c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
+ c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
+ c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
+ c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
+ c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
+ c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
+ c771 TEXT, c772 TEXT
+) ENGINE=INNODB;
+} }
+
+
+if ($row_format == 'dynamic') { if ($page_size == 65536) {
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
+ c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
+ c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
+ c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
+ c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
+ c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
+ c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
+ c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
+ c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
+ c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
+ c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
+ c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
+ c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
+ c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
+ c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
+ c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
+ c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
+ c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
+ c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
+ c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
+ c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
+ c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
+ c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
+ c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
+ c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
+ c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
+ c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
+ c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
+ c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
+ c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
+ c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
+ c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
+ c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
+ c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
+ c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
+ c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
+ c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
+ c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
+ c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
+ c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
+ c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
+ c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
+ c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
+ c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
+ c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
+ c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
+ c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
+ c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
+ c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
+ c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
+ c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
+ c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
+ c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
+ c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
+ c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
+ c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
+ c771 TEXT, c772 TEXT, c773 TEXT, c774 TEXT, c775 TEXT, c776 TEXT, c777 TEXT,
+ c778 TEXT, c779 TEXT, c780 TEXT, c781 TEXT, c782 TEXT, c783 TEXT, c784 TEXT,
+ c785 TEXT, c786 TEXT, c787 TEXT, c788 TEXT, c789 TEXT, c790 TEXT, c791 TEXT,
+ c792 TEXT, c793 TEXT, c794 TEXT, c795 TEXT, c796 TEXT, c797 TEXT, c798 TEXT,
+ c799 TEXT, c800 TEXT, c801 TEXT, c802 TEXT, c803 TEXT, c804 TEXT, c805 TEXT,
+ c806 TEXT, c807 TEXT, c808 TEXT, c809 TEXT, c810 TEXT, c811 TEXT, c812 TEXT,
+ c813 TEXT, c814 TEXT, c815 TEXT, c816 TEXT, c817 TEXT, c818 TEXT, c819 TEXT,
+ c820 TEXT, c821 TEXT, c822 TEXT, c823 TEXT, c824 TEXT, c825 TEXT, c826 TEXT,
+ c827 TEXT, c828 TEXT, c829 TEXT, c830 TEXT, c831 TEXT, c832 TEXT, c833 TEXT,
+ c834 TEXT, c835 TEXT, c836 TEXT, c837 TEXT, c838 TEXT, c839 TEXT, c840 TEXT,
+ c841 TEXT, c842 TEXT, c843 TEXT, c844 TEXT, c845 TEXT, c846 TEXT, c847 TEXT,
+ c848 TEXT, c849 TEXT, c850 TEXT, c851 TEXT, c852 TEXT, c853 TEXT, c854 TEXT,
+ c855 TEXT, c856 TEXT, c857 TEXT, c858 TEXT, c859 TEXT, c860 TEXT, c861 TEXT,
+ c862 TEXT, c863 TEXT, c864 TEXT, c865 TEXT, c866 TEXT, c867 TEXT, c868 TEXT,
+ c869 TEXT, c870 TEXT, c871 TEXT, c872 TEXT, c873 TEXT, c874 TEXT, c875 TEXT,
+ c876 TEXT, c877 TEXT, c878 TEXT, c879 TEXT, c880 TEXT, c881 TEXT, c882 TEXT,
+ c883 TEXT, c884 TEXT, c885 TEXT, c886 TEXT, c887 TEXT, c888 TEXT, c889 TEXT,
+ c890 TEXT, c891 TEXT, c892 TEXT, c893 TEXT, c894 TEXT, c895 TEXT, c896 TEXT,
+ c897 TEXT, c898 TEXT, c899 TEXT, c900 TEXT, c901 TEXT, c902 TEXT, c903 TEXT,
+ c904 TEXT, c905 TEXT, c906 TEXT, c907 TEXT, c908 TEXT, c909 TEXT, c910 TEXT,
+ c911 TEXT, c912 TEXT, c913 TEXT, c914 TEXT, c915 TEXT, c916 TEXT, c917 TEXT,
+ c918 TEXT, c919 TEXT, c920 TEXT, c921 TEXT, c922 TEXT, c923 TEXT, c924 TEXT,
+ c925 TEXT, c926 TEXT, c927 TEXT, c928 TEXT, c929 TEXT, c930 TEXT, c931 TEXT,
+ c932 TEXT, c933 TEXT, c934 TEXT, c935 TEXT, c936 TEXT, c937 TEXT, c938 TEXT,
+ c939 TEXT, c940 TEXT, c941 TEXT, c942 TEXT, c943 TEXT, c944 TEXT, c945 TEXT,
+ c946 TEXT, c947 TEXT, c948 TEXT, c949 TEXT, c950 TEXT, c951 TEXT, c952 TEXT,
+ c953 TEXT, c954 TEXT, c955 TEXT, c956 TEXT, c957 TEXT, c958 TEXT, c959 TEXT,
+ c960 TEXT, c961 TEXT, c962 TEXT, c963 TEXT, c964 TEXT, c965 TEXT, c966 TEXT,
+ c967 TEXT, c968 TEXT, c969 TEXT, c970 TEXT, c971 TEXT, c972 TEXT, c973 TEXT,
+ c974 TEXT, c975 TEXT, c976 TEXT, c977 TEXT, c978 TEXT, c979 TEXT, c980 TEXT,
+ c981 TEXT, c982 TEXT, c983 TEXT, c984 TEXT, c985 TEXT, c986 TEXT, c987 TEXT,
+ c988 TEXT, c989 TEXT, c990 TEXT, c991 TEXT, c992 TEXT, c993 TEXT, c994 TEXT,
+ c995 TEXT, c996 TEXT, c997 TEXT, c998 TEXT, c999 TEXT, c1000 TEXT, c1001 TEXT,
+ c1002 TEXT, c1003 TEXT, c1004 TEXT, c1005 TEXT, c1006 TEXT, c1007 TEXT, c1008 TEXT,
+ c1009 TEXT, c1010 TEXT, c1011 TEXT, c1012 TEXT, c1013 TEXT, c1014 TEXT, c1015 TEXT,
+ c1016 TEXT, c1017 TEXT
+) ENGINE=INNODB;
+DROP TABLE t1;
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE t1 (
+ c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+ c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT, c12 TEXT, c13 TEXT, c14 TEXT,
+ c15 TEXT, c16 TEXT, c17 TEXT, c18 TEXT, c19 TEXT, c20 TEXT, c21 TEXT,
+ c22 TEXT, c23 TEXT, c24 TEXT, c25 TEXT, c26 TEXT, c27 TEXT, c28 TEXT,
+ c29 TEXT, c30 TEXT, c31 TEXT, c32 TEXT, c33 TEXT, c34 TEXT, c35 TEXT,
+ c36 TEXT, c37 TEXT, c38 TEXT, c39 TEXT, c40 TEXT, c41 TEXT, c42 TEXT,
+ c43 TEXT, c44 TEXT, c45 TEXT, c46 TEXT, c47 TEXT, c48 TEXT, c49 TEXT,
+ c50 TEXT, c51 TEXT, c52 TEXT, c53 TEXT, c54 TEXT, c55 TEXT, c56 TEXT,
+ c57 TEXT, c58 TEXT, c59 TEXT, c60 TEXT, c61 TEXT, c62 TEXT, c63 TEXT,
+ c64 TEXT, c65 TEXT, c66 TEXT, c67 TEXT, c68 TEXT, c69 TEXT, c70 TEXT,
+ c71 TEXT, c72 TEXT, c73 TEXT, c74 TEXT, c75 TEXT, c76 TEXT, c77 TEXT,
+ c78 TEXT, c79 TEXT, c80 TEXT, c81 TEXT, c82 TEXT, c83 TEXT, c84 TEXT,
+ c85 TEXT, c86 TEXT, c87 TEXT, c88 TEXT, c89 TEXT, c90 TEXT, c91 TEXT,
+ c92 TEXT, c93 TEXT, c94 TEXT, c95 TEXT, c96 TEXT, c97 TEXT, c98 TEXT,
+ c99 TEXT, c100 TEXT, c101 TEXT, c102 TEXT, c103 TEXT, c104 TEXT, c105 TEXT,
+ c106 TEXT, c107 TEXT, c108 TEXT, c109 TEXT, c110 TEXT, c111 TEXT, c112 TEXT,
+ c113 TEXT, c114 TEXT, c115 TEXT, c116 TEXT, c117 TEXT, c118 TEXT, c119 TEXT,
+ c120 TEXT, c121 TEXT, c122 TEXT, c123 TEXT, c124 TEXT, c125 TEXT, c126 TEXT,
+ c127 TEXT, c128 TEXT, c129 TEXT, c130 TEXT, c131 TEXT, c132 TEXT, c133 TEXT,
+ c134 TEXT, c135 TEXT, c136 TEXT, c137 TEXT, c138 TEXT, c139 TEXT, c140 TEXT,
+ c141 TEXT, c142 TEXT, c143 TEXT, c144 TEXT, c145 TEXT, c146 TEXT, c147 TEXT,
+ c148 TEXT, c149 TEXT, c150 TEXT, c151 TEXT, c152 TEXT, c153 TEXT, c154 TEXT,
+ c155 TEXT, c156 TEXT, c157 TEXT, c158 TEXT, c159 TEXT, c160 TEXT, c161 TEXT,
+ c162 TEXT, c163 TEXT, c164 TEXT, c165 TEXT, c166 TEXT, c167 TEXT, c168 TEXT,
+ c169 TEXT, c170 TEXT, c171 TEXT, c172 TEXT, c173 TEXT, c174 TEXT, c175 TEXT,
+ c176 TEXT, c177 TEXT, c178 TEXT, c179 TEXT, c180 TEXT, c181 TEXT, c182 TEXT,
+ c183 TEXT, c184 TEXT, c185 TEXT, c186 TEXT, c187 TEXT, c188 TEXT, c189 TEXT,
+ c190 TEXT, c191 TEXT, c192 TEXT, c193 TEXT, c194 TEXT, c195 TEXT, c196 TEXT,
+ c197 TEXT, c198 TEXT, c199 TEXT, c200 TEXT, c201 TEXT, c202 TEXT, c203 TEXT,
+ c204 TEXT, c205 TEXT, c206 TEXT, c207 TEXT, c208 TEXT, c209 TEXT, c210 TEXT,
+ c211 TEXT, c212 TEXT, c213 TEXT, c214 TEXT, c215 TEXT, c216 TEXT, c217 TEXT,
+ c218 TEXT, c219 TEXT, c220 TEXT, c221 TEXT, c222 TEXT, c223 TEXT, c224 TEXT,
+ c225 TEXT, c226 TEXT, c227 TEXT, c228 TEXT, c229 TEXT, c230 TEXT, c231 TEXT,
+ c232 TEXT, c233 TEXT, c234 TEXT, c235 TEXT, c236 TEXT, c237 TEXT, c238 TEXT,
+ c239 TEXT, c240 TEXT, c241 TEXT, c242 TEXT, c243 TEXT, c244 TEXT, c245 TEXT,
+ c246 TEXT, c247 TEXT, c248 TEXT, c249 TEXT, c250 TEXT, c251 TEXT, c252 TEXT,
+ c253 TEXT, c254 TEXT, c255 TEXT, c256 TEXT, c257 TEXT, c258 TEXT, c259 TEXT,
+ c260 TEXT, c261 TEXT, c262 TEXT, c263 TEXT, c264 TEXT, c265 TEXT, c266 TEXT,
+ c267 TEXT, c268 TEXT, c269 TEXT, c270 TEXT, c271 TEXT, c272 TEXT, c273 TEXT,
+ c274 TEXT, c275 TEXT, c276 TEXT, c277 TEXT, c278 TEXT, c279 TEXT, c280 TEXT,
+ c281 TEXT, c282 TEXT, c283 TEXT, c284 TEXT, c285 TEXT, c286 TEXT, c287 TEXT,
+ c288 TEXT, c289 TEXT, c290 TEXT, c291 TEXT, c292 TEXT, c293 TEXT, c294 TEXT,
+ c295 TEXT, c296 TEXT, c297 TEXT, c298 TEXT, c299 TEXT, c300 TEXT, c301 TEXT,
+ c302 TEXT, c303 TEXT, c304 TEXT, c305 TEXT, c306 TEXT, c307 TEXT, c308 TEXT,
+ c309 TEXT, c310 TEXT, c311 TEXT, c312 TEXT, c313 TEXT, c314 TEXT, c315 TEXT,
+ c316 TEXT, c317 TEXT, c318 TEXT, c319 TEXT, c320 TEXT, c321 TEXT, c322 TEXT,
+ c323 TEXT, c324 TEXT, c325 TEXT, c326 TEXT, c327 TEXT, c328 TEXT, c329 TEXT,
+ c330 TEXT, c331 TEXT, c332 TEXT, c333 TEXT, c334 TEXT, c335 TEXT, c336 TEXT,
+ c337 TEXT, c338 TEXT, c339 TEXT, c340 TEXT, c341 TEXT, c342 TEXT, c343 TEXT,
+ c344 TEXT, c345 TEXT, c346 TEXT, c347 TEXT, c348 TEXT, c349 TEXT, c350 TEXT,
+ c351 TEXT, c352 TEXT, c353 TEXT, c354 TEXT, c355 TEXT, c356 TEXT, c357 TEXT,
+ c358 TEXT, c359 TEXT, c360 TEXT, c361 TEXT, c362 TEXT, c363 TEXT, c364 TEXT,
+ c365 TEXT, c366 TEXT, c367 TEXT, c368 TEXT, c369 TEXT, c370 TEXT, c371 TEXT,
+ c372 TEXT, c373 TEXT, c374 TEXT, c375 TEXT, c376 TEXT, c377 TEXT, c378 TEXT,
+ c379 TEXT, c380 TEXT, c381 TEXT, c382 TEXT, c383 TEXT, c384 TEXT, c385 TEXT,
+ c386 TEXT, c387 TEXT, c388 TEXT, c389 TEXT, c390 TEXT, c391 TEXT, c392 TEXT,
+ c393 TEXT, c394 TEXT, c395 TEXT, c396 TEXT, c397 TEXT, c398 TEXT, c399 TEXT,
+ c400 TEXT, c401 TEXT, c402 TEXT, c403 TEXT, c404 TEXT, c405 TEXT, c406 TEXT,
+ c407 TEXT, c408 TEXT, c409 TEXT, c410 TEXT, c411 TEXT, c412 TEXT, c413 TEXT,
+ c414 TEXT, c415 TEXT, c416 TEXT, c417 TEXT, c418 TEXT, c419 TEXT, c420 TEXT,
+ c421 TEXT, c422 TEXT, c423 TEXT, c424 TEXT, c425 TEXT, c426 TEXT, c427 TEXT,
+ c428 TEXT, c429 TEXT, c430 TEXT, c431 TEXT, c432 TEXT, c433 TEXT, c434 TEXT,
+ c435 TEXT, c436 TEXT, c437 TEXT, c438 TEXT, c439 TEXT, c440 TEXT, c441 TEXT,
+ c442 TEXT, c443 TEXT, c444 TEXT, c445 TEXT, c446 TEXT, c447 TEXT, c448 TEXT,
+ c449 TEXT, c450 TEXT, c451 TEXT, c452 TEXT, c453 TEXT, c454 TEXT, c455 TEXT,
+ c456 TEXT, c457 TEXT, c458 TEXT, c459 TEXT, c460 TEXT, c461 TEXT, c462 TEXT,
+ c463 TEXT, c464 TEXT, c465 TEXT, c466 TEXT, c467 TEXT, c468 TEXT, c469 TEXT,
+ c470 TEXT, c471 TEXT, c472 TEXT, c473 TEXT, c474 TEXT, c475 TEXT, c476 TEXT,
+ c477 TEXT, c478 TEXT, c479 TEXT, c480 TEXT, c481 TEXT, c482 TEXT, c483 TEXT,
+ c484 TEXT, c485 TEXT, c486 TEXT, c487 TEXT, c488 TEXT, c489 TEXT, c490 TEXT,
+ c491 TEXT, c492 TEXT, c493 TEXT, c494 TEXT, c495 TEXT, c496 TEXT, c497 TEXT,
+ c498 TEXT, c499 TEXT, c500 TEXT, c501 TEXT, c502 TEXT, c503 TEXT, c504 TEXT,
+ c505 TEXT, c506 TEXT, c507 TEXT, c508 TEXT, c509 TEXT, c510 TEXT, c511 TEXT,
+ c512 TEXT, c513 TEXT, c514 TEXT, c515 TEXT, c516 TEXT, c517 TEXT, c518 TEXT,
+ c519 TEXT, c520 TEXT, c521 TEXT, c522 TEXT, c523 TEXT, c524 TEXT, c525 TEXT,
+ c526 TEXT, c527 TEXT, c528 TEXT, c529 TEXT, c530 TEXT, c531 TEXT, c532 TEXT,
+ c533 TEXT, c534 TEXT, c535 TEXT, c536 TEXT, c537 TEXT, c538 TEXT, c539 TEXT,
+ c540 TEXT, c541 TEXT, c542 TEXT, c543 TEXT, c544 TEXT, c545 TEXT, c546 TEXT,
+ c547 TEXT, c548 TEXT, c549 TEXT, c550 TEXT, c551 TEXT, c552 TEXT, c553 TEXT,
+ c554 TEXT, c555 TEXT, c556 TEXT, c557 TEXT, c558 TEXT, c559 TEXT, c560 TEXT,
+ c561 TEXT, c562 TEXT, c563 TEXT, c564 TEXT, c565 TEXT, c566 TEXT, c567 TEXT,
+ c568 TEXT, c569 TEXT, c570 TEXT, c571 TEXT, c572 TEXT, c573 TEXT, c574 TEXT,
+ c575 TEXT, c576 TEXT, c577 TEXT, c578 TEXT, c579 TEXT, c580 TEXT, c581 TEXT,
+ c582 TEXT, c583 TEXT, c584 TEXT, c585 TEXT, c586 TEXT, c587 TEXT, c588 TEXT,
+ c589 TEXT, c590 TEXT, c591 TEXT, c592 TEXT, c593 TEXT, c594 TEXT, c595 TEXT,
+ c596 TEXT, c597 TEXT, c598 TEXT, c599 TEXT, c600 TEXT, c601 TEXT, c602 TEXT,
+ c603 TEXT, c604 TEXT, c605 TEXT, c606 TEXT, c607 TEXT, c608 TEXT, c609 TEXT,
+ c610 TEXT, c611 TEXT, c612 TEXT, c613 TEXT, c614 TEXT, c615 TEXT, c616 TEXT,
+ c617 TEXT, c618 TEXT, c619 TEXT, c620 TEXT, c621 TEXT, c622 TEXT, c623 TEXT,
+ c624 TEXT, c625 TEXT, c626 TEXT, c627 TEXT, c628 TEXT, c629 TEXT, c630 TEXT,
+ c631 TEXT, c632 TEXT, c633 TEXT, c634 TEXT, c635 TEXT, c636 TEXT, c637 TEXT,
+ c638 TEXT, c639 TEXT, c640 TEXT, c641 TEXT, c642 TEXT, c643 TEXT, c644 TEXT,
+ c645 TEXT, c646 TEXT, c647 TEXT, c648 TEXT, c649 TEXT, c650 TEXT, c651 TEXT,
+ c652 TEXT, c653 TEXT, c654 TEXT, c655 TEXT, c656 TEXT, c657 TEXT, c658 TEXT,
+ c659 TEXT, c660 TEXT, c661 TEXT, c662 TEXT, c663 TEXT, c664 TEXT, c665 TEXT,
+ c666 TEXT, c667 TEXT, c668 TEXT, c669 TEXT, c670 TEXT, c671 TEXT, c672 TEXT,
+ c673 TEXT, c674 TEXT, c675 TEXT, c676 TEXT, c677 TEXT, c678 TEXT, c679 TEXT,
+ c680 TEXT, c681 TEXT, c682 TEXT, c683 TEXT, c684 TEXT, c685 TEXT, c686 TEXT,
+ c687 TEXT, c688 TEXT, c689 TEXT, c690 TEXT, c691 TEXT, c692 TEXT, c693 TEXT,
+ c694 TEXT, c695 TEXT, c696 TEXT, c697 TEXT, c698 TEXT, c699 TEXT, c700 TEXT,
+ c701 TEXT, c702 TEXT, c703 TEXT, c704 TEXT, c705 TEXT, c706 TEXT, c707 TEXT,
+ c708 TEXT, c709 TEXT, c710 TEXT, c711 TEXT, c712 TEXT, c713 TEXT, c714 TEXT,
+ c715 TEXT, c716 TEXT, c717 TEXT, c718 TEXT, c719 TEXT, c720 TEXT, c721 TEXT,
+ c722 TEXT, c723 TEXT, c724 TEXT, c725 TEXT, c726 TEXT, c727 TEXT, c728 TEXT,
+ c729 TEXT, c730 TEXT, c731 TEXT, c732 TEXT, c733 TEXT, c734 TEXT, c735 TEXT,
+ c736 TEXT, c737 TEXT, c738 TEXT, c739 TEXT, c740 TEXT, c741 TEXT, c742 TEXT,
+ c743 TEXT, c744 TEXT, c745 TEXT, c746 TEXT, c747 TEXT, c748 TEXT, c749 TEXT,
+ c750 TEXT, c751 TEXT, c752 TEXT, c753 TEXT, c754 TEXT, c755 TEXT, c756 TEXT,
+ c757 TEXT, c758 TEXT, c759 TEXT, c760 TEXT, c761 TEXT, c762 TEXT, c763 TEXT,
+ c764 TEXT, c765 TEXT, c766 TEXT, c767 TEXT, c768 TEXT, c769 TEXT, c770 TEXT,
+ c771 TEXT, c772 TEXT, c773 TEXT, c774 TEXT, c775 TEXT, c776 TEXT, c777 TEXT,
+ c778 TEXT, c779 TEXT, c780 TEXT, c781 TEXT, c782 TEXT, c783 TEXT, c784 TEXT,
+ c785 TEXT, c786 TEXT, c787 TEXT, c788 TEXT, c789 TEXT, c790 TEXT, c791 TEXT,
+ c792 TEXT, c793 TEXT, c794 TEXT, c795 TEXT, c796 TEXT, c797 TEXT, c798 TEXT,
+ c799 TEXT, c800 TEXT, c801 TEXT, c802 TEXT, c803 TEXT, c804 TEXT, c805 TEXT,
+ c806 TEXT, c807 TEXT, c808 TEXT, c809 TEXT, c810 TEXT, c811 TEXT, c812 TEXT,
+ c813 TEXT, c814 TEXT, c815 TEXT, c816 TEXT, c817 TEXT, c818 TEXT, c819 TEXT,
+ c820 TEXT, c821 TEXT, c822 TEXT, c823 TEXT, c824 TEXT, c825 TEXT, c826 TEXT,
+ c827 TEXT, c828 TEXT, c829 TEXT, c830 TEXT, c831 TEXT, c832 TEXT, c833 TEXT,
+ c834 TEXT, c835 TEXT, c836 TEXT, c837 TEXT, c838 TEXT, c839 TEXT, c840 TEXT,
+ c841 TEXT, c842 TEXT, c843 TEXT, c844 TEXT, c845 TEXT, c846 TEXT, c847 TEXT,
+ c848 TEXT, c849 TEXT, c850 TEXT, c851 TEXT, c852 TEXT, c853 TEXT, c854 TEXT,
+ c855 TEXT, c856 TEXT, c857 TEXT, c858 TEXT, c859 TEXT, c860 TEXT, c861 TEXT,
+ c862 TEXT, c863 TEXT, c864 TEXT, c865 TEXT, c866 TEXT, c867 TEXT, c868 TEXT,
+ c869 TEXT, c870 TEXT, c871 TEXT, c872 TEXT, c873 TEXT, c874 TEXT, c875 TEXT,
+ c876 TEXT, c877 TEXT, c878 TEXT, c879 TEXT, c880 TEXT, c881 TEXT, c882 TEXT,
+ c883 TEXT, c884 TEXT, c885 TEXT, c886 TEXT, c887 TEXT, c888 TEXT, c889 TEXT,
+ c890 TEXT, c891 TEXT, c892 TEXT, c893 TEXT, c894 TEXT, c895 TEXT, c896 TEXT,
+ c897 TEXT, c898 TEXT, c899 TEXT, c900 TEXT, c901 TEXT, c902 TEXT, c903 TEXT,
+ c904 TEXT, c905 TEXT, c906 TEXT, c907 TEXT, c908 TEXT, c909 TEXT, c910 TEXT,
+ c911 TEXT, c912 TEXT, c913 TEXT, c914 TEXT, c915 TEXT, c916 TEXT, c917 TEXT,
+ c918 TEXT, c919 TEXT, c920 TEXT, c921 TEXT, c922 TEXT, c923 TEXT, c924 TEXT,
+ c925 TEXT, c926 TEXT, c927 TEXT, c928 TEXT, c929 TEXT, c930 TEXT, c931 TEXT,
+ c932 TEXT, c933 TEXT, c934 TEXT, c935 TEXT, c936 TEXT, c937 TEXT, c938 TEXT,
+ c939 TEXT, c940 TEXT, c941 TEXT, c942 TEXT, c943 TEXT, c944 TEXT, c945 TEXT,
+ c946 TEXT, c947 TEXT, c948 TEXT, c949 TEXT, c950 TEXT, c951 TEXT, c952 TEXT,
+ c953 TEXT, c954 TEXT, c955 TEXT, c956 TEXT, c957 TEXT, c958 TEXT, c959 TEXT,
+ c960 TEXT, c961 TEXT, c962 TEXT, c963 TEXT, c964 TEXT, c965 TEXT, c966 TEXT,
+ c967 TEXT, c968 TEXT, c969 TEXT, c970 TEXT, c971 TEXT, c972 TEXT, c973 TEXT,
+ c974 TEXT, c975 TEXT, c976 TEXT, c977 TEXT, c978 TEXT, c979 TEXT, c980 TEXT,
+ c981 TEXT, c982 TEXT, c983 TEXT, c984 TEXT, c985 TEXT, c986 TEXT, c987 TEXT,
+ c988 TEXT, c989 TEXT, c990 TEXT, c991 TEXT, c992 TEXT, c993 TEXT, c994 TEXT,
+ c995 TEXT, c996 TEXT, c997 TEXT, c998 TEXT, c999 TEXT, c1000 TEXT, c1001 TEXT,
+ c1002 TEXT, c1003 TEXT, c1004 TEXT, c1005 TEXT, c1006 TEXT, c1007 TEXT, c1008 TEXT,
+ c1009 TEXT, c1010 TEXT, c1011 TEXT, c1012 TEXT, c1013 TEXT, c1014 TEXT, c1015 TEXT,
+ c1016 TEXT, c1017 TEXT, c1018 TEXT
+) ENGINE=INNODB;
+} }
diff --git a/mysql-test/suite/innodb/t/strict_mode.test b/mysql-test/suite/innodb/t/strict_mode.test
index e93b4cc9df9..9154d6b73ae 100644
--- a/mysql-test/suite/innodb/t/strict_mode.test
+++ b/mysql-test/suite/innodb/t/strict_mode.test
@@ -238,7 +238,162 @@ col224 text,
col225 text,
col226 text,
col227 text,
-col228 text
+col228 text,
+col229 text,
+col230 text,
+col231 text,
+col232 text,
+col233 text,
+col234 text,
+col235 text,
+col236 text,
+col237 text,
+col238 text,
+col239 text,
+col240 text,
+col241 text,
+col242 text,
+col243 text,
+col244 text,
+col245 text,
+col246 text,
+col247 text,
+col248 text,
+col249 text,
+col250 text,
+col251 text,
+col252 text,
+col253 text,
+col254 text,
+col255 text,
+col256 text,
+col257 text,
+col258 text,
+col259 text,
+col260 text,
+col261 text,
+col262 text,
+col263 text,
+col264 text,
+col265 text,
+col266 text,
+col267 text,
+col268 text,
+col269 text,
+col270 text,
+col271 text,
+col272 text,
+col273 text,
+col274 text,
+col275 text,
+col276 text,
+col277 text,
+col278 text,
+col279 text,
+col280 text,
+col281 text,
+col282 text,
+col283 text,
+col284 text,
+col285 text,
+col286 text,
+col287 text,
+col288 text,
+col289 text,
+col290 text,
+col291 text,
+col292 text,
+col293 text,
+col294 text,
+col295 text,
+col296 text,
+col297 text,
+col298 text,
+col299 text,
+col300 text,
+col301 text,
+col302 text,
+col303 text,
+col304 text,
+col305 text,
+col306 text,
+col307 text,
+col308 text,
+col309 text,
+col310 text,
+col311 text,
+col312 text,
+col313 text,
+col314 text,
+col315 text,
+col316 text,
+col317 text,
+col318 text,
+col319 text,
+col320 text,
+col321 text,
+col322 text,
+col323 text,
+col324 text,
+col325 text,
+col326 text,
+col327 text,
+col328 text,
+col329 text,
+col330 text,
+col331 text,
+col332 text,
+col333 text,
+col334 text,
+col335 text,
+col336 text,
+col337 text,
+col338 text,
+col339 text,
+col340 text,
+col341 text,
+col342 text,
+col343 text,
+col344 text,
+col345 text,
+col346 text,
+col347 text,
+col348 text,
+col349 text,
+col350 text,
+col351 text,
+col352 text,
+col353 text,
+col354 text,
+col355 text,
+col356 text,
+col357 text,
+col358 text,
+col359 text,
+col360 text,
+col361 text,
+col362 text,
+col363 text,
+col364 text,
+col365 text,
+col366 text,
+col367 text,
+col368 text,
+col369 text,
+col370 text,
+col371 text,
+col372 text,
+col373 text,
+col374 text,
+col375 text,
+col376 text,
+col377 text,
+col378 text,
+col379 text,
+col380 text,
+col381 text,
+col382 text,
+col383 text
) ENGINE=InnoDB;
set innodb_strict_mode = 1;
diff --git a/mysql-test/suite/innodb/t/trx_id_future.test b/mysql-test/suite/innodb/t/trx_id_future.test
new file mode 100644
index 00000000000..564d36f9cfa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/trx_id_future.test
@@ -0,0 +1,59 @@
+--echo #
+--echo # Bug #20445525 ADD A CONSISTENCY CHECK AGAINST DB_TRX_ID BEING
+--echo # IN THE FUTURE
+--echo #
+
+--source include/not_debug.inc
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+let PAGE_SIZE=`select @@innodb_page_size`;
+
+CREATE TABLE t1(a INT) row_format=redundant engine=innoDB;
+INSERT INTO t1 VALUES(1);
+
+let MYSQLD_DATADIR=`select @@datadir`;
+let $restart_noprint=2;
+
+--source include/shutdown_mysqld.inc
+
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/crc32.pl";
+my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd";
+open(FILE, "+<", $file) || die "Unable to open $file";
+binmode FILE;
+
+#Seek the the infimum record and get the offset to next record
+#Infimum record exist at offset 101 for redundant format
+#And offset to the next record is present 2 bytes prior to
+#infimum record
+
+my $ps= $ENV{PAGE_SIZE};
+my $page;
+sysseek(FILE, 3*$ps, 0) || die "Unable to seek $file\n";
+die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps;
+#In this case the first record should be at offset 135
+die unless unpack("n", substr($page, 99, 2)) == 135;
+
+substr($page,135+6,6) = "\xff" x 6;
+
+my $polynomial = 0x82f63b78; # CRC-32C
+my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^
+ mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial));
+substr($page,0,4)=$ck;
+substr($page,$ps-8,4)=$ck;
+sysseek(FILE, 3*$ps, 0) || die "Unable to rewind $file\n";
+syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n";
+close(FILE) || die "Unable to close $file";
+EOF
+
+--source include/start_mysqld.inc
+
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_PATTERN= \[Warning\] InnoDB: A transaction id in a record of table `test`\.`t1` is newer than the system-wide maximum;
+--source include/search_pattern_in_file.inc
+
+call mtr.add_suppression("\\[Warning\\] InnoDB: A transaction id in a record of table `test`\\.`t1` is newer than the system-wide maximum");
+
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/undo_log.test b/mysql-test/suite/innodb/t/undo_log.test
index 1f4cf9702d9..94322868b06 100644
--- a/mysql-test/suite/innodb/t/undo_log.test
+++ b/mysql-test/suite/innodb/t/undo_log.test
@@ -1,4 +1,8 @@
--source include/have_innodb.inc
+
+call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is");
+
+SET innodb_strict_mode=OFF;
CREATE TABLE test_tab (
a_str_18 mediumtext,
b_str_3 varchar(32) DEFAULT NULL,
@@ -124,6 +128,7 @@ KEY b_str_5 (b_str_5),
KEY b_str_31 (b_str_31),
KEY a_ref_11 (a_ref_11)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
+SET innodb_strict_mode=ON;
BEGIN;
INSERT INTO test_tab (b_str_26, a_str_13, a_str_18) VALUES
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
index 1322867551f..bc9548b7d8e 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
@@ -1384,3 +1384,8 @@ SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"good database"' IN BOOLEAN MODE);
id a
1 know mysql good database
DROP TABLE t1;
+CREATE TABLE t1(f1 TEXT, FULLTEXT KEY(f1))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(repeat("this is the test case", 500));
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
index 150d632b26f..6fa4f25c60e 100644
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test
@@ -1331,3 +1331,11 @@ INSERT INTO t1 (a) VALUES
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"good database"' IN BOOLEAN MODE);
DROP TABLE t1;
+
+# MDEV-19974 InnoDB: Cannot load compressed BLOB
+CREATE TABLE t1(f1 TEXT, FULLTEXT KEY(f1))ENGINE=InnoDB;
+INSERT INTO t1 VALUES(repeat("this is the test case", 500));
+ALTER TABLE t1 KEY_BLOCK_SIZE=4;
+ALTER TABLE t1 KEY_BLOCK_SIZE=0;
+DROP TABLE t1;
+
diff --git a/mysql-test/suite/multi_source/disabled.def b/mysql-test/suite/multi_source/disabled.def
new file mode 100644
index 00000000000..45c8a6c8891
--- /dev/null
+++ b/mysql-test/suite/multi_source/disabled.def
@@ -0,0 +1 @@
+mdev-8874 : MDEV-20101 Assertion failure
diff --git a/mysql-test/suite/multi_source/mdev-8874.cnf b/mysql-test/suite/multi_source/mdev-8874.cnf
new file mode 100644
index 00000000000..dc89db72772
--- /dev/null
+++ b/mysql-test/suite/multi_source/mdev-8874.cnf
@@ -0,0 +1,25 @@
+!include my.cnf
+
+[mysqld.1]
+log-bin
+log-slave-updates
+
+[mysqld.2]
+log-bin
+log-slave-updates
+
+[mysqld.3]
+log-bin
+log-slave-updates
+
+[mysqld.4]
+server-id=4
+log-bin=server4-bin
+log-slave-updates
+m1.replicate_ignore_table='a.t1'
+m2.replicate_ignore_table='b.t1'
+replicate_ignore_table='c.t1'
+
+[ENV]
+SERVER_MYPORT_4= @mysqld.4.port
+SERVER_MYSOCK_4= @mysqld.4.socket
diff --git a/mysql-test/suite/multi_source/mdev-8874.result b/mysql-test/suite/multi_source/mdev-8874.result
new file mode 100644
index 00000000000..aa9cc39b403
--- /dev/null
+++ b/mysql-test/suite/multi_source/mdev-8874.result
@@ -0,0 +1,126 @@
+connect server_1,127.0.0.1,root,,,$SERVER_MYPORT_1;
+connect server_2,127.0.0.1,root,,,$SERVER_MYPORT_2;
+connect server_3,127.0.0.1,root,,,$SERVER_MYPORT_3;
+connect server_4,127.0.0.1,root,,,$SERVER_MYPORT_4;
+connection server_1;
+create database a;
+use a;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+connection server_2;
+create database b;
+use b;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+connection server_3;
+create database c;
+use c;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+connection server_4;
+change master 'm1' to master_port=MYPORT_1 , master_host='127.0.0.1', master_user='root';
+change master 'm2' to master_port=MYPORT_2 , master_host='127.0.0.1', master_user='root';
+change master to master_port=MYPORT_3 , master_host='127.0.0.1', master_user='root';
+start all slaves;
+set default_master_connection = 'm1';
+include/wait_for_slave_to_start.inc
+set default_master_connection = 'm2';
+include/wait_for_slave_to_start.inc
+set default_master_connection = '';
+include/wait_for_slave_to_start.inc
+select @@global.'m1'.replicate_ignore_table;
+@@global.'m1'.replicate_ignore_table
+a.t1
+select @@global.'m2'.replicate_ignore_table;
+@@global.'m2'.replicate_ignore_table
+b.t1
+select @@global.replicate_ignore_table;
+@@global.replicate_ignore_table
+c.t1
+use a;
+#No t1 table
+show tables;
+Tables_in_a
+t2
+use b;
+#No t1 table
+show tables;
+Tables_in_b
+t2
+use c;
+#No t1 table
+show tables;
+Tables_in_c
+t2
+#TEST
+STOP ALL SLAVES;
+Warnings:
+Note 1938 SLAVE 'm2' stopped
+Note 1938 SLAVE '' stopped
+Note 1938 SLAVE 'm1' stopped
+RESET SLAVE 'm1' ALL ;
+RESET SLAVE 'm2' ALL ;
+RESET SLAVE ALL ;
+drop database a;
+drop database b;
+drop database c;
+change master 'm1' to master_port=MYPORT_1 , master_host='127.0.0.1', master_user='root';
+change master 'm2' to master_port=MYPORT_2 , master_host='127.0.0.1', master_user='root';
+change master to master_port=MYPORT_3 , master_host='127.0.0.1', master_user='root';
+start all slaves;
+Warnings:
+Note 1937 SLAVE 'm2' started
+Note 1937 SLAVE '' started
+Note 1937 SLAVE 'm1' started
+set default_master_connection = 'm1';
+include/wait_for_slave_to_start.inc
+set default_master_connection = 'm2';
+include/wait_for_slave_to_start.inc
+set default_master_connection = '';
+include/wait_for_slave_to_start.inc
+#Replication Filter should be intact (t1 still not replicated)
+select @@global.'m1'.replicate_ignore_table;
+@@global.'m1'.replicate_ignore_table
+a.t1
+select @@global.'m2'.replicate_ignore_table;
+@@global.'m2'.replicate_ignore_table
+b.t1
+select @@global.replicate_ignore_table;
+@@global.replicate_ignore_table
+c.t1
+use a;
+#No t1 table
+show tables;
+Tables_in_a
+t2
+use b;
+#No t1 table
+show tables;
+Tables_in_b
+t2
+use c;
+#No t1 table
+show tables;
+Tables_in_c
+t2
+#CleanUp
+connection server_1;
+drop database a;
+connection server_2;
+drop database b;
+connection server_3;
+drop database c;
+connection server_4;
+stop all slaves;
+SET default_master_connection = "m1";
+include/wait_for_slave_to_stop.inc
+SET default_master_connection = "m2";
+include/wait_for_slave_to_stop.inc
+SET default_master_connection = "";
+include/wait_for_slave_to_stop.inc
diff --git a/mysql-test/suite/multi_source/mdev-8874.test b/mysql-test/suite/multi_source/mdev-8874.test
new file mode 100644
index 00000000000..d03c255b911
--- /dev/null
+++ b/mysql-test/suite/multi_source/mdev-8874.test
@@ -0,0 +1,141 @@
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/have_debug.inc
+# MDEV-8874
+# In Named Master slave connection if we do reset slave 'connection_name' ALL and then
+# if we reconnect slave, replication filters are ignored.
+# This patch fixes this issue.
+--connect (server_1,127.0.0.1,root,,,$SERVER_MYPORT_1)
+--connect (server_2,127.0.0.1,root,,,$SERVER_MYPORT_2)
+--connect (server_3,127.0.0.1,root,,,$SERVER_MYPORT_3)
+--connect (server_4,127.0.0.1,root,,,$SERVER_MYPORT_4)
+
+--connection server_1
+create database a;
+use a;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+--save_master_pos
+
+--connection server_2
+create database b;
+use b;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+--save_master_pos
+
+--connection server_3
+create database c;
+use c;
+create table t1(a int);
+insert into t1 values(1);
+create table t2(a int);
+insert into t2 values(1);
+--save_master_pos
+
+--connection server_4
+--disable_warnings
+--replace_result $SERVER_MYPORT_1 MYPORT_1
+eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root';
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root';
+--replace_result $SERVER_MYPORT_3 MYPORT_3
+eval change master to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root';
+start all slaves;
+set default_master_connection = 'm1';
+--source include/wait_for_slave_to_start.inc
+set default_master_connection = 'm2';
+--source include/wait_for_slave_to_start.inc
+set default_master_connection = '';
+--source include/wait_for_slave_to_start.inc
+select @@global.'m1'.replicate_ignore_table;
+select @@global.'m2'.replicate_ignore_table;
+select @@global.replicate_ignore_table;
+
+--enable_warnings
+--sync_with_master 0,'m1'
+--sync_with_master 0,'m2'
+--sync_with_master 0,''
+use a;
+--echo #No t1 table
+show tables;
+use b;
+--echo #No t1 table
+show tables;
+use c;
+--echo #No t1 table
+show tables;
+--echo #TEST
+STOP ALL SLAVES;
+RESET SLAVE 'm1' ALL ;
+RESET SLAVE 'm2' ALL ;
+RESET SLAVE ALL ;
+drop database a;
+drop database b;
+drop database c;
+--replace_result $SERVER_MYPORT_1 MYPORT_1
+eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root';
+--replace_result $SERVER_MYPORT_2 MYPORT_2
+eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root';
+--replace_result $SERVER_MYPORT_3 MYPORT_3
+eval change master to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root';
+start all slaves;
+set default_master_connection = 'm1';
+--source include/wait_for_slave_to_start.inc
+set default_master_connection = 'm2';
+--source include/wait_for_slave_to_start.inc
+set default_master_connection = '';
+--source include/wait_for_slave_to_start.inc
+--sync_with_master 0,'m1'
+--sync_with_master 0,'m2'
+--sync_with_master 0,''
+
+--echo #Replication Filter should be intact (t1 still not replicated)
+select @@global.'m1'.replicate_ignore_table;
+select @@global.'m2'.replicate_ignore_table;
+select @@global.replicate_ignore_table;
+use a;
+--echo #No t1 table
+show tables;
+use b;
+--echo #No t1 table
+show tables;
+use c;
+--echo #No t1 table
+show tables;
+
+
+#--echo #restart the server
+#--source include/restart_mysqld.inc
+
+
+--echo #CleanUp
+--connection server_1
+drop database a;
+--save_master_pos
+
+--connection server_2
+drop database b;
+--save_master_pos
+
+--connection server_3
+drop database c;
+--save_master_pos
+
+--connection server_4
+--sync_with_master 0,'m1'
+--sync_with_master 0,'m2'
+--sync_with_master 0,''
+--disable_warnings
+stop all slaves;
+--enable_warnings
+SET default_master_connection = "m1";
+--source include/wait_for_slave_to_stop.inc
+SET default_master_connection = "m2";
+--source include/wait_for_slave_to_stop.inc
+SET default_master_connection = "";
+--source include/wait_for_slave_to_stop.inc
diff --git a/mysql-test/suite/parts/r/fulltext.result b/mysql-test/suite/parts/r/fulltext.result
new file mode 100644
index 00000000000..6495c9aa5a1
--- /dev/null
+++ b/mysql-test/suite/parts/r/fulltext.result
@@ -0,0 +1,6 @@
+create table t1 (i int, f1 varchar(512), f2 varchar(512), fulltext (f1)) engine=myisam partition by hash (i);
+select * from t1 where match (f1) against ('foo');
+i f1 f2
+select * from t1 where match (f2) against ('bar' in boolean mode) ;
+i f1 f2
+drop table t1;
diff --git a/mysql-test/suite/parts/t/fulltext.test b/mysql-test/suite/parts/t/fulltext.test
new file mode 100644
index 00000000000..c591e660e5b
--- /dev/null
+++ b/mysql-test/suite/parts/t/fulltext.test
@@ -0,0 +1,9 @@
+--source include/have_partition.inc
+
+#
+# MDEV-17627 Assertion `inited==RND' failed in handler::ha_rnd_end() upon actions on partitioned table with FTS
+#
+create table t1 (i int, f1 varchar(512), f2 varchar(512), fulltext (f1)) engine=myisam partition by hash (i);
+select * from t1 where match (f1) against ('foo');
+select * from t1 where match (f2) against ('bar' in boolean mode) ;
+drop table t1;
diff --git a/mysql-test/suite/plugins/disabled.def b/mysql-test/suite/plugins/disabled.def
new file mode 100644
index 00000000000..81cc9131335
--- /dev/null
+++ b/mysql-test/suite/plugins/disabled.def
@@ -0,0 +1 @@
+auth_ed25519 : MDEV-20144 plugins.auth_ed25519 fails in buildbot with undefined symbol: inflate
diff --git a/mysql-test/suite/rpl/include/rpl_drop_create_temp_table.test b/mysql-test/suite/rpl/include/rpl_drop_create_temp_table.test
index ef025eb96ca..456419803db 100644
--- a/mysql-test/suite/rpl/include/rpl_drop_create_temp_table.test
+++ b/mysql-test/suite/rpl/include/rpl_drop_create_temp_table.test
@@ -32,6 +32,10 @@
# is any
# Drop-Temp-TT-Temp - Drops two temporary T-tables if there is any
# Drop-Temp-NN-Temp - Drops two temporary N-tables if there is any
+#
+# Note: MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written
+# to binlog only if the corresponding temporary table exists.
+#
# Drop-Temp-Xe-Temp - Tries to drop a temporary table that does not exist
# Drop-Temp-NXe-Temp - Drops a temporary N-table if there is any and
# a temporary table that does not exist
diff --git a/mysql-test/suite/rpl/r/create_or_replace_mix.result b/mysql-test/suite/rpl/r/create_or_replace_mix.result
index 6ad37ab5e46..661278aa7ef 100644
--- a/mysql-test/suite/rpl/r/create_or_replace_mix.result
+++ b/mysql-test/suite/rpl/r/create_or_replace_mix.result
@@ -265,6 +265,16 @@ set binlog_format="STATEMENT";
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
drop temporary table t8;
set @@binlog_format=@org_binlog_format;
+set @@session.binlog_format=default;
+drop temporary table if exists t9;
+Warnings:
+Note 1051 Unknown table 'test.t9'
+connect con1,localhost,root,,;
+set session binlog_format=default;
+create temporary table t9 (i int);
+*** Must be no DROP logged for t9 when there was no CREATE, at disconnect too ***
+disconnect con1;
+connection server_1;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
@@ -275,5 +285,9 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create temporary table t7 (a int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t7` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create temporary table t9 (i int)
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t9`
drop table t2;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/create_or_replace_row.result b/mysql-test/suite/rpl/r/create_or_replace_row.result
index ad7a537a2c9..c45daefd671 100644
--- a/mysql-test/suite/rpl/r/create_or_replace_row.result
+++ b/mysql-test/suite/rpl/r/create_or_replace_row.result
@@ -293,6 +293,16 @@ set binlog_format="STATEMENT";
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
drop temporary table t8;
set @@binlog_format=@org_binlog_format;
+set @@session.binlog_format=default;
+drop temporary table if exists t9;
+Warnings:
+Note 1051 Unknown table 'test.t9'
+connect con1,localhost,root,,;
+set session binlog_format=default;
+create temporary table t9 (i int);
+*** Must be no DROP logged for t9 when there was no CREATE, at disconnect too ***
+disconnect con1;
+connection server_1;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
diff --git a/mysql-test/suite/rpl/r/create_or_replace_statement.result b/mysql-test/suite/rpl/r/create_or_replace_statement.result
index 69206cc861f..f95b451e5ec 100644
--- a/mysql-test/suite/rpl/r/create_or_replace_statement.result
+++ b/mysql-test/suite/rpl/r/create_or_replace_statement.result
@@ -252,6 +252,16 @@ set binlog_format="STATEMENT";
ERROR HY000: Cannot switch out of the row-based binary log format when the session has open temporary tables
drop temporary table t8;
set @@binlog_format=@org_binlog_format;
+set @@session.binlog_format=default;
+drop temporary table if exists t9;
+Warnings:
+Note 1051 Unknown table 'test.t9'
+connect con1,localhost,root,,;
+set session binlog_format=default;
+create temporary table t9 (i int);
+*** Must be no DROP logged for t9 when there was no CREATE, at disconnect too ***
+disconnect con1;
+connection server_1;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
@@ -262,5 +272,9 @@ master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create temporary table t7 (a int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`t7` /* generated by server */
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; create temporary table t9 (i int)
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t9`
drop table t2;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/kill_race_condition.result b/mysql-test/suite/rpl/r/kill_race_condition.result
index 87ee3214b8e..1181eb0b0b1 100644
--- a/mysql-test/suite/rpl/r/kill_race_condition.result
+++ b/mysql-test/suite/rpl/r/kill_race_condition.result
@@ -1,18 +1,23 @@
include/master-slave.inc
[connection master]
+connection master;
+create table t1 (a int);
+connection slave;
connection slave;
set global debug_dbug='d,rows_log_event_before_open_table';
-set debug_sync='now WAIT_FOR before_open_table';
connection master;
-create table t1 (a int);
insert t1 values (1),(2),(3);
connection slave;
+set debug_sync='now WAIT_FOR before_open_table';
kill slave_sql_thread;
set debug_sync='now SIGNAL go_ahead_sql';
+include/wait_for_slave_sql_error.inc [errno=1927]
+Last_SQL_Error = Error executing row event: 'Connection was killed'
set global debug_dbug='';
set debug_sync='RESET';
connection master;
drop table t1;
connection slave;
-start slave;
+include/start_slave.inc
+Last_SQL_Error =
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/mdev_17588.result b/mysql-test/suite/rpl/r/mdev_17588.result
new file mode 100644
index 00000000000..f6b4728bd88
--- /dev/null
+++ b/mysql-test/suite/rpl/r/mdev_17588.result
@@ -0,0 +1,36 @@
+include/master-slave.inc
+[connection master]
+connection master;
+create table t1 (a int) engine=innodb;
+create table t2 (a int);
+create table t3 (a int) engine=innodb;
+include/save_master_gtid.inc
+connection slave;
+include/wait_for_slave_sql_error.inc [errno=1286]
+Last_Error = 'Error 'Unknown storage engine 'innodb'' on query. Default database: 'test'. Query: 'create table t1 (a int) engine=innodb''
+STOP SLAVE IO_THREAD;
+include/wait_for_slave_to_stop.inc
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+show tables;
+Tables_in_test
+t2
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+show create table t3;
+ERROR 42S02: Table 'test.t3' doesn't exist
+connection master;
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+include/save_master_gtid.inc
+connection slave;
+include/sync_with_master_gtid.inc
+CALL mtr.add_suppression('Slave: Unknown storage engine .* Error_code: 1286');
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
index 76f812b7512..d2f590ad136 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result
@@ -91,9 +91,6 @@ Warnings:
Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
@@ -114,7 +111,7 @@ Note 1051 Unknown table 'test.tt_1'
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
@@ -136,8 +133,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
@@ -293,7 +288,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -316,8 +310,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -370,7 +362,7 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -393,8 +385,8 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -456,7 +448,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -485,8 +476,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -803,7 +792,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -828,8 +816,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -884,7 +870,7 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -909,8 +895,8 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -974,7 +960,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1005,8 +990,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
diff --git a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
index cc85e454cd2..f6e04b950d8 100644
--- a/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result
@@ -85,9 +85,6 @@ Warnings:
Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
@@ -103,9 +100,6 @@ Warnings:
Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-TXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
@@ -121,9 +115,6 @@ Warnings:
Note 1051 Unknown table 'test.tt_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-NXe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
@@ -276,7 +267,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -303,8 +293,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -362,7 +350,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -389,8 +376,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -448,7 +433,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -475,8 +459,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -809,7 +791,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -838,8 +819,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -899,7 +878,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -928,8 +906,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -989,7 +965,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1018,8 +993,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
diff --git a/mysql-test/suite/rpl/r/rpl_row_drop_temp_table.result b/mysql-test/suite/rpl/r/rpl_row_drop_temp_table.result
new file mode 100644
index 00000000000..eea0dbd40e7
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_drop_temp_table.result
@@ -0,0 +1,38 @@
+include/master-slave.inc
+[connection master]
+connection slave;
+SET GLOBAL read_only=1;
+connection master;
+CREATE PROCEDURE testproc()
+BEGIN
+DROP TEMPORARY TABLE IF EXISTS t1_tmp;
+DROP TEMPORARY TABLE IF EXISTS t2_tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS t1_tmp ( t1 varchar(400) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TEMPORARY TABLE IF NOT EXISTS t2_tmp ( t2 varchar(16) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+END|
+SET GLOBAL read_only=1;
+CALL testproc();
+******** None of the above DROP TEMPORARY TABLE statement should be found in binary log ********
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE `testproc`()
+BEGIN
+DROP TEMPORARY TABLE IF EXISTS t1_tmp;
+DROP TEMPORARY TABLE IF EXISTS t2_tmp;
+CREATE TEMPORARY TABLE IF NOT EXISTS t1_tmp ( t1 varchar(400) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TEMPORARY TABLE IF NOT EXISTS t2_tmp ( t2 varchar(16) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+END
+connection slave;
+SELECT @@read_only;
+@@read_only
+1
+======== CLEAN UP =========
+connection master;
+DROP TEMPORARY TABLE t1_tmp;
+DROP TEMPORARY TABLE t2_tmp;
+DROP PROCEDURE testproc;
+SET GLOBAL read_only=0;
+connection slave;
+SET GLOBAL read_only=0;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
index d4bced3e521..d4250159866 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result
@@ -91,9 +91,6 @@ Warnings:
Note 1051 Unknown table 'test.tt_xx_1'
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-If-Xe-Temp << -b-b-b-b-b-b-b-b-b-b-b-
include/show_binlog_events.inc
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-Xe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TXe-Temp';
@@ -114,7 +111,7 @@ Note 1051 Unknown table 'test.tt_1'
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-TXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-NXe-Temp';
@@ -136,8 +133,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /* generated by server */
-master-bin.000001 # Gtid # # GTID #-#-#
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-If-NXe-Temp << -e-e-e-e-e-e-e-e-e-e-e-
SET @commands= 'Drop-Temp-TN-Temp';
@@ -293,7 +288,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -316,8 +310,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -370,7 +362,7 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -393,8 +385,8 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -456,7 +448,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -485,8 +476,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Xid # # COMMIT /* XID */
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp C << -e-e-e-e-e-e-e-e-e-e-e-
@@ -803,7 +792,6 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -828,8 +816,6 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_xx_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-Xe-Temp N Drop-Temp-If-Xe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -884,7 +870,7 @@ include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -909,8 +895,8 @@ master-bin.000001 # Query # # use `test`; INSERT INTO nt_xx_1() VALUES (1)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2`,`test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1`,`test`.`tt_1` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_2` /* generated by server */
+master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_tmp_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-TXe-Temp N Drop-Temp-If-TXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -974,7 +960,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_2` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
@@ -1005,8 +990,6 @@ master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`nt_tmp_1` /
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
-master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tt_1` /* generated by server */
master-bin.000001 # Query # # ROLLBACK
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-If-NXe-Temp N Drop-Temp-If-NXe-Temp R << -e-e-e-e-e-e-e-e-e-e-e-
diff --git a/mysql-test/suite/rpl/t/create_or_replace.inc b/mysql-test/suite/rpl/t/create_or_replace.inc
index 7d0dc487061..35a6ead60ca 100644
--- a/mysql-test/suite/rpl/t/create_or_replace.inc
+++ b/mysql-test/suite/rpl/t/create_or_replace.inc
@@ -205,6 +205,19 @@ set binlog_format="STATEMENT";
drop temporary table t8;
set @@binlog_format=@org_binlog_format;
+# MDEV-20091:
+# 1. No DROP should be logged for non-existing tmp table, nor
+# 2. at the connection close when its creation has not been logged.
+set @@session.binlog_format=default;
+drop temporary table if exists t9;
+
+--connect(con1,localhost,root,,)
+set session binlog_format=default;
+create temporary table t9 (i int);
+--echo *** Must be no DROP logged for t9 when there was no CREATE, at disconnect too ***
+--disconnect con1
+
+--connection server_1
--source include/show_binlog_events.inc
# Clean up
diff --git a/mysql-test/suite/rpl/t/kill_race_condition.test b/mysql-test/suite/rpl/t/kill_race_condition.test
index 4268c12cdbf..0f3b44864fe 100644
--- a/mysql-test/suite/rpl/t/kill_race_condition.test
+++ b/mysql-test/suite/rpl/t/kill_race_condition.test
@@ -2,27 +2,34 @@ source include/have_debug_sync.inc;
source include/have_binlog_format_row.inc;
source include/master-slave.inc;
+connection master;
+create table t1 (a int);
+--sync_slave_with_master
+
connection slave;
set global debug_dbug='d,rows_log_event_before_open_table';
-send set debug_sync='now WAIT_FOR before_open_table';
connection master;
-create table t1 (a int);
insert t1 values (1),(2),(3);
connection slave;
-reap;
+set debug_sync='now WAIT_FOR before_open_table';
let $a=`select id from information_schema.processlist where state='debug sync point: now'`;
replace_result $a slave_sql_thread;
eval kill $a;
set debug_sync='now SIGNAL go_ahead_sql';
+--let $slave_sql_errno= 1927
+--source include/wait_for_slave_sql_error.inc
+let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
+--echo Last_SQL_Error = $error
set global debug_dbug='';
set debug_sync='RESET';
-
connection master;
drop table t1;
connection slave;
-start slave;
+--source include/start_slave.inc
+let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
+--echo Last_SQL_Error = $error
source include/rpl_end.inc;
diff --git a/mysql-test/suite/rpl/t/mdev_17588-slave.opt b/mysql-test/suite/rpl/t/mdev_17588-slave.opt
new file mode 100644
index 00000000000..d73dbeca51a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/mdev_17588-slave.opt
@@ -0,0 +1 @@
+--loose-disable-innodb --replicate-ignore-table=test.t3
diff --git a/mysql-test/suite/rpl/t/mdev_17588.test b/mysql-test/suite/rpl/t/mdev_17588.test
new file mode 100644
index 00000000000..e9a340cbd25
--- /dev/null
+++ b/mysql-test/suite/rpl/t/mdev_17588.test
@@ -0,0 +1,39 @@
+--source include/master-slave.inc
+--source include/have_innodb.inc
+
+--connection master
+create table t1 (a int) engine=innodb;
+create table t2 (a int);
+create table t3 (a int) engine=innodb;
+--source include/save_master_gtid.inc
+
+--connection slave
+# Using ER_UNKNOWN_STORAGE_ENGINE wont work
+let $slave_sql_errno= 1286;
+--source include/wait_for_slave_sql_error.inc
+--let $status_items= Last_Error
+--source include/show_slave_status.inc
+STOP SLAVE IO_THREAD;
+source include/wait_for_slave_to_stop.inc;
+SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+show tables;
+show create table t2;
+--error ER_NO_SUCH_TABLE
+show create table t1;
+--error ER_NO_SUCH_TABLE
+show create table t3;
+
+--connection master
+drop table if exists t1;
+drop table if exists t2;
+drop table if exists t3;
+--source include/save_master_gtid.inc
+
+--connection slave
+--source include/sync_with_master_gtid.inc
+
+
+CALL mtr.add_suppression('Slave: Unknown storage engine .* Error_code: 1286');
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_row_drop_temp_table.test b/mysql-test/suite/rpl/t/rpl_row_drop_temp_table.test
new file mode 100644
index 00000000000..ba3770d3013
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_drop_temp_table.test
@@ -0,0 +1,54 @@
+# ==== Purpose ====
+#
+# Test verifies that plain DROP TEMPORARY TABLE IF EXISTS statements are not
+# replicated during row based replication.
+#
+# ==== Implementation ====
+#
+# Steps:
+# 0 - Have a read_only master and slave. Binlog format should be "ROW".
+# 1 - Create a procedure which executes DROP TEMPORARY TABLE IF EXISTS
+# statements prior to CREATE TEMPORARY TABLE.
+# 2 - Execute the procedure.
+# 3 - Verify that the DROP TEMPORARY TABLE IF EXISTS statements within the
+# procedure are not written to the binary log.
+#
+# ==== References ====
+#
+# MDEV-20091: DROP TEMPORARY table is logged despite no CREATE was logged
+#
+
+--source include/have_binlog_format_row.inc
+--source include/have_innodb.inc
+--source include/master-slave.inc
+
+connection slave;
+SET GLOBAL read_only=1;
+
+connection master;
+DELIMITER |;
+CREATE PROCEDURE testproc()
+BEGIN
+ DROP TEMPORARY TABLE IF EXISTS t1_tmp;
+ DROP TEMPORARY TABLE IF EXISTS t2_tmp;
+ CREATE TEMPORARY TABLE IF NOT EXISTS t1_tmp ( t1 varchar(400) DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ CREATE TEMPORARY TABLE IF NOT EXISTS t2_tmp ( t2 varchar(16) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+END|
+DELIMITER ;|
+SET GLOBAL read_only=1;
+CALL testproc();
+--echo ******** None of the above DROP TEMPORARY TABLE statement should be found in binary log ********
+--source include/show_binlog_events.inc
+--sync_slave_with_master
+SELECT @@read_only;
+
+--echo ======== CLEAN UP =========
+connection master;
+DROP TEMPORARY TABLE t1_tmp;
+DROP TEMPORARY TABLE t2_tmp;
+DROP PROCEDURE testproc;
+SET GLOBAL read_only=0;
+--sync_slave_with_master
+SET GLOBAL read_only=0;
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled
deleted file mode 100644
index 794e93a108b..00000000000
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled
+++ /dev/null
@@ -1,1236 +0,0 @@
---- suite/sys_vars/r/sysvars_innodb.result
-+++ suite/sys_vars/r/sysvars_innodb,32bit.reject
-@@ -47,13 +47,27 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 32
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
- SESSION_VALUE NULL
- GLOBAL_VALUE 150000
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 150000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT The upper limit of the sleep delay in usec. Value of 0 disables it.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000000
-@@ -67,10 +81,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8388608
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator. Size of a memory pool InnoDB uses to store data dictionary information and other internal data structures.
- NUMERIC_MIN_VALUE 524288
--NUMERIC_MAX_VALUE 9223372036854775807
-+NUMERIC_MAX_VALUE 2147483647
- NUMERIC_BLOCK_SIZE 1024
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
-@@ -81,7 +95,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Background commit interval in seconds
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1073741824
-@@ -137,7 +151,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB API transaction isolation level
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 3
-@@ -151,7 +165,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 64
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Data file autoextend increment in megabytes
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1000
-@@ -165,7 +179,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility) 1 => New style AUTOINC locking 2 => No AUTOINC locking (unsafe for SBR)
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 2
-@@ -263,7 +277,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Dump only the hottest N% of each buffer pool, defaults to 100
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 100
-@@ -305,7 +319,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT Number of buffer pool instances, set to higher value on high-end machines to increase scalability
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 64
-@@ -355,6 +369,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Deprecated. This option has no effect and will be removed in MariaDB 10.2.3.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 8388608
-@@ -375,7 +403,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT A number between [0, 100] that tells how oftern buffer pool dump status in percentages should be printed. E.g. 10 means that buffer pool dump status is printed when every 10% of number of buffer pool pages are dumped. Default is 0 (only start and end status is printed).
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 100
-@@ -446,7 +474,7 @@
- DEFAULT_VALUE ON
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BOOLEAN
--VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
-+VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -467,6 +495,104 @@
- ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make page cleaner LRU flushes use evicted instead of flushed page counts for its heuristics
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 100
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 100
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Divide page cleaner flush list flush batches into chunks of this size
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 10
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 10
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Page cleaner will keep on flushing the same buffer pool instance if its free list length is below this percentage of innodb_lru_scan_depth
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 100
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 100
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 100
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Divide page cleaner LRU list flush batches into chunks of this size
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE HIGH_CHECKPOINT
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE HIGH_CHECKPOINT
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The formula for LSN age factor for page cleaner adaptive flushing. LEGACY: Original Oracle MySQL 5.6 formula. HIGH_CHECKPOINT: (the default) Percona Server 5.6 formula.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT The maximum time limit for a single flush list flush iteration by the page cleaner thread in miliseconds
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT The maximum time limit for a single LRU tail flush iteration by the page cleaner thread in miliseconds
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -487,7 +613,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000
-@@ -515,7 +641,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT If the compression failure rate of a table is greater than this number more padding is added to the pages to reduce the failures. A value of zero implies no padding
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 100
-@@ -543,7 +669,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Percentage of empty space on a data page that can be reserved to make the page compressible.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 75
-@@ -557,14 +683,28 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 5000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket
- NUMERIC_MIN_VALUE 1
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
-+SESSION_VALUE NULL
-+GLOBAL_VALUE assert
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE assert
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, when used with file_per_table. All file io for the datafile after detected as corrupt are disabled, except for the deletion.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST assert,warn,salvage
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_DATA_FILE_PATH
- SESSION_VALUE NULL
- GLOBAL_VALUE ibdata1:12M:autoextend
-@@ -781,7 +921,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 120
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of pages reserved in doublewrite buffer for batch flushing
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 127
-@@ -789,6 +929,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE LEGACY
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE BACKOFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm to use for empty free list handling. Allowed values: LEGACY: Original Oracle MySQL 5.6 handling with single page flushes; BACKOFF: (default) Wait until cleaner produces a free page.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST LEGACY,BACKOFF
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
- SESSION_VALUE NULL
- GLOBAL_VALUE 1
-@@ -859,13 +1013,27 @@
- ENUM_VALUE_LIST OFF,ON,FORCE
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_FAKE_CHANGES
-+SESSION_VALUE OFF
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE SESSION
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FAST_SHUTDOWN
- SESSION_VALUE NULL
- GLOBAL_VALUE 1
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Speeds up the shutdown process of the InnoDB storage engine. Possible values are 0, 1 (faster) or 2 (fastest - crash-like).
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 2
-@@ -879,7 +1047,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 600
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Maximum number of seconds that semaphore times out in InnoDB.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 4294967295
-@@ -949,7 +1117,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Make the first page of the given tablespace dirty.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -963,7 +1131,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 30
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of iterations over which the background flushing is averaged.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1000
-@@ -986,12 +1154,12 @@
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
--SESSION_VALUE NULL
-+SESSION_VALUE 1
- GLOBAL_VALUE 1
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
--VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_SCOPE SESSION
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 3
-@@ -1019,7 +1187,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Set to 0 (don't flush neighbors from buffer pool), 1 (flush contiguous neighbors from buffer pool) or 2 (flush neighbors from buffer pool), when flushing a block
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 2
-@@ -1061,7 +1229,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps to save your data in case the disk image of the database becomes corrupt.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 6
-@@ -1069,6 +1237,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
-+SESSION_VALUE NULL
-+GLOBAL_VALUE EXPONENTIAL_BACKOFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE EXPONENTIAL_BACKOFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm InnoDB uses for the query threads at sync preflush. Possible values are SYNC_PREFLUSH: perform a sync preflush as Oracle MySQL; EXPONENTIAL_BACKOFF: (default) wait for the page cleaner flush.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FT_AUX_TABLE
- SESSION_VALUE NULL
- GLOBAL_VALUE
-@@ -1089,7 +1271,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8000000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search cache size in bytes
- NUMERIC_MIN_VALUE 1600000
- NUMERIC_MAX_VALUE 80000000
-@@ -1131,7 +1313,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 84
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search maximum token size in characters
- NUMERIC_MIN_VALUE 10
- NUMERIC_MAX_VALUE 84
-@@ -1145,7 +1327,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 3
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search minimum token size in characters
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 16
-@@ -1159,7 +1341,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search number of words to optimize for each optimize table call
- NUMERIC_MIN_VALUE 1000
- NUMERIC_MAX_VALUE 10000
-@@ -1173,10 +1355,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2000000000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search query result cache limit in bytes
- NUMERIC_MIN_VALUE 1000000
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1201,7 +1383,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 2
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB Fulltext search parallel sort degree, will round up to nearest power of 2 number
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 16
-@@ -1215,7 +1397,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 640000000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Total memory allocated for InnoDB Fulltext Search cache
- NUMERIC_MIN_VALUE 32000000
- NUMERIC_MAX_VALUE 1600000000
-@@ -1243,7 +1425,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 100
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 100
-@@ -1285,10 +1467,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 200
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of IOPs the server can do. Tunes the background IO rate
- NUMERIC_MIN_VALUE 100
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1297,12 +1479,26 @@
- SESSION_VALUE NULL
- GLOBAL_VALUE 2000
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
--DEFAULT_VALUE 18446744073709551615
-+DEFAULT_VALUE 4294967295
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Limit to which innodb_io_capacity can be inflated.
- NUMERIC_MIN_VALUE 100
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT
-+VARIABLE_COMMENT No effect for this build.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 2147483647
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1335,6 +1531,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE ON
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE ON
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT ###EXPERIMENTAL### if enabled, transactions will get S row locks instead of X locks for fake changes. If disabled, fake change transactions will not take any locks at all.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -1369,7 +1579,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 50
- VARIABLE_SCOPE SESSION
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1073741824
-@@ -1377,16 +1587,72 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOG_ARCHIVE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Set to 1 if you want to have logs archived.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_ARCH_DIR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE PATH
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE VARCHAR
-+VARIABLE_COMMENT Where full logs should be archived.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Expiration time for archived innodb transaction logs.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 512
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 512
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT ###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!
-+NUMERIC_MIN_VALUE 512
-+NUMERIC_MAX_VALUE 65536
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 1048576
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 16777216
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT The size of the buffer which InnoDB uses to write log to the log files on disk.
- NUMERIC_MIN_VALUE 262144
--NUMERIC_MAX_VALUE 9223372036854775807
-+NUMERIC_MAX_VALUE 2147483647
- NUMERIC_BLOCK_SIZE 1024
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
-@@ -1405,6 +1671,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE INNODB
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE INNODB
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm InnoDB uses for log block checksums. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Logs created when this option is set to crc32/strict_crc32/none/strict_none will not be readable by any MySQL version or Percona Server versions that donot support this feature
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
- SESSION_VALUE NULL
- GLOBAL_VALUE ON
-@@ -1425,7 +1705,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 2
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of log files in the log group. InnoDB writes to the files in a circular fashion.
- NUMERIC_MIN_VALUE 2
- NUMERIC_MAX_VALUE 100
-@@ -1467,9 +1747,37 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 1024
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT How deep to scan LRU to keep it clean
- NUMERIC_MIN_VALUE 100
-+NUMERIC_MAX_VALUE 4294967295
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 104857600
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 104857600
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum size of changed page bitmap files
-+NUMERIC_MIN_VALUE 4096
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum number of rows for INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table, 0 - unlimited
-+NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 18446744073709551615
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
-@@ -1509,10 +1817,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Desired maximum length of the purge queue (0 = no limit)
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1523,7 +1831,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Maximum delay of user threads in micro-seconds
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 10000000
-@@ -1537,7 +1845,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT Number of identical copies of log groups we keep for the database. Currently this should be set to 1.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 10
-@@ -1607,7 +1915,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 8
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT Number of multi-threaded flush threads
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 64
-@@ -1659,14 +1967,14 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_OPEN_FILES
- SESSION_VALUE NULL
--GLOBAL_VALUE 2000
-+GLOBAL_VALUE 300
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT
-+VARIABLE_TYPE INT
- VARIABLE_COMMENT How many files at the maximum InnoDB keeps open at the same time.
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 9223372036854775807
-+NUMERIC_MAX_VALUE 2147483647
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
-@@ -1691,7 +1999,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of rw_locks protecting buffer pool page_hash. Rounded up to the next power of 2
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1024
-@@ -1705,7 +2013,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 16384
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Page size to use for all InnoDB tablespaces.
- NUMERIC_MIN_VALUE 4096
- NUMERIC_MAX_VALUE 65536
-@@ -1741,13 +2049,83 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRINT_LOCK_WAIT_TIMEOUT_INFO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Print lock wait timeout info to MySQL error log (off by default)
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_CLEANER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make buffer pool cleaner and LRU manager threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_IO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make I/O threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_MASTER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make buffer pool cleaner thread acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_PURGE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make purge coordinator and worker threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 300
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 300
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of UNDO log pages to purge in one batch from the history list.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 5000
-@@ -1789,7 +2167,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Purge threads can be from 1 to 32. Default is 1.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 32
-@@ -1817,7 +2195,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 56
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of pages that must be accessed sequentially for InnoDB to trigger a readahead.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 64
-@@ -1831,7 +2209,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 4
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of background read I/O threads in InnoDB.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 64
-@@ -1859,10 +2237,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Replication thread delay (ms) on the slave server if innodb_thread_concurrency is reached (0 by default)
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -1887,7 +2265,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 128
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo logs to use (deprecated).
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 128
-@@ -1901,7 +2279,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT An InnoDB page number.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
-@@ -1909,6 +2287,48 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Nice value for the I/O handler thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Nice value for the master thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Nice value for the purge thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_SCRUB_LOG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -1937,6 +2357,34 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 10
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 10
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Number of locks held to print for each InnoDB transaction in SHOW INNODB STATUS.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 1000
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE INT UNSIGNED
-+VARIABLE_COMMENT Whether to show records locked in SHOW INNODB STATUS.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 1
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
- SESSION_VALUE NULL
- GLOBAL_VALUE 0
-@@ -1957,7 +2405,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1048576
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Memory buffer size for index creation
- NUMERIC_MIN_VALUE 65536
- NUMERIC_MAX_VALUE 67108864
-@@ -1971,10 +2419,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 6
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Maximum delay between polling for a spin lock (6 by default)
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -2014,7 +2462,7 @@
- DEFAULT_VALUE nulls_equal
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE ENUM
--VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
-+VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -2181,7 +2629,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Size of the mutex/lock wait array.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 1024
-@@ -2195,10 +2643,10 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 30
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Count of spin-loop rounds in InnoDB mutexes (30 by default)
- NUMERIC_MIN_VALUE 0
--NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_MAX_VALUE 4294967295
- NUMERIC_BLOCK_SIZE 0
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
-@@ -2223,7 +2671,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000
-@@ -2237,7 +2685,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 10000
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 1000000
-@@ -2259,6 +2707,34 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Track the redo log for changed pages and output a changed page bitmap
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Force log tracker to catch up with checkpoint now
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -2307,7 +2783,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 128
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo logs to use.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 128
-@@ -2321,7 +2797,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of undo tablespaces to use.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 126
-@@ -2336,7 +2812,7 @@
- DEFAULT_VALUE OFF
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BOOLEAN
--VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
-+VARIABLE_COMMENT Prevent partial page writes, via atomic writes (beta). The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer. Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -2357,6 +2833,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
-+SESSION_VALUE NULL
-+GLOBAL_VALUE ON
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE ON
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Use global innodb_flush_log_at_trx_commit value. (default: ON).
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_USE_MTFLUSH
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -2371,6 +2861,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_USE_STACKTRACE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Print stacktrace on long semaphore wait (off by default supported only on linux)
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_USE_SYS_MALLOC
- SESSION_VALUE NULL
- GLOBAL_VALUE ON
-@@ -2401,12 +2905,12 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_VERSION
- SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.44
-+GLOBAL_VALUE 5.6.43-84.3
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE NULL
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE VARCHAR
--VARIABLE_COMMENT InnoDB version
-+VARIABLE_COMMENT Percona-InnoDB-plugin version
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -2419,7 +2923,7 @@
- GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 4
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT Number of background write I/O threads in InnoDB.
- NUMERIC_MIN_VALUE 1
- NUMERIC_MAX_VALUE 64
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled
deleted file mode 100644
index 195eda13c52..00000000000
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled
+++ /dev/null
@@ -1,697 +0,0 @@
---- mysql-test/suite/sys_vars/r/sysvars_innodb.result 2018-07-30 23:41:05.030930072 +0200
-+++ mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.reject 2018-07-31 09:45:20.330811949 +0200
-@@ -47,6 +47,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTITIONS
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Number of InnoDB adaptive hash index partitions (default 1: disable partitioning)
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 64
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
- SESSION_VALUE NULL
- GLOBAL_VALUE 150000
-@@ -355,6 +369,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_BUFFER_POOL_POPULATE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Deprecated. This option has no effect and will be removed in MariaDB 10.2.3.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 8388608
-@@ -446,7 +474,7 @@
- DEFAULT_VALUE ON
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BOOLEAN
--VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF. Enable InnoDB checksums validation (enabled by default). Disable with --skip-innodb-checksums.
-+VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setting this to OFF
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -467,6 +495,104 @@
- ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_EVICTION_FACTOR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make page cleaner LRU flushes use evicted instead of flushed page counts for its heuristics
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 100
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 100
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Divide page cleaner flush list flush batches into chunks of this size
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_FREE_LIST_LWM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 10
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 10
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Page cleaner will keep on flushing the same buffer pool instance if its free list length is below this percentage of innodb_lru_scan_depth
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 100
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_LRU_CHUNK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 100
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 100
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Divide page cleaner LRU list flush batches into chunks of this size
-+NUMERIC_MIN_VALUE 1
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_LSN_AGE_FACTOR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE HIGH_CHECKPOINT
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE HIGH_CHECKPOINT
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The formula for LSN age factor for page cleaner adaptive flushing. LEGACY: Original Oracle MySQL 5.6 formula. HIGH_CHECKPOINT: (the default) Percona Server 5.6 formula.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST LEGACY,HIGH_CHECKPOINT
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_CLEANER_MAX_FLUSH_TIME
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum time limit for a single flush list flush iteration by the page cleaner thread in miliseconds
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CLEANER_MAX_LRU_TIME
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum time limit for a single LRU tail flush iteration by the page cleaner thread in miliseconds
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -565,6 +691,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_CORRUPT_TABLE_ACTION
-+SESSION_VALUE NULL
-+GLOBAL_VALUE assert
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE assert
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT Warn corruptions of user tables as 'corrupt table' instead of not crashing itself, when used with file_per_table. All file io for the datafile after detected as corrupt are disabled, except for the deletion.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST assert,warn,salvage
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_DATA_FILE_PATH
- SESSION_VALUE NULL
- GLOBAL_VALUE ibdata1:12M:autoextend
-@@ -789,6 +929,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_EMPTY_FREE_LIST_ALGORITHM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE LEGACY
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE BACKOFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm to use for empty free list handling. Allowed values: LEGACY: Original Oracle MySQL 5.6 handling with single page flushes; BACKOFF: (default) Wait until cleaner produces a free page.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST LEGACY,BACKOFF
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
- SESSION_VALUE NULL
- GLOBAL_VALUE 1
-@@ -859,6 +1013,20 @@
- ENUM_VALUE_LIST OFF,ON,FORCE
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_FAKE_CHANGES
-+SESSION_VALUE OFF
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE SESSION
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT In the transaction after enabled, UPDATE, INSERT and DELETE only move the cursor to the records and do nothing other operations (no changes, no ibuf, no undo, no transaction log) in the transaction. This is to cause replication prefetch IO. ATTENTION: the transaction started after enabled is affected.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FAST_SHUTDOWN
- SESSION_VALUE NULL
- GLOBAL_VALUE 1
-@@ -986,11 +1154,11 @@
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
--SESSION_VALUE NULL
-+SESSION_VALUE 1
- GLOBAL_VALUE 1
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 1
--VARIABLE_SCOPE GLOBAL
-+VARIABLE_SCOPE SESSION
- VARIABLE_TYPE BIGINT UNSIGNED
- VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
- NUMERIC_MIN_VALUE 0
-@@ -1069,6 +1237,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_FOREGROUND_PREFLUSH
-+SESSION_VALUE NULL
-+GLOBAL_VALUE EXPONENTIAL_BACKOFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE EXPONENTIAL_BACKOFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm InnoDB uses for the query threads at sync preflush. Possible values are SYNC_PREFLUSH: perform a sync preflush as Oracle MySQL; EXPONENTIAL_BACKOFF: (default) wait for the page cleaner flush.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST SYNC_PREFLUSH,EXPONENTIAL_BACKOFF
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_FT_AUX_TABLE
- SESSION_VALUE NULL
- GLOBAL_VALUE
-@@ -1307,6 +1489,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_KILL_IDLE_TRANSACTION
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT
-+VARIABLE_COMMENT No effect for this build.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 9223372036854775807
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_LARGE_PREFIX
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -1335,6 +1531,20 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOCKING_FAKE_CHANGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE ON
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE ON
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT ###EXPERIMENTAL### if enabled, transactions will get S row locks instead of X locks for fake changes. If disabled, fake change transactions will not take any locks at all.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -1377,6 +1587,62 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOG_ARCHIVE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Set to 1 if you want to have logs archived.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_ARCH_DIR
-+SESSION_VALUE NULL
-+GLOBAL_VALUE PATH
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE VARCHAR
-+VARIABLE_COMMENT Where full logs should be archived.
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_LOG_ARCH_EXPIRE_SEC
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Expiration time for archived innodb transaction logs.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_BLOCK_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 512
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 512
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT ###EXPERIMENTAL###: The log block size of the transaction log file. Changing for created log file is not supported. Use on your own risk!
-+NUMERIC_MIN_VALUE 512
-+NUMERIC_MAX_VALUE 65536
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 1048576
-@@ -1405,6 +1671,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
-+SESSION_VALUE NULL
-+GLOBAL_VALUE INNODB
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE INNODB
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE ENUM
-+VARIABLE_COMMENT The algorithm InnoDB uses for log block checksums. Possible values are CRC32 (hardware accelerated if the CPU supports it) write crc32, allow any of the other checksums to match when reading; STRICT_CRC32 write crc32, do not allow other algorithms to match when reading; INNODB write a software calculated checksum, allow any other checksums to match when reading; STRICT_INNODB write a software calculated checksum, do not allow other algorithms to match when reading; NONE write a constant magic number, do not do any checksum verification when reading (same as innodb_checksums=OFF); STRICT_NONE write a constant magic number, do not allow values other than that magic number when reading; Logs created when this option is set to crc32/strict_crc32/none/strict_none will not be readable by any MySQL version or Percona Server versions that donot support this feature
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
- SESSION_VALUE NULL
- GLOBAL_VALUE ON
-@@ -1475,6 +1755,34 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_MAX_BITMAP_FILE_SIZE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 104857600
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 104857600
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum size of changed page bitmap files
-+NUMERIC_MIN_VALUE 4096
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_MAX_CHANGED_PAGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 1000000
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 1000000
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT The maximum number of rows for INFORMATION_SCHEMA.INNODB_CHANGED_PAGES table, 0 - unlimited
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 18446744073709551615
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
- SESSION_VALUE NULL
- GLOBAL_VALUE 75.000000
-@@ -1659,7 +1967,7 @@
- COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_OPEN_FILES
- SESSION_VALUE NULL
--GLOBAL_VALUE 2000
-+GLOBAL_VALUE 300
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
-@@ -1741,6 +2049,76 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRINT_LOCK_WAIT_TIMEOUT_INFO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Print lock wait timeout info to MySQL error log (off by default)
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_CLEANER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make buffer pool cleaner and LRU manager threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_IO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make I/O threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_MASTER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make buffer pool cleaner thread acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_PRIORITY_PURGE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Make purge coordinator and worker threads acquire shared resources with priority
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
- SESSION_VALUE NULL
- GLOBAL_VALUE 300
-@@ -1909,6 +2287,48 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_IO
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Nice value for the I/O handler thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_MASTER
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Nice value for the master thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SCHED_PRIORITY_PURGE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 19
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 19
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Nice value for the purge thread scheduling
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 39
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
- VARIABLE_NAME INNODB_SCRUB_LOG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -1937,6 +2357,34 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_SHOW_LOCKS_HELD
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 10
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 10
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Number of locks held to print for each InnoDB transaction in SHOW INNODB STATUS.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 1000
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT REQUIRED
-+VARIABLE_NAME INNODB_SHOW_VERBOSE_LOCKS
-+SESSION_VALUE NULL
-+GLOBAL_VALUE 0
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE 0
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_COMMENT Whether to show records locked in SHOW INNODB STATUS.
-+NUMERIC_MIN_VALUE 0
-+NUMERIC_MAX_VALUE 1
-+NUMERIC_BLOCK_SIZE 0
-+ENUM_VALUE_LIST NULL
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
- SESSION_VALUE NULL
- GLOBAL_VALUE 0
-@@ -2014,7 +2462,7 @@
- DEFAULT_VALUE nulls_equal
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE ENUM
--VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs. Possible values are NULLS_EQUAL (default), NULLS_UNEQUAL and NULLS_IGNORED
-+VARIABLE_COMMENT Specifies how InnoDB index statistics collection code should treat NULLs
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -2259,6 +2707,34 @@
- ENUM_VALUE_LIST NULL
- READ_ONLY NO
- COMMAND_LINE_ARGUMENT OPTIONAL
-+VARIABLE_NAME INNODB_TRACK_CHANGED_PAGES
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Track the redo log for changed pages and output a changed page bitmap
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Force log tracker to catch up with checkpoint now
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -2336,7 +2812,7 @@
- DEFAULT_VALUE OFF
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE BOOLEAN
--VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer.Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
-+VARIABLE_COMMENT Prevent partial page writes, via atomic writes (beta). The option is used to prevent partial writes in case of a crash/poweroff, as faster alternative to doublewrite buffer. Currently this option works only on Linux only with FusionIO device, and directFS filesystem.
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
-@@ -2357,6 +2833,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
-+SESSION_VALUE NULL
-+GLOBAL_VALUE ON
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE ON
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Use global innodb_flush_log_at_trx_commit value. (default: ON).
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY NO
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_USE_MTFLUSH
- SESSION_VALUE NULL
- GLOBAL_VALUE OFF
-@@ -2371,6 +2861,20 @@
- ENUM_VALUE_LIST OFF,ON
- READ_ONLY YES
- COMMAND_LINE_ARGUMENT NONE
-+VARIABLE_NAME INNODB_USE_STACKTRACE
-+SESSION_VALUE NULL
-+GLOBAL_VALUE OFF
-+GLOBAL_VALUE_ORIGIN COMPILE-TIME
-+DEFAULT_VALUE OFF
-+VARIABLE_SCOPE GLOBAL
-+VARIABLE_TYPE BOOLEAN
-+VARIABLE_COMMENT Print stacktrace on long semaphore wait (off by default supported only on linux)
-+NUMERIC_MIN_VALUE NULL
-+NUMERIC_MAX_VALUE NULL
-+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST OFF,ON
-+READ_ONLY YES
-+COMMAND_LINE_ARGUMENT NONE
- VARIABLE_NAME INNODB_USE_SYS_MALLOC
- SESSION_VALUE NULL
- GLOBAL_VALUE ON
-@@ -2401,12 +2905,12 @@
- COMMAND_LINE_ARGUMENT OPTIONAL
- VARIABLE_NAME INNODB_VERSION
- SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.44
-+GLOBAL_VALUE 5.6.43-84.3
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE NULL
- VARIABLE_SCOPE GLOBAL
- VARIABLE_TYPE VARCHAR
--VARIABLE_COMMENT InnoDB version
-+VARIABLE_COMMENT Percona-InnoDB-plugin version
- NUMERIC_MIN_VALUE NULL
- NUMERIC_MAX_VALUE NULL
- NUMERIC_BLOCK_SIZE NULL
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index 388fe7b8f4f..6314132ca6c 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -21,6 +21,7 @@ SET GLOBAL wsrep_provider=none;
CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*");
SHOW GLOBAL STATUS LIKE 'wsrep%';
Variable_name Value
+wsrep_applier_thread_count #
wsrep_apply_oooe #
wsrep_apply_oool #
wsrep_apply_window #
@@ -74,10 +75,12 @@ wsrep_repl_keys_bytes #
wsrep_repl_other_bytes #
wsrep_replicated #
wsrep_replicated_bytes #
+wsrep_rollbacker_thread_count #
wsrep_thread_count #
SHOW GLOBAL STATUS LIKE 'wsrep_%';
Variable_name Value
+wsrep_applier_thread_count #
wsrep_apply_oooe #
wsrep_apply_oool #
wsrep_apply_window #
@@ -131,6 +134,7 @@ wsrep_repl_keys_bytes #
wsrep_repl_other_bytes #
wsrep_replicated #
wsrep_replicated_bytes #
+wsrep_rollbacker_thread_count #
wsrep_thread_count #
SHOW GLOBAL STATUS LIKE 'wsrep_local_state_comment';
Variable_name Value
@@ -185,7 +189,16 @@ wsrep_thread_count 0
# Setting wsrep_cluster_address triggers the creation of
# applier/rollbacker threads.
SET GLOBAL wsrep_cluster_address= 'gcomm://';
-# Wait for applier threads to get created.
+# Wait for applier thread to get created 1.
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+VARIABLE_VALUE
+1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
+VARIABLE_VALUE
+1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+VARIABLE_VALUE
+2
SELECT @@global.wsrep_provider;
@@global.wsrep_provider
libgalera_smm.so
@@ -201,13 +214,19 @@ wsrep_thread_count 2
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads= 10;
-# Wait for applier threads to get created.
+# Wait for 9 applier threads to get created.
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+VARIABLE_VALUE
+10
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
+VARIABLE_VALUE
+1
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+VARIABLE_VALUE
+11
SHOW STATUS LIKE 'threads_connected';
Variable_name Value
Threads_connected 1
-SHOW STATUS LIKE 'wsrep_thread_count';
-Variable_name Value
-wsrep_thread_count 11
set wsrep_on=0;
set wsrep_on=1;
create user test@localhost;
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index c13a8c5f281..5032398fc42 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -1,4 +1,5 @@
--source include/have_wsrep.inc
+--source include/force_restart.inc
SET @wsrep_provider_options_saved= @@global.wsrep_provider_options;
SET @wsrep_cluster_address_saved= @@global.wsrep_cluster_address;
@@ -98,10 +99,14 @@ SHOW STATUS LIKE 'wsrep_thread_count';
--echo # applier/rollbacker threads.
SET GLOBAL wsrep_cluster_address= 'gcomm://';
---echo # Wait for applier threads to get created.
---let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--echo # Wait for applier thread to get created 1.
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider;
SELECT @@global.wsrep_cluster_address;
@@ -112,12 +117,15 @@ SHOW STATUS LIKE 'wsrep_thread_count';
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads= 10;
---echo # Wait for applier threads to get created.
---let $wait_condition = SELECT VARIABLE_VALUE = 11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+--echo # Wait for 9 applier threads to get created.
+--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
+SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
+
SHOW STATUS LIKE 'threads_connected';
-SHOW STATUS LIKE 'wsrep_thread_count';
#
# privileges for wsrep_on
diff --git a/plugin/server_audit/server_audit.c b/plugin/server_audit/server_audit.c
index d54203544d4..0832e7f390d 100644
--- a/plugin/server_audit/server_audit.c
+++ b/plugin/server_audit/server_audit.c
@@ -24,8 +24,13 @@
#include <assert.h>
#ifndef _WIN32
+#define DO_SYSLOG
#include <syslog.h>
+static const char out_type_desc[]= "Desired output type. Possible values - 'syslog', 'file'"
+ " or 'null' as no output.";
#else
+static const char out_type_desc[]= "Desired output type. Possible values - 'file'"
+ " or 'null' as no output.";
#define syslog(PRIORITY, FORMAT, INFO, MESSAGE_LEN, MESSAGE) do {}while(0)
static void closelog() {}
#define openlog(IDENT, LOG_NOWAIT, LOG_USER) do {}while(0)
@@ -87,6 +92,7 @@ static void closelog() {}
#include <mysql/plugin.h>
#include <mysql/plugin_audit.h>
#include <string.h>
+#include "../../mysys/mysys_priv.h"
#ifndef RTLD_DEFAULT
#define RTLD_DEFAULT NULL
#endif
@@ -384,18 +390,28 @@ static MYSQL_SYSVAR_SET(events, events, PLUGIN_VAR_RQCMDARG,
"Specifies the set of events to monitor. Can be CONNECT, QUERY, TABLE,"
" QUERY_DDL, QUERY_DML, QUERY_DML_NO_SELECT, QUERY_DCL.",
NULL, NULL, 0, &events_typelib);
+#ifdef DO_SYSLOG
#define OUTPUT_SYSLOG 0
#define OUTPUT_FILE 1
+#else
+#define OUTPUT_SYSLOG 0xFFFF
+#define OUTPUT_FILE 0
+#endif /*DO_SYSLOG*/
+
#define OUTPUT_NO 0xFFFF
-static const char *output_type_names[]= { "syslog", "file", 0 };
+static const char *output_type_names[]= {
+#ifdef DO_SYSLOG
+ "syslog",
+#endif
+ "file", 0 };
static TYPELIB output_typelib=
{
array_elements(output_type_names) - 1, "output_typelib",
output_type_names, NULL
};
static MYSQL_SYSVAR_ENUM(output_type, output_type, PLUGIN_VAR_RQCMDARG,
- "Desired output type. Possible values - 'syslog', 'file'"
- " or 'null' as no output.", 0, update_output_type, OUTPUT_FILE,
+ out_type_desc,
+ 0, update_output_type, OUTPUT_FILE,
&output_typelib);
static MYSQL_SYSVAR_STR(file_path, file_path, PLUGIN_VAR_RQCMDARG,
"Path to the log file.", NULL, update_file_path, default_file_name);
@@ -1138,6 +1154,7 @@ static void setup_connection_connect(struct connection_info *cn,
#define SAFE_STRLEN(s) (s ? strlen(s) : 0)
+#define SAFE_STRLEN_UI(s) ((unsigned int) (s ? strlen(s) : 0))
static char empty_str[1]= { 0 };
@@ -1297,7 +1314,7 @@ exit:
static size_t log_header(char *message, size_t message_len,
time_t *ts,
- const char *serverhost, unsigned int serverhost_len,
+ const char *serverhost, size_t serverhost_len,
const char *username, unsigned int username_len,
const char *host, unsigned int host_len,
const char *userip, unsigned int userip_len,
@@ -1315,7 +1332,7 @@ static size_t log_header(char *message, size_t message_len,
if (output_type == OUTPUT_SYSLOG)
return my_snprintf(message, message_len,
"%.*s,%.*s,%.*s,%d,%lld,%s",
- serverhost_len, serverhost,
+ (unsigned int) serverhost_len, serverhost,
username_len, username,
host_len, host,
connection_id, query_id, operation);
@@ -1794,9 +1811,9 @@ static int log_table(const struct connection_info *cn,
(void) time(&ctime);
csize= log_header(message, sizeof(message)-1, &ctime,
servhost, servhost_len,
- event->user, (unsigned int)SAFE_STRLEN(event->user),
- event->host, (unsigned int)SAFE_STRLEN(event->host),
- event->ip, (unsigned int)SAFE_STRLEN(event->ip),
+ event->user, SAFE_STRLEN_UI(event->user),
+ event->host, SAFE_STRLEN_UI(event->host),
+ event->ip, SAFE_STRLEN_UI(event->ip),
event->thread_id, cn->query_id, type);
csize+= my_snprintf(message+csize, sizeof(message) - 1 - csize,
",%.*s,%.*s,",event->database.length, event->database.str,
@@ -1816,9 +1833,9 @@ static int log_rename(const struct connection_info *cn,
(void) time(&ctime);
csize= log_header(message, sizeof(message)-1, &ctime,
servhost, servhost_len,
- event->user, (unsigned int)SAFE_STRLEN(event->user),
- event->host, (unsigned int)SAFE_STRLEN(event->host),
- event->ip, (unsigned int)SAFE_STRLEN(event->ip),
+ event->user, SAFE_STRLEN_UI(event->user),
+ event->host, SAFE_STRLEN_UI(event->host),
+ event->ip, SAFE_STRLEN_UI(event->ip),
event->thread_id, cn->query_id, "RENAME");
csize+= my_snprintf(message+csize, sizeof(message) - 1 - csize,
",%.*s,%.*s|%.*s.%.*s,",event->database.length, event->database.str,
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index d40dd9a0c5f..f32142e86a8 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -720,9 +720,9 @@ fi
safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}}
# Make sure that directory for $safe_mysql_unix_port exists
mysql_unix_port_dir=`dirname $safe_mysql_unix_port`
-if [ ! -d $mysql_unix_port_dir ]
+if [ ! -d $mysql_unix_port_dir -a $dry_run -eq 0 ]
then
- if ! `mkdir -p $mysql_unix_port_dir`
+ if ! mkdir -p $mysql_unix_port_dir
then
log_error "Fatal error Can't create database directory '$mysql_unix_port'"
exit 1
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 46fdbd2a4a1..bbe711791e6 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -6769,9 +6769,9 @@ longlong Item_func_lastval::val_int()
/*
Sets next value to be returned from sequences
- SELECT setval('foo', 42, 0); Next nextval will return 43
- SELECT setval('foo', 42, 0, true); Same as above
- SELECT setval('foo', 42, 0, false); Next nextval will return 42
+ SELECT setval(foo, 42, 0); Next nextval will return 43
+ SELECT setval(foo, 42, 0, true); Same as above
+ SELECT setval(foo, 42, 0, false); Next nextval will return 42
*/
longlong Item_func_setval::val_int()
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 4051ae461ee..deff97e4802 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -3055,11 +3055,14 @@ Item_sum_hybrid::min_max_update_str_field()
if (!args[0]->null_value)
{
- result_field->val_str(&cmp->value2);
-
- if (result_field->is_null() ||
- (cmp_sign * sortcmp(res_str,&cmp->value2,collation.collation)) < 0)
+ if (result_field->is_null())
result_field->store(res_str->ptr(),res_str->length(),res_str->charset());
+ else
+ {
+ result_field->val_str(&cmp->value2);
+ if ((cmp_sign * sortcmp(res_str,&cmp->value2,collation.collation)) < 0)
+ result_field->store(res_str->ptr(),res_str->length(),res_str->charset());
+ }
result_field->set_notnull();
}
DBUG_VOID_RETURN;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 350c6c30c18..060c4592a74 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -292,7 +292,7 @@ class Write_on_release_cache
public:
enum flag
{
- FLUSH_F
+ FLUSH_F= 1
};
typedef unsigned short flag_set;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 0e6070b26df..ae6334014a7 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -5801,6 +5801,9 @@ int mysqld_main(int argc, char **argv)
{
wsrep_init_startup (false);
}
+
+ WSREP_DEBUG("Startup creating %ld applier threads running %lu",
+ wsrep_slave_threads - 1, wsrep_running_applier_threads);
wsrep_create_appliers(wsrep_slave_threads - 1);
}
}
@@ -7859,6 +7862,8 @@ SHOW_VAR status_vars[]= {
{"wsrep_provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
{"wsrep_provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
{"wsrep_thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH},
+ {"wsrep_applier_thread_count", (char*) &wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
+ {"wsrep_rollbacker_thread_count", (char *) &wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
{"wsrep_cluster_capabilities", (char*) &wsrep_cluster_capabilities, SHOW_CHAR_PTR},
{"wsrep", (char*) &wsrep_show_status, SHOW_FUNC},
#endif
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 509320e7a97..732edcd5bc6 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -115,15 +115,6 @@ void Master_info::wait_until_free()
Master_info::~Master_info()
{
wait_until_free();
-#ifdef WITH_WSREP
- /*
- Do not free "wsrep" rpl_filter. It will eventually be freed by
- free_all_rpl_filters() when server terminates.
- */
- if (strncmp(connection_name.str, STRING_WITH_LEN("wsrep")))
-#endif
- rpl_filters.delete_element(connection_name.str, connection_name.length,
- (void (*)(const char*, uchar*)) free_rpl_filter);
my_free(const_cast<char*>(connection_name.str));
delete_dynamic(&ignore_server_ids);
mysql_mutex_destroy(&run_lock);
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 48bd8ac8221..dfbfde64029 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -147,7 +147,7 @@ sp_get_flags_for_command(LEX *lex)
switch (lex->sql_command) {
case SQLCOM_SELECT:
- if (lex->result)
+ if (lex->result && !lex->analyze_stmt)
{
flags= 0; /* This is a SELECT with INTO clause */
break;
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index a5f27e2c562..4279cc25010 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -76,7 +76,7 @@ uint plugin_maturity_map[]=
{ 0, 1, 2, 3, 4, 5, 6 };
/*
- When you ad a new plugin type, add both a string and make sure that the
+ When you add a new plugin type, add both a string and make sure that the
init and deinit array are correctly updated.
*/
const LEX_CSTRING plugin_type_names[MYSQL_MAX_PLUGIN_TYPE_NUM]=
@@ -3696,7 +3696,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
const LEX_CSTRING plugin_dash = { STRING_WITH_LEN("plugin-") };
size_t plugin_name_len= strlen(plugin_name);
size_t optnamelen;
- const int max_comment_len= 180;
+ const int max_comment_len= 255;
char *comment= (char *) alloc_root(mem_root, max_comment_len + 1);
char *optname;
@@ -3730,8 +3730,9 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
options[0].typelib= options[1].typelib= &global_plugin_typelib;
strxnmov(comment, max_comment_len, "Enable or disable ", plugin_name,
- " plugin. One of: ON, OFF, FORCE (don't start "
- "if the plugin fails to load).", NullS);
+ " plugin. One of: ON, OFF, FORCE (don't start if the plugin"
+ " fails to load), FORCE_PLUS_PERMANENT (like FORCE, but the"
+ " plugin can not be uninstalled).", NullS);
options[0].comment= comment;
/*
Allocate temporary space for the value of the tristate.
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 23827898160..b5bc91e599c 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -13153,7 +13153,10 @@ void JOIN_TAB::cleanup()
if (table)
{
table->file->ha_end_keyread();
- table->file->ha_index_or_rnd_end();
+ if (type == JT_FT)
+ table->file->ha_ft_end();
+ else
+ table->file->ha_index_or_rnd_end();
preread_init_done= FALSE;
if (table->pos_in_table_list &&
table->pos_in_table_list->jtbm_subselect)
diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc
index 9f17590a315..4e8624d6360 100644
--- a/sql/sql_sequence.cc
+++ b/sql/sql_sequence.cc
@@ -176,7 +176,7 @@ void sequence_definition::store_fields(TABLE *table)
/*
- Check the sequence fields through seq_fields when createing a sequence.
+ Check the sequence fields through seq_fields when creating a sequence.
RETURN VALUES
false Success
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index efccd2226c3..1ecf7479372 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2300,7 +2300,7 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
for (table= tables; table; table= table->next_local)
{
bool is_trans= 0;
- bool table_creation_was_logged= 1;
+ bool table_creation_was_logged= 0;
LEX_CSTRING db= table->db;
handlerton *table_type= 0;
@@ -7669,6 +7669,7 @@ static bool mysql_inplace_alter_table(THD *thd,
if (res)
goto rollback;
+ DEBUG_SYNC(thd, "alter_table_inplace_before_lock_upgrade");
// Upgrade to EXCLUSIVE before commit.
if (wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME))
goto rollback;
diff --git a/sql/table.cc b/sql/table.cc
index c33ed3d2d3e..fa6146f4139 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -586,14 +586,14 @@ inline bool is_system_table_name(const char *name, size_t length)
SYNOPSIS
open_table_def()
- thd Thread handler
+ thd Thread handler
share Fill this with table definition
- db_flags Bit mask of the following flags: OPEN_VIEW
+ flags Bit mask of the following flags: OPEN_VIEW
NOTES
This function is called when the table definition is not cached in
table definition cache
- The data is returned in 'share', which is alloced by
+ The data is returned in 'share', which is allocated by
alloc_table_share().. The code assumes that share is initialized.
*/
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index c42b6138c28..b39423e9131 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -1339,6 +1339,7 @@ bool THD::log_events_and_free_tmp_shares()
my_thread_id save_pseudo_thread_id= variables.pseudo_thread_id;
char db_buf[FN_REFLEN];
String db(db_buf, sizeof(db_buf), system_charset_info);
+ bool at_least_one_create_logged;
/*
Set pseudo_thread_id to be that of the processed table.
@@ -1356,7 +1357,7 @@ bool THD::log_events_and_free_tmp_shares()
within the sublist of common pseudo_thread_id to create single
DROP query.
*/
- for (;
+ for (at_least_one_create_logged= false;
share && IS_USER_TABLE(share) &&
tmpkeyval(share) == variables.pseudo_thread_id &&
share->db.length == db.length() &&
@@ -1364,51 +1365,58 @@ bool THD::log_events_and_free_tmp_shares()
/* Get the next TABLE_SHARE in the list. */
share= temporary_tables->pop_front())
{
- /*
- We are going to add ` around the table names and possible more
- due to special characters.
- */
- append_identifier(this, &s_query, &share->table_name);
- s_query.append(',');
+ if (share->table_creation_was_logged)
+ {
+ at_least_one_create_logged= true;
+ /*
+ We are going to add ` around the table names and possible more
+ due to special characters.
+ */
+ append_identifier(this, &s_query, &share->table_name);
+ s_query.append(',');
+ }
rm_temporary_table(share->db_type(), share->path.str);
free_table_share(share);
my_free(share);
}
- clear_error();
- CHARSET_INFO *cs_save= variables.character_set_client;
- variables.character_set_client= system_charset_info;
- thread_specific_used= true;
-
- Query_log_event qinfo(this, s_query.ptr(),
- s_query.length() - 1 /* to remove trailing ',' */,
- false, true, false, 0);
- qinfo.db= db.ptr();
- qinfo.db_len= db.length();
- variables.character_set_client= cs_save;
-
- get_stmt_da()->set_overwrite_status(true);
- transaction.stmt.mark_dropped_temp_table();
- bool error2= mysql_bin_log.write(&qinfo);
- if (unlikely(error|= error2))
+ if (at_least_one_create_logged)
{
- /*
- If we're here following THD::cleanup, thence the connection
- has been closed already. So lets print a message to the
- error log instead of pushing yet another error into the
- stmt_da.
-
- Also, we keep the error flag so that we propagate the error
- up in the stack. This way, if we're the SQL thread we notice
- that THD::close_tables failed. (Actually, the SQL
- thread only calls THD::close_tables while applying
- old Start_log_event_v3 events.)
- */
- sql_print_error("Failed to write the DROP statement for "
- "temporary tables to binary log");
- }
+ clear_error();
+ CHARSET_INFO *cs_save= variables.character_set_client;
+ variables.character_set_client= system_charset_info;
+ thread_specific_used= true;
+
+ Query_log_event qinfo(this, s_query.ptr(),
+ s_query.length() - 1 /* to remove trailing ',' */,
+ false, true, false, 0);
+ qinfo.db= db.ptr();
+ qinfo.db_len= db.length();
+ variables.character_set_client= cs_save;
+
+ get_stmt_da()->set_overwrite_status(true);
+ transaction.stmt.mark_dropped_temp_table();
+ bool error2= mysql_bin_log.write(&qinfo);
+ if (unlikely(error|= error2))
+ {
+ /*
+ If we're here following THD::cleanup, thence the connection
+ has been closed already. So lets print a message to the
+ error log instead of pushing yet another error into the
+ stmt_da.
+
+ Also, we keep the error flag so that we propagate the error
+ up in the stack. This way, if we're the SQL thread we notice
+ that THD::close_tables failed. (Actually, the SQL
+ thread only calls THD::close_tables while applying
+ old Start_log_event_v3 events.)
+ */
+ sql_print_error("Failed to write the DROP statement for "
+ "temporary tables to binary log");
+ }
- get_stmt_da()->set_overwrite_status(false);
+ get_stmt_da()->set_overwrite_status(false);
+ }
variables.pseudo_thread_id= save_pseudo_thread_id;
thread_specific_used= save_thread_specific_used;
}
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index d61ebb047d6..0637b4db7df 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -47,6 +47,7 @@
#include <string>
#include "log_event.h"
#include <slave.h>
+#include "sql_plugin.h" /* wsrep_plugins_pre_init() */
#include <sstream>
@@ -153,7 +154,11 @@ mysql_mutex_t LOCK_wsrep_SR_pool;
mysql_mutex_t LOCK_wsrep_SR_store;
int wsrep_replaying= 0;
-ulong wsrep_running_threads= 0; // # of currently running wsrep threads
+ulong wsrep_running_threads = 0; // # of currently running wsrep
+ // # threads
+ulong wsrep_running_applier_threads = 0; // # of running applier threads
+ulong wsrep_running_rollbacker_threads = 0; // # of running
+ // # rollbacker threads
ulong my_bind_addr;
#ifdef HAVE_PSI_INTERFACE
@@ -2658,7 +2663,21 @@ void* start_wsrep_THD(void *arg)
thd->set_command(COM_SLEEP);
thd->init_for_queries();
mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+
wsrep_running_threads++;
+
+ switch (thd_args->thread_type()) {
+ case WSREP_APPLIER_THREAD:
+ wsrep_running_applier_threads++;
+ break;
+ case WSREP_ROLLBACKER_THREAD:
+ wsrep_running_rollbacker_threads++;
+ break;
+ default:
+ WSREP_ERROR("Incorrect wsrep thread type: %d", thd_args->thread_type());
+ break;
+ }
+
mysql_cond_broadcast(&COND_wsrep_slave_threads);
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
@@ -2678,7 +2697,23 @@ void* start_wsrep_THD(void *arg)
delete thd_args;
mysql_mutex_lock(&LOCK_wsrep_slave_threads);
+ DBUG_ASSERT(wsrep_running_threads > 0);
wsrep_running_threads--;
+
+ switch (thd_args->thread_type()) {
+ case WSREP_APPLIER_THREAD:
+ DBUG_ASSERT(wsrep_running_applier_threads > 0);
+ wsrep_running_applier_threads--;
+ break;
+ case WSREP_ROLLBACKER_THREAD:
+ DBUG_ASSERT(wsrep_running_rollbacker_threads > 0);
+ wsrep_running_rollbacker_threads--;
+ break;
+ default:
+ WSREP_ERROR("Incorrect wsrep thread type: %d", thd_args->thread_type());
+ break;
+ }
+
WSREP_DEBUG("wsrep running threads now: %lu", wsrep_running_threads);
mysql_cond_broadcast(&COND_wsrep_slave_threads);
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index 37301afa7be..844437bab95 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -93,6 +93,8 @@ extern ulong wsrep_trx_fragment_unit;
extern ulong wsrep_SR_store_type;
extern uint wsrep_ignore_apply_errors;
extern ulong wsrep_running_threads;
+extern ulong wsrep_running_applier_threads;
+extern ulong wsrep_running_rollbacker_threads;
extern bool wsrep_new_cluster;
extern bool wsrep_gtid_mode;
extern uint32 wsrep_gtid_domain_id;
@@ -393,27 +395,37 @@ void thd_binlog_flush_pending_rows_event(THD *thd, bool stmt_end);
void thd_binlog_rollback_stmt(THD * thd);
void thd_binlog_trx_reset(THD * thd);
+enum wsrep_thread_type {
+ WSREP_APPLIER_THREAD=1,
+ WSREP_ROLLBACKER_THREAD=2
+};
+
typedef void (*wsrep_thd_processor_fun)(THD*, void *);
class Wsrep_thd_args
{
public:
- Wsrep_thd_args(wsrep_thd_processor_fun fun, void* args)
+ Wsrep_thd_args(wsrep_thd_processor_fun fun, void* args,
+ wsrep_thread_type thread_type)
:
fun_ (fun),
- args_(args)
+ args_ (args),
+ thread_type_ (thread_type)
{ }
wsrep_thd_processor_fun fun() { return fun_; }
void* args() { return args_; }
+ enum wsrep_thread_type thread_type() {return thread_type_;}
+
private:
Wsrep_thd_args(const Wsrep_thd_args&);
Wsrep_thd_args& operator=(const Wsrep_thd_args&);
wsrep_thd_processor_fun fun_;
- void* args_;
+ void* args_;
+ enum wsrep_thread_type thread_type_;
};
void* start_wsrep_THD(void*);
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 6173506385d..c62132b16a2 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -123,7 +123,8 @@ void wsrep_create_appliers(long threads)
while (wsrep_threads++ < threads)
{
- Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_replication_process, 0));
+ Wsrep_thd_args* args(new Wsrep_thd_args(wsrep_replication_process, 0,
+ WSREP_APPLIER_THREAD));
if (create_wsrep_THD(args))
{
WSREP_WARN("Can't create thread to manage wsrep replication");
@@ -312,14 +313,16 @@ void wsrep_create_rollbacker()
{
if (wsrep_cluster_address && wsrep_cluster_address[0] != 0)
{
- Wsrep_thd_args* args= new Wsrep_thd_args(wsrep_rollback_process, 0);
+ Wsrep_thd_args* args= new Wsrep_thd_args(wsrep_rollback_process, 0,
+ WSREP_ROLLBACKER_THREAD);
/* create rollbacker */
if (create_wsrep_THD(args))
WSREP_WARN("Can't create thread to manage wsrep rollback");
/* create post_rollbacker */
- args= new Wsrep_thd_args(wsrep_post_rollback_process, 0);
+ args= new Wsrep_thd_args(wsrep_post_rollback_process, 0,
+ WSREP_ROLLBACKER_THREAD);
if (create_wsrep_THD(args))
WSREP_WARN("Can't create thread to manage wsrep post rollback");
}
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index de558af6abb..315cfe2c53e 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -485,6 +485,8 @@ bool wsrep_cluster_address_update (sys_var *self, THD* thd, enum_var_type type)
if (wsrep_start_replication())
{
wsrep_create_rollbacker();
+ WSREP_DEBUG("Cluster address update creating %ld applier threads running %lu",
+ wsrep_slave_threads, wsrep_running_applier_threads);
wsrep_create_appliers(wsrep_slave_threads);
}
/* locking order to be enforced is:
@@ -585,9 +587,9 @@ void wsrep_node_address_init (const char* value)
static void wsrep_slave_count_change_update ()
{
- wsrep_slave_count_change= (wsrep_slave_threads - wsrep_running_threads + 2);
- WSREP_DEBUG("Change on slave threads: New %lu old %lu difference %d",
- wsrep_slave_threads, wsrep_running_threads, wsrep_slave_count_change);
+ wsrep_slave_count_change = (wsrep_slave_threads - wsrep_running_applier_threads);
+ WSREP_DEBUG("Change on slave threads: New %ld old %lu difference %d",
+ wsrep_slave_threads, wsrep_running_applier_threads, wsrep_slave_count_change);
}
bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
@@ -595,8 +597,10 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
wsrep_slave_count_change_update();
if (wsrep_slave_count_change > 0)
{
+ WSREP_DEBUG("Creating %d applier threads, total %ld", wsrep_slave_count_change, wsrep_slave_threads);
wsrep_create_appliers(wsrep_slave_count_change);
- wsrep_slave_count_change= 0;
+ WSREP_DEBUG("Running %lu applier threads", wsrep_running_applier_threads);
+ wsrep_slave_count_change = 0;
}
return false;
}
@@ -758,8 +762,10 @@ static SHOW_VAR wsrep_status_vars[]=
{"provider_name", (char*) &wsrep_provider_name, SHOW_CHAR_PTR},
{"provider_version", (char*) &wsrep_provider_version, SHOW_CHAR_PTR},
{"provider_vendor", (char*) &wsrep_provider_vendor, SHOW_CHAR_PTR},
- {"wsrep_provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
- {"thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH}
+ {"provider_capabilities", (char*) &wsrep_provider_capabilities, SHOW_CHAR_PTR},
+ {"thread_count", (char*) &wsrep_running_threads, SHOW_LONG_NOFLUSH},
+ {"applier_thread_count", (char*)&wsrep_running_applier_threads, SHOW_LONG_NOFLUSH},
+ {"rollbacker_thread_count", (char *)&wsrep_running_rollbacker_threads, SHOW_LONG_NOFLUSH},
};
static int show_var_cmp(const void *var1, const void *var2)
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index 4d0f57d0ef6..19fb8a12288 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -118,7 +118,6 @@ IF(CONNECT_WITH_LIBXML2)
FIND_PACKAGE(LibXml2)
IF (LIBXML2_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
- SET(ZLIB_LIBRARY "z") # see ZLIB_INCLUDE_DIR below
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} libdoc.cpp libdoc.h)
add_definitions(-DLIBXML2_SUPPORT)
@@ -337,14 +336,6 @@ IF(NOT TARGET connect)
RETURN()
ENDIF()
-# Don't link with bundled zlib and systel libxml2 at the same time.
-# System libxml2 uses system zlib, might conflict with the bundled one.
-IF (XML_LIBRARY AND BUILD_BUNDLED_ZLIB)
- GET_PROPERTY(INCS TARGET connect PROPERTY INCLUDE_DIRECTORIES)
- LIST(REMOVE_ITEM INCS ${ZLIB_INCLUDE_DIR})
- SET_PROPERTY(TARGET connect PROPERTY INCLUDE_DIRECTORIES ${INCS})
-ENDIF()
-
IF(WIN32)
IF (libmongoc-1.0_FOUND)
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp
index 0bf31fdb5fa..972a1e72403 100644
--- a/storage/connect/array.cpp
+++ b/storage/connect/array.cpp
@@ -457,7 +457,7 @@ char *ARRAY::GetStringValue(int n)
/***********************************************************************/
bool ARRAY::Find(PVAL valp)
{
- register int n;
+ int n;
PVAL vp;
if (Type != valp->GetType()) {
@@ -1067,7 +1067,7 @@ MULAR::MULAR(PGLOBAL g, int n) : CSORT(false)
/***********************************************************************/
int MULAR::Qcompare(int *i1, int *i2)
{
- register int i, n = 0;
+ int i, n = 0;
for (i = 0; i < Narray; i++)
if ((n = Pars[i]->Qcompare(i1, i2)))
diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp
index 670131b8fd2..1e4ba674e23 100644
--- a/storage/connect/csort.cpp
+++ b/storage/connect/csort.cpp
@@ -178,9 +178,9 @@ void CSORT::DebugSort(int ph, int n, int *base, int *mid, int *tmp)
/***********************************************************************/
int CSORT::Qsortx(void)
{
- register int c;
- register int lo, hi, min;
- register int i, j, rc = 0;
+ int c;
+ int lo, hi, min;
+ int i, j, rc = 0;
// To do: rc should be checked for being used uninitialized
int *top;
#ifdef DEBTRACE
@@ -344,7 +344,7 @@ int CSORT::Qsortx(void)
/***********************************************************************/
void CSORT::Qstx(int *base, int *max)
{
- register int *i, *j, *jj, *mid, *him, c;
+ int *i, *j, *jj, *mid, *him, c;
int *tmp;
int lo, hi, rc;
size_t zlo, zhi, cnm;
@@ -543,9 +543,9 @@ void CSORT::Qstx(int *base, int *max)
/***********************************************************************/
int CSORT::Qsortc(void)
{
- register int c;
- register int lo, hi, min;
- register int i, j, k, m, rc = 0;
+ int c;
+ int lo, hi, min;
+ int i, j, k, m, rc = 0;
// To do: rc should be checked for being used uninitialized
int *max;
#ifdef DEBTRACE
@@ -720,7 +720,7 @@ int CSORT::Qsortc(void)
/***********************************************************************/
void CSORT::Qstc(int *base, int *max)
{
- register int *i, *j, *jj, *lt, *eq, *gt, *mid;
+ int *i, *j, *jj, *lt, *eq, *gt, *mid;
int c = 0, lo, hi, rc;
size_t zlo, zhi, cnm;
@@ -907,9 +907,9 @@ void CSORT::Qstc(int *base, int *max)
/***********************************************************************/
void CSORT::Istc(int *base, int *hi, int *max)
{
- register int c = 0;
- register int *lo;
- register int *i, *j;
+ int c = 0;
+ int *lo;
+ int *i, *j;
/*********************************************************************/
/* First put smallest element, which must be in the first THRESH, */
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index a783f46bfdc..268cffed680 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -1315,7 +1315,7 @@ char *ha_connect::GetRealString(PCSZ s)
{
char *sv;
- if (IsPartitioned() && s && partname && *partname) {
+ if (IsPartitioned() && s && *partname) {
sv= (char*)PlugSubAlloc(xp->g, NULL, 0);
sprintf(sv, s, partname);
PlugSubAlloc(xp->g, NULL, strlen(sv) + 1);
@@ -3066,7 +3066,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strncat(s, res->ptr(), res->length());
if (res->length() < 19)
- strcat(s, "1970-01-01 00:00:00" + res->length());
+ strcat(s, &"1970-01-01 00:00:00"[res->length()]);
strcat(s, "'}");
break;
@@ -3097,7 +3097,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strncat(s, res->ptr(), res->length());
if (res->length() < 19)
- strcat(s, "1970-01-01 00:00:00" + res->length());
+ strcat(s, &"1970-01-01 00:00:00"[res->length()]);
strcat(s, "'}");
break;
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 6687513fa6c..d08c6d1b7a5 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -2279,7 +2279,7 @@ int ODBConn::GetCatInfo(CATPARM *cap)
int i, irc;
bool b;
PCSZ fnc = "Unknown";
- UWORD n;
+ UWORD n = 0;
SWORD ncol, len, tp;
SQLULEN crow = 0;
PQRYRES qrp = cap->Qrp;
diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp
index 73ca135691c..5179fa654cf 100644
--- a/storage/connect/valblk.cpp
+++ b/storage/connect/valblk.cpp
@@ -511,7 +511,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, int k, int n)
CheckType(pv)
TYPE *lp = ((TYPBLK*)pv)->Typp;
- for (register int i = k; i < n; i++) // TODO
+ for (int i = k; i < n; i++) // TODO
Typp[i] = lp[i];
} // end of SetValues
@@ -805,7 +805,7 @@ void CHRBLK::SetValue(const char *sp, uint len, int n)
if (Blanks) {
// Suppress eventual ending zero and right fill with blanks
- for (register int i = len; i < Long; i++)
+ for (int i = len; i < Long; i++)
p[i] = ' ';
} else if ((signed)len < Long)
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index efefc17b5f5..db4d6cbb00d 100644
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -272,8 +272,8 @@ void XINDEX::Close(void)
/***********************************************************************/
int XINDEX::Qcompare(int *i1, int *i2)
{
- register int k;
- register PXCOL kcp;
+ int k;
+ PXCOL kcp;
for (kcp = To_KeyCol, k = 0; kcp; kcp = kcp->Next)
if ((k = kcp->Compare(*i1, *i2)))
@@ -745,7 +745,7 @@ int XINDEX::ColMaxSame(PXCOL kp)
/***********************************************************************/
bool XINDEX::Reorder(PGLOBAL g __attribute__((unused)))
{
- register int i, j, k, n;
+ int i, j, k, n;
bool sorted = true;
PXCOL kcp;
#if 0
@@ -1870,8 +1870,8 @@ int XINDEX::Fetch(PGLOBAL g)
/***********************************************************************/
int XINDEX::FastFind(void)
{
- register int curk, sup, inf, i= 0, k, n = 2;
- register PXCOL kp, kcp;
+ int curk, sup, inf, i= 0, k, n = 2;
+ PXCOL kp, kcp;
//assert((int)nv == Nval);
@@ -2209,8 +2209,8 @@ int XINDXS::Fetch(PGLOBAL g)
/***********************************************************************/
int XINDXS::FastFind(void)
{
- register int sup, inf, i= 0, n = 2;
- register PXCOL kcp = To_KeyCol;
+ int sup, inf, i= 0, n = 2;
+ PXCOL kcp = To_KeyCol;
if (Nblk && Op == OP_EQ) {
// Look in block values to find in which block to search
@@ -3235,7 +3235,7 @@ void KXYCOL::FillValue(PVAL valp)
int KXYCOL::Compare(int i1, int i2)
{
// Do the actual comparison between values.
- register int k = Kblp->CompVal(i1, i2);
+ int k = Kblp->CompVal(i1, i2);
if (trace(4))
htrc("Compare done result=%d\n", k);
@@ -3250,7 +3250,7 @@ int KXYCOL::CompVal(int i)
{
// Do the actual comparison between numerical values.
if (trace(4)) {
- register int k = (int)Kblp->CompVal(Valp, (int)i);
+ int k = (int)Kblp->CompVal(Valp, (int)i);
htrc("Compare done result=%d\n", k);
return k;
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index dfa6e032176..cbd280af223 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -144,8 +144,7 @@ SET(INNOBASE_SOURCES
ut/ut0rnd.cc
ut/ut0ut.cc
ut/ut0vec.cc
- ut/ut0wqueue.cc
- ut/ut0timer.cc)
+ ut/ut0wqueue.cc)
MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
MODULE_OUTPUT_NAME ha_innodb
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 369a0bf6181..6a1d23fb472 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (C) 2013, 2014 Facebook, Inc. All Rights Reserved.
+Copyright (C) 2012, 2014 Facebook, Inc. All Rights Reserved.
Copyright (C) 2014, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -36,7 +36,6 @@ Modified 30/07/2014 Jan Lindström jan.lindstrom@mariadb.com
#include "ibuf0ibuf.h"
#include "lock0lock.h"
#include "srv0start.h"
-#include "ut0timer.h"
#include <list>
@@ -100,8 +99,7 @@ Initialize defragmentation. */
void
btr_defragment_init()
{
- srv_defragment_interval = ut_microseconds_to_timer(
- (ulonglong) (1000000.0 / srv_defragment_frequency));
+ srv_defragment_interval = 1000000000ULL / srv_defragment_frequency;
mutex_create(LATCH_ID_BTR_DEFRAGMENT_MUTEX, &btr_defragment_mutex);
}
@@ -728,7 +726,7 @@ DECLARE_THREAD(btr_defragment_thread)(void*)
}
pcur = item->pcur;
- ulonglong now = ut_timer_now();
+ ulonglong now = my_interval_timer();
ulonglong elapsed = now - item->last_processed;
if (elapsed < srv_defragment_interval) {
@@ -738,11 +736,12 @@ DECLARE_THREAD(btr_defragment_thread)(void*)
defragmentation of all indices queue up on a single
thread, it's likely other indices that follow this one
don't need to sleep again. */
- os_thread_sleep(((ulint)ut_timer_to_microseconds(
- srv_defragment_interval - elapsed)));
+ os_thread_sleep(static_cast<ulint>
+ ((srv_defragment_interval - elapsed)
+ / 1000));
}
- now = ut_timer_now();
+ now = my_interval_timer();
mtr_start(&mtr);
cursor = btr_pcur_get_btr_cur(pcur);
index = btr_cur_get_index(cursor);
diff --git a/storage/innobase/buf/buf0buddy.cc b/storage/innobase/buf/buf0buddy.cc
index e8c3ab7f02c..7a7c3189add 100644
--- a/storage/innobase/buf/buf0buddy.cc
+++ b/storage/innobase/buf/buf0buddy.cc
@@ -635,7 +635,7 @@ buf_buddy_relocate(
if (buf_page_can_relocate(bpage)) {
/* Relocate the compressed page. */
- uintmax_t usec = ut_time_us(NULL);
+ const ulonglong ns = my_interval_timer();
ut_a(bpage->zip.data == src);
@@ -651,7 +651,7 @@ buf_buddy_relocate(
buf_buddy_stat_t* buddy_stat = &buf_pool->buddy_stat[i];
buddy_stat->relocated++;
- buddy_stat->relocated_usec += ut_time_us(NULL) - usec;
+ buddy_stat->relocated_usec+= (my_interval_timer() - ns) / 1000;
return(true);
}
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index c270a709f2a..0701ec31f5f 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -1132,25 +1132,30 @@ buf_page_is_corrupted(
/* A page filled with NUL bytes is considered not corrupted.
The FIL_PAGE_FILE_FLUSH_LSN field may be written nonzero for
the first page of each file of the system tablespace.
- Ignore it for the system tablespace. */
+ We want to ignore it for the system tablespace, but because
+ we do not know the expected tablespace here, we ignore the
+ field for all data files, except for
+ innodb_checksum_algorithm=full_crc32 which we handled above. */
if (!checksum_field1 && !checksum_field2) {
- ulint i = 0;
- do {
- if (read_buf[i]) {
- return true;
+ /* Checksum fields can have valid value as zero.
+ If the page is not empty then do the checksum
+ calculation for the page. */
+ bool all_zeroes = true;
+ for (size_t i = 0; i < srv_page_size; i++) {
+#ifndef UNIV_INNOCHECKSUM
+ if (i == FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) {
+ i += 8;
}
- } while (++i < FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
-
- /* Ignore FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION unless
- innodb_checksum_algorithm=full_crc32. */
- i += 8;
-
- do {
+#endif
if (read_buf[i]) {
- return true;
+ all_zeroes = false;
+ break;
}
- } while (++i < srv_page_size);
- return false;
+ }
+
+ if (all_zeroes) {
+ return false;
+ }
}
switch (curr_algo) {
@@ -1991,7 +1996,7 @@ buf_pool_init_instance(
buf_pool->zip_hash = hash_create(2 * buf_pool->curr_size);
- buf_pool->last_printout_time = ut_time();
+ buf_pool->last_printout_time = time(NULL);
}
/* 2. Initialize flushing fields
-------------------------------- */
@@ -2805,7 +2810,7 @@ buf_pool_resize()
buf_resize_status("Withdrawing blocks to be shrunken.");
- ib_time_t withdraw_started = ut_time();
+ time_t withdraw_started = time(NULL);
ulint message_interval = 60;
ulint retry_interval = 1;
@@ -2831,8 +2836,10 @@ withdraw_retry:
/* abort buffer pool load */
buf_load_abort();
+ const time_t current_time = time(NULL);
+
if (should_retry_withdraw
- && ut_difftime(ut_time(), withdraw_started) >= message_interval) {
+ && difftime(current_time, withdraw_started) >= message_interval) {
if (message_interval > 900) {
message_interval = 1800;
@@ -2848,8 +2855,7 @@ withdraw_retry:
trx = UT_LIST_GET_NEXT(trx_list, trx)) {
if (trx->state != TRX_STATE_NOT_STARTED
&& trx->mysql_thd != NULL
- && ut_difftime(withdraw_started,
- trx->start_time) > 0) {
+ && withdraw_started > trx->start_time) {
if (!found) {
ib::warn() <<
"The following trx might hold"
@@ -2862,13 +2868,13 @@ withdraw_retry:
}
lock_trx_print_wait_and_mvcc_state(
- stderr, trx);
+ stderr, trx, current_time);
}
}
mutex_exit(&trx_sys.mutex);
lock_mutex_exit();
- withdraw_started = ut_time();
+ withdraw_started = current_time;
}
if (should_retry_withdraw) {
@@ -6347,7 +6353,7 @@ void
buf_refresh_io_stats(
buf_pool_t* buf_pool)
{
- buf_pool->last_printout_time = ut_time();
+ buf_pool->last_printout_time = time(NULL);
buf_pool->old_stat = buf_pool->stat;
}
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 373f6eb4539..65febb14a76 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -2402,7 +2402,7 @@ page_cleaner_flush_pages_recommendation(
if (prev_lsn == 0) {
/* First time around. */
prev_lsn = cur_lsn;
- prev_time = ut_time();
+ prev_time = time(NULL);
return(0);
}
@@ -2412,7 +2412,7 @@ page_cleaner_flush_pages_recommendation(
sum_pages += last_pages_in;
- time_t curr_time = ut_time();
+ time_t curr_time = time(NULL);
double time_elapsed = difftime(curr_time, prev_time);
/* We update our variables every srv_flushing_avg_loops
diff --git a/storage/innobase/data/data0data.cc b/storage/innobase/data/data0data.cc
index 02f921f716c..7cc9c2bc09e 100644
--- a/storage/innobase/data/data0data.cc
+++ b/storage/innobase/data/data0data.cc
@@ -601,7 +601,6 @@ dtuple_convert_big_rec(
dfield_t* dfield;
ulint size;
ulint n_fields;
- ulint local_len;
ulint local_prefix_len;
if (!dict_index_is_clust(index)) {
@@ -612,6 +611,7 @@ dtuple_convert_big_rec(
return NULL;
}
+ ulint local_len = index->table->get_overflow_field_local_len();
const auto zip_size = index->table->space->zip_size();
ut_ad(index->n_uniq > 0);
diff --git a/storage/innobase/dict/dict0defrag_bg.cc b/storage/innobase/dict/dict0defrag_bg.cc
index 31fb05e59c6..7de50f19217 100644
--- a/storage/innobase/dict/dict0defrag_bg.cc
+++ b/storage/innobase/dict/dict0defrag_bg.cc
@@ -238,7 +238,6 @@ dict_stats_save_defrag_summary(
dict_index_t* index) /*!< in: index */
{
dberr_t ret=DB_SUCCESS;
- lint now = (lint) ut_time();
if (dict_index_is_ibuf(index)) {
return DB_SUCCESS;
@@ -246,7 +245,7 @@ dict_stats_save_defrag_summary(
dict_sys_lock();
- ret = dict_stats_save_index_stat(index, now, "n_pages_freed",
+ ret = dict_stats_save_index_stat(index, time(NULL), "n_pages_freed",
index->stat_defrag_n_pages_freed,
NULL,
"Number of pages freed during"
@@ -276,7 +275,7 @@ dict_stats_save_defrag_stats(
return dict_stats_report_error(index->table, true);
}
- lint now = (lint) ut_time();
+ const time_t now = time(NULL);
mtr_t mtr;
ulint n_leaf_pages;
ulint n_leaf_reserved;
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 2ba98a933e2..f6a0ac4f7dd 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1768,20 +1768,10 @@ dict_col_name_is_reserved(
return(FALSE);
}
-/****************************************************************//**
-If a record of this index might not fit on a single B-tree page,
-return TRUE.
-@return TRUE if the index record could become too big */
-static
-ibool
-dict_index_too_big_for_tree(
-/*========================*/
- const dict_table_t* table, /*!< in: table */
- const dict_index_t* new_index, /*!< in: index */
- bool strict) /*!< in: TRUE=report error if
- records could be too big to
- fit in an B-tree page */
+bool dict_index_t::rec_potentially_too_big(bool strict) const
{
+ ut_ad(table);
+
ulint comp;
ulint i;
/* maximum possible storage size of a record */
@@ -1793,8 +1783,8 @@ dict_index_too_big_for_tree(
/* FTS index consists of auxiliary tables, they shall be excluded from
index row size check */
- if (new_index->type & DICT_FTS) {
- return(false);
+ if (type & DICT_FTS) {
+ return false;
}
DBUG_EXECUTE_IF(
@@ -1815,8 +1805,7 @@ dict_index_too_big_for_tree(
an empty page, minus a byte for recoding the heap
number in the page modification log. The maximum
allowed node pointer size is half that. */
- page_rec_max = page_zip_empty_size(new_index->n_fields,
- zip_size);
+ page_rec_max = page_zip_empty_size(n_fields, zip_size);
if (page_rec_max) {
page_rec_max--;
}
@@ -1844,25 +1833,24 @@ dict_index_too_big_for_tree(
if (comp) {
/* Include the "null" flags in the
maximum possible record size. */
- rec_max_size += UT_BITS_IN_BYTES(
- unsigned(new_index->n_nullable));
+ rec_max_size += UT_BITS_IN_BYTES(unsigned(n_nullable));
} else {
- /* For each column, include a 2-byte offset and a
+ /* For each column, include a 2-byte offset and a
"null" flag. The 1-byte format is only used in short
records that do not contain externally stored columns.
Such records could never exceed the page limit, even
when using the 2-byte format. */
- rec_max_size += 2 * unsigned(new_index->n_fields);
+ rec_max_size += 2 * unsigned(n_fields);
}
- /* Compute the maximum possible record size. */
- for (i = 0; i < new_index->n_fields; i++) {
+ const ulint max_local_len = table->get_overflow_field_local_len();
+
+ /* Compute the maximum possible record size. */
+ for (i = 0; i < n_fields; i++) {
const dict_field_t* field
- = dict_index_get_nth_field(new_index, i);
+ = dict_index_get_nth_field(this, i);
const dict_col_t* col
= dict_field_get_col(field);
- ulint field_max_size;
- ulint field_ext_max_size;
/* In dtuple_convert_big_rec(), variable-length columns
that are longer than BTR_EXTERN_LOCAL_STORED_MAX_SIZE
@@ -1876,26 +1864,28 @@ dict_index_too_big_for_tree(
case in rec_get_converted_size_comp() for
REC_STATUS_ORDINARY records. */
- field_max_size = dict_col_get_fixed_size(col, comp);
+ size_t field_max_size = dict_col_get_fixed_size(col, comp);
if (field_max_size && field->fixed_len != 0) {
/* dict_index_add_col() should guarantee this */
ut_ad(!field->prefix_len
|| field->fixed_len == field->prefix_len);
/* Fixed lengths are not encoded
in ROW_FORMAT=COMPACT. */
- field_ext_max_size = 0;
goto add_field_size;
}
field_max_size = dict_col_get_max_size(col);
- field_ext_max_size = field_max_size < 256 ? 1 : 2;
if (field->prefix_len) {
if (field->prefix_len < field_max_size) {
field_max_size = field->prefix_len;
}
- } else if (field_max_size > BTR_EXTERN_LOCAL_STORED_MAX_SIZE
- && dict_index_is_clust(new_index)) {
+
+ // those conditions were copied from dtuple_convert_big_rec()
+ } else if (field_max_size > max_local_len
+ && field_max_size > BTR_EXTERN_LOCAL_STORED_MAX_SIZE
+ && DATA_BIG_COL(col)
+ && dict_index_is_clust(this)) {
/* In the worst case, we have a locally stored
column of BTR_EXTERN_LOCAL_STORED_MAX_SIZE bytes.
@@ -1903,21 +1893,26 @@ dict_index_too_big_for_tree(
column were stored externally, the lengths in
the clustered index page would be
BTR_EXTERN_FIELD_REF_SIZE and 2. */
- field_max_size = BTR_EXTERN_LOCAL_STORED_MAX_SIZE;
- field_ext_max_size = 1;
+ field_max_size = max_local_len;
}
if (comp) {
/* Add the extra size for ROW_FORMAT=COMPACT.
For ROW_FORMAT=REDUNDANT, these bytes were
added to rec_max_size before this loop. */
- rec_max_size += field_ext_max_size;
+ rec_max_size += field_max_size < 256 ? 1 : 2;
}
add_field_size:
rec_max_size += field_max_size;
/* Check the size limit on leaf pages. */
if (rec_max_size >= page_rec_max) {
+ // with 4k page size innodb_index_stats becomes too big
+ // this crutch allows server bootstrapping to continue
+ if (table->is_system_db) {
+ return false;
+ }
+
ib::error_or_warn(strict)
<< "Cannot add field " << field->name
<< " in table " << table->name
@@ -1927,7 +1922,7 @@ add_field_size:
" size (" << page_rec_max
<< ") for a record on index leaf page.";
- return(TRUE);
+ return true;
}
/* Check the size limit on non-leaf pages. Records
@@ -1936,14 +1931,14 @@ add_field_size:
and a node pointer field. When we have processed the
unique columns, rec_max_size equals the size of the
node pointer record minus the node pointer column. */
- if (i + 1 == dict_index_get_n_unique_in_tree(new_index)
+ if (i + 1 == dict_index_get_n_unique_in_tree(this)
&& rec_max_size + REC_NODE_PTR_SIZE >= page_ptr_max) {
- return(TRUE);
+ return true;
}
}
- return(FALSE);
+ return false;
}
/** Adds an index to the dictionary cache, with possible indexing newly
@@ -2013,7 +2008,7 @@ dict_index_add_to_cache(
new_index->disable_ahi = index->disable_ahi;
#endif
- if (dict_index_too_big_for_tree(index->table, new_index, strict)) {
+ if (new_index->rec_potentially_too_big(strict)) {
if (strict) {
dict_mem_index_free(new_index);
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 67a9d2de5e1..bd4bb261320 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -956,7 +956,7 @@ dict_stats_update_transient(
table->stat_sum_of_other_index_sizes = sum_of_index_sizes
- index->stat_index_size;
- table->stats_last_recalc = ut_time();
+ table->stats_last_recalc = time(NULL);
table->stat_modified_counter = 0;
@@ -2267,7 +2267,7 @@ dict_stats_update_persistent(
+= index->stat_index_size;
}
- table->stats_last_recalc = ut_time();
+ table->stats_last_recalc = time(NULL);
table->stat_modified_counter = 0;
@@ -2296,7 +2296,7 @@ rolled back only in the case of error, but not freed.
dberr_t
dict_stats_save_index_stat(
dict_index_t* index,
- ib_time_t last_update,
+ time_t last_update,
const char* stat_name,
ib_uint64_t stat_value,
ib_uint64_t* sample_size,
@@ -2424,7 +2424,6 @@ dict_stats_save(
const index_id_t* only_for_index)
{
pars_info_t* pinfo;
- ib_time_t now;
dberr_t ret;
dict_table_t* table;
char db_utf8[MAX_DB_UTF8_LEN];
@@ -2443,7 +2442,7 @@ dict_stats_save(
dict_fs2utf8(table->name.m_name, db_utf8, sizeof(db_utf8),
table_utf8, sizeof(table_utf8));
- now = ut_time();
+ const time_t now = time(NULL);
dict_sys_lock();
pinfo = pars_info_create();
diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc
index 6702a884dcf..2985b6faf35 100644
--- a/storage/innobase/dict/dict0stats_bg.cc
+++ b/storage/innobase/dict/dict0stats_bg.cc
@@ -393,14 +393,14 @@ dict_stats_process_entry_from_recalc_pool()
mutex_exit(&dict_sys.mutex);
- /* ut_time() could be expensive, the current function
+ /* time() could be expensive, the current function
is called once every time a table has been changed more than 10% and
on a system with lots of small tables, this could become hot. If we
find out that this is a problem, then the check below could eventually
be replaced with something else, though a time interval is the natural
approach. */
- if (ut_difftime(ut_time(), table->stats_last_recalc)
+ if (difftime(time(NULL), table->stats_last_recalc)
< MIN_RECALC_INTERVAL) {
/* Stats were (re)calculated not long ago. To avoid
diff --git a/storage/innobase/eval/eval0eval.cc b/storage/innobase/eval/eval0eval.cc
index fc16b9defb5..577157d2eb9 100644
--- a/storage/innobase/eval/eval0eval.cc
+++ b/storage/innobase/eval/eval0eval.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -814,7 +815,7 @@ eval_predefined(
dfield_get_data(que_node_get_val(arg1)));
} else if (func == PARS_SYSDATE_TOKEN) {
- int_val = (lint) ut_time();
+ int_val = (lint) time(NULL);
} else {
eval_predefined_2(func_node);
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 837c8d0825e..50b73222607 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -1838,19 +1838,18 @@ fil_crypt_get_page_throttle_func(
state->crypt_stat.pages_read_from_disk++;
- uintmax_t start = ut_time_us(NULL);
+ const ulonglong start = my_interval_timer();
block = buf_page_get_gen(page_id, zip_size,
RW_X_LATCH,
NULL, BUF_GET_POSSIBLY_FREED,
file, line, mtr, &err);
- uintmax_t end = ut_time_us(NULL);
-
- if (end < start) {
- end = start; // safety...
- }
+ const ulonglong end = my_interval_timer();
state->cnt_waited++;
- state->sum_waited_us += (end - start);
+
+ if (end > start) {
+ state->sum_waited_us += (end - start) / 1000;
+ }
/* average page load */
ulint add_sleeptime_ms = 0;
@@ -2174,7 +2173,7 @@ fil_crypt_flush_space(
bool success = false;
ulint n_pages = 0;
ulint sum_pages = 0;
- uintmax_t start = ut_time_us(NULL);
+ const ulonglong start = my_interval_timer();
do {
success = buf_flush_lists(ULINT_MAX, end_lsn, &n_pages);
@@ -2182,11 +2181,11 @@ fil_crypt_flush_space(
sum_pages += n_pages;
} while (!success && !space->is_stopping());
- uintmax_t end = ut_time_us(NULL);
+ const ulonglong end = my_interval_timer();
if (sum_pages && end > start) {
state->cnt_waited += sum_pages;
- state->sum_waited_us += (end - start);
+ state->sum_waited_us += (end - start) / 1000;
/* statistics */
state->crypt_stat.pages_flushed += sum_pages;
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 8a44aa83418..a8ac91a9903 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -2858,9 +2858,15 @@ fil_rename_tablespace(
space->n_pending_ops--;
ut_ad(space->name == old_space_name);
ut_ad(node->name == old_file_name);
-
- bool success = os_file_rename(
- innodb_data_file_key, old_file_name, new_file_name);
+ bool success;
+ DBUG_EXECUTE_IF("fil_rename_tablespace_failure_2",
+ goto skip_second_rename; );
+ success = os_file_rename(innodb_data_file_key,
+ old_file_name,
+ new_file_name);
+ DBUG_EXECUTE_IF("fil_rename_tablespace_failure_2",
+skip_second_rename:
+ success = false; );
ut_ad(node->name == old_file_name);
diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc
index 37819e37426..246f1ce574c 100644
--- a/storage/innobase/fts/fts0fts.cc
+++ b/storage/innobase/fts/fts0fts.cc
@@ -74,8 +74,8 @@ ulong fts_min_token_size;
// FIXME: testing
-static ib_time_t elapsed_time = 0;
-static ulint n_nodes = 0;
+static time_t elapsed_time;
+static ulint n_nodes;
#ifdef FTS_CACHE_SIZE_DEBUG
/** The cache size permissible lower limit (1K) */
@@ -194,15 +194,13 @@ FTS auxiliary INDEX table and clear the cache at the end.
@param[in,out] sync sync state
@param[in] unlock_cache whether unlock cache lock when write node
@param[in] wait whether wait when a sync is in progress
-@param[in] has_dict whether has dict operation lock
@return DB_SUCCESS if all OK */
static
dberr_t
fts_sync(
fts_sync_t* sync,
bool unlock_cache,
- bool wait,
- bool has_dict);
+ bool wait);
/****************************************************************//**
Release all resources help by the words rb tree e.g., the node ilist. */
@@ -3389,7 +3387,7 @@ fts_add_doc_from_tuple(
if (cache->total_size > fts_max_cache_size / 5
|| fts_need_sync) {
- fts_sync(cache->sync, true, false, false);
+ fts_sync(cache->sync, true, false);
}
mtr_start(&mtr);
@@ -3567,7 +3565,7 @@ fts_add_doc_by_id(
DBUG_EXECUTE_IF(
"fts_instrument_sync_debug",
- fts_sync(cache->sync, true, true, false);
+ fts_sync(cache->sync, true, true);
);
DEBUG_SYNC_C("fts_instrument_sync_request");
@@ -3826,7 +3824,7 @@ fts_write_node(
pars_info_t* info;
dberr_t error;
ib_uint32_t doc_count;
- ib_time_t start_time;
+ time_t start_time;
doc_id_t last_doc_id;
doc_id_t first_doc_id;
char table_name[MAX_FULL_NAME_LEN];
@@ -3875,9 +3873,9 @@ fts_write_node(
" :last_doc_id, :doc_count, :ilist);");
}
- start_time = ut_time();
+ start_time = time(NULL);
error = fts_eval_sql(trx, *graph);
- elapsed_time += ut_time() - start_time;
+ elapsed_time += time(NULL) - start_time;
++n_nodes;
return(error);
@@ -4054,7 +4052,7 @@ fts_sync_begin(
n_nodes = 0;
elapsed_time = 0;
- sync->start_time = ut_time();
+ sync->start_time = time(NULL);
sync->trx = trx_create();
trx_start_internal(sync->trx);
@@ -4193,7 +4191,7 @@ fts_sync_commit(
if (fts_enable_diag_print && elapsed_time) {
ib::info() << "SYNC for table " << sync->table->name
<< ": SYNC time: "
- << (ut_time() - sync->start_time)
+ << (time(NULL) - sync->start_time)
<< " secs: elapsed "
<< (double) n_nodes / elapsed_time
<< " ins/sec";
@@ -4263,15 +4261,13 @@ FTS auxiliary INDEX table and clear the cache at the end.
@param[in,out] sync sync state
@param[in] unlock_cache whether unlock cache lock when write node
@param[in] wait whether wait when a sync is in progress
-@param[in] has_dict whether has dict operation lock
@return DB_SUCCESS if all OK */
static
dberr_t
fts_sync(
fts_sync_t* sync,
bool unlock_cache,
- bool wait,
- bool has_dict)
+ bool wait)
{
if (srv_read_only_mode) {
return DB_READ_ONLY;
@@ -4304,12 +4300,6 @@ fts_sync(
DEBUG_SYNC_C("fts_sync_begin");
fts_sync_begin(sync);
- /* When sync in background, we hold dict operation lock
- to prevent DDL like DROP INDEX, etc. */
- if (has_dict) {
- sync->trx->dict_operation_lock_mode = RW_S_LATCH;
- }
-
begin_sync:
if (cache->total_size > fts_max_cache_size) {
/* Avoid the case: sync never finish when
@@ -4400,16 +4390,9 @@ end_sync:
/** Run SYNC on the table, i.e., write out data from the cache to the
FTS auxiliary INDEX table and clear the cache at the end.
@param[in,out] table fts table
-@param[in] unlock_cache whether unlock cache when write node
@param[in] wait whether wait for existing sync to finish
-@param[in] has_dict whether has dict operation lock
@return DB_SUCCESS on success, error code on failure. */
-dberr_t
-fts_sync_table(
- dict_table_t* table,
- bool unlock_cache,
- bool wait,
- bool has_dict)
+dberr_t fts_sync_table(dict_table_t* table, bool wait)
{
dberr_t err = DB_SUCCESS;
@@ -4417,8 +4400,7 @@ fts_sync_table(
if (table->space && table->fts->cache
&& !dict_table_is_corrupted(table)) {
- err = fts_sync(table->fts->cache->sync,
- unlock_cache, wait, has_dict);
+ err = fts_sync(table->fts->cache->sync, !wait, wait);
}
return(err);
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index f45ed70f374..6a3e52d8ace 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -58,7 +58,7 @@ static os_event_t fts_opt_shutdown_event = NULL;
static const ulint FTS_WORD_NODES_INIT_SIZE = 64;
/** Last time we did check whether system need a sync */
-static ib_time_t last_check_sync_time;
+static time_t last_check_sync_time;
/** FTS optimize thread message types. */
enum fts_msg_type_t {
@@ -180,12 +180,11 @@ struct fts_slot_t {
ulint deleted; /*!< Number of doc ids deleted since the
last time this table was optimized */
- ib_time_t last_run; /*!< Time last run completed */
+ /** time(NULL) of completing fts_optimize_table_bk() */
+ time_t last_run;
- ib_time_t completed; /*!< Optimize finish time */
-
- ib_time_t interval_time; /*!< Minimum time to wait before
- optimizing the table again. */
+ /** time(NULL) of latest successful fts_optimize_table() */
+ time_t completed;
};
/** A table remove message for the FTS optimize thread. */
@@ -217,8 +216,8 @@ char fts_enable_diag_print;
/** ZLib compressed block size.*/
static ulint FTS_ZIP_BLOCK_SIZE = 1024;
-/** The amount of time optimizing in a single pass, in milliseconds. */
-static ib_time_t fts_optimize_time_limit = 0;
+/** The amount of time optimizing in a single pass, in seconds. */
+static ulint fts_optimize_time_limit;
/** It's defined in fts0fts.cc */
extern const char* fts_common_tables[];
@@ -1530,7 +1529,7 @@ fts_optimize_compact(
/*=================*/
fts_optimize_t* optim, /*!< in: optimize state data */
dict_index_t* index, /*!< in: current FTS being optimized */
- ib_time_t start_time) /*!< in: optimize start time */
+ time_t start_time) /*!< in: optimize start time */
{
ulint i;
dberr_t error = DB_SUCCESS;
@@ -1563,8 +1562,11 @@ fts_optimize_compact(
/* Free the word that was optimized. */
fts_word_free(word);
+ ulint interval = ulint(time(NULL) - start_time);
+
if (fts_optimize_time_limit > 0
- && (ut_time() - start_time) > fts_optimize_time_limit) {
+ && (lint(interval) < 0
+ || interval > fts_optimize_time_limit)) {
optim->done = TRUE;
}
@@ -1624,7 +1626,7 @@ fts_optimize_get_index_start_time(
/*==============================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS index */
- ib_time_t* start_time) /*!< out: time in secs */
+ time_t* start_time) /*!< out: time in secs */
{
return(fts_config_get_index_ulint(
trx, index, FTS_OPTIMIZE_START_TIME,
@@ -1640,7 +1642,7 @@ fts_optimize_set_index_start_time(
/*==============================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS index */
- ib_time_t start_time) /*!< in: start time */
+ time_t start_time) /*!< in: start time */
{
return(fts_config_set_index_ulint(
trx, index, FTS_OPTIMIZE_START_TIME,
@@ -1656,7 +1658,7 @@ fts_optimize_get_index_end_time(
/*============================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS index */
- ib_time_t* end_time) /*!< out: time in secs */
+ time_t* end_time) /*!< out: time in secs */
{
return(fts_config_get_index_ulint(
trx, index, FTS_OPTIMIZE_END_TIME, (ulint*) end_time));
@@ -1671,7 +1673,7 @@ fts_optimize_set_index_end_time(
/*============================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS index */
- ib_time_t end_time) /*!< in: end time */
+ time_t end_time) /*!< in: end time */
{
return(fts_config_set_index_ulint(
trx, index, FTS_OPTIMIZE_END_TIME, (ulint) end_time));
@@ -1734,22 +1736,23 @@ fts_optimize_free(
Get the max time optimize should run in millisecs.
@return max optimize time limit in millisecs. */
static
-ib_time_t
+ulint
fts_optimize_get_time_limit(
/*========================*/
trx_t* trx, /*!< in: transaction */
fts_table_t* fts_table) /*!< in: aux table */
{
- ib_time_t time_limit = 0;
+ ulint time_limit = 0;
fts_config_get_ulint(
trx, fts_table,
- FTS_OPTIMIZE_LIMIT_IN_SECS, (ulint*) &time_limit);
+ FTS_OPTIMIZE_LIMIT_IN_SECS, &time_limit);
+ /* FIXME: This is returning milliseconds, while the variable
+ is being stored and interpreted as seconds! */
return(time_limit * 1000);
}
-
/**********************************************************************//**
Run OPTIMIZE on the given table. Note: this can take a very long time
(hours). */
@@ -1762,7 +1765,6 @@ fts_optimize_words(
fts_string_t* word) /*!< in: the starting word to optimize */
{
fts_fetch_t fetch;
- ib_time_t start_time;
que_t* graph = NULL;
CHARSET_INFO* charset = optim->fts_index_table.charset;
@@ -1772,7 +1774,7 @@ fts_optimize_words(
fts_optimize_time_limit = fts_optimize_get_time_limit(
optim->trx, &optim->fts_common_table);
- start_time = ut_time();
+ const time_t start_time = time(NULL);
/* Setup the callback to use for fetching the word ilist etc. */
fetch.read_arg = optim->words;
@@ -1858,7 +1860,7 @@ fts_optimize_index_completed(
dberr_t error;
byte buf[sizeof(ulint)];
#ifdef FTS_OPTIMIZE_DEBUG
- ib_time_t end_time = ut_time();
+ time_t end_time = time(NULL);
error = fts_optimize_set_index_end_time(optim->trx, index, end_time);
#endif
@@ -2249,8 +2251,8 @@ fts_optimize_indexes(
dict_index_t* index;
#ifdef FTS_OPTIMIZE_DEBUG
- ib_time_t end_time;
- ib_time_t start_time;
+ time_t end_time;
+ time_t start_time;
/* Get the start and end optimize times for this index. */
error = fts_optimize_get_index_start_time(
@@ -2270,14 +2272,14 @@ fts_optimize_indexes(
/* Start time will be 0 only for the first time or after
completing the optimization of all FTS indexes. */
if (start_time == 0) {
- start_time = ut_time();
+ start_time = time(NULL);
error = fts_optimize_set_index_start_time(
optim->trx, index, start_time);
}
/* Check if this index needs to be optimized or not. */
- if (ut_difftime(end_time, start_time) < 0) {
+ if (difftime(end_time, start_time) < 0) {
error = fts_optimize_index(optim, index);
if (error != DB_SUCCESS) {
@@ -2349,7 +2351,7 @@ fts_optimize_reset_start_time(
for (uint i = 0; i < ib_vector_size(fts->indexes); ++i) {
dict_index_t* index;
- ib_time_t start_time = 0;
+ time_t start_time = 0;
/* Reset the start time to 0 for this index. */
error = fts_optimize_set_index_start_time(
@@ -2378,11 +2380,13 @@ fts_optimize_table_bk(
/*==================*/
fts_slot_t* slot) /*!< in: table to optimiza */
{
- dberr_t error;
+ const time_t now = time(NULL);
+ const ulint interval = ulint(now - slot->last_run);
/* Avoid optimizing tables that were optimized recently. */
if (slot->last_run > 0
- && (ut_time() - slot->last_run) < slot->interval_time) {
+ && lint(interval) >= 0
+ && interval < FTS_OPTIMIZE_INTERVAL_IN_SECS) {
return(DB_SUCCESS);
}
@@ -2390,12 +2394,19 @@ fts_optimize_table_bk(
dict_table_t* table = dict_table_open_on_id(
slot->table_id, FALSE, DICT_TABLE_OP_NORMAL);
- if (table && fil_table_accessible(table)
+ if (!table) {
+ slot->last_run = now;
+ return DB_SUCCESS;
+ }
+
+ dberr_t error;
+
+ if (fil_table_accessible(table)
&& table->fts && table->fts->cache
&& table->fts->cache->deleted >= FTS_OPTIMIZE_THRESHOLD) {
error = fts_optimize_table(table);
- slot->last_run = ut_time();
+ slot->last_run = time(NULL);
if (error == DB_SUCCESS) {
slot->running = false;
@@ -2403,7 +2414,7 @@ fts_optimize_table_bk(
}
} else {
/* Note time this run completed. */
- slot->last_run = ut_time();
+ slot->last_run = now;
error = DB_SUCCESS;
}
@@ -2653,7 +2664,6 @@ static bool fts_optimize_new_table(dict_table_t* table)
slot->table_id = table->id;
slot->running = false;
- slot->interval_time = FTS_OPTIMIZE_INTERVAL_IN_SECS;
return(TRUE);
}
@@ -2689,37 +2699,23 @@ Calculate how many tables in fts_slots need to be optimized.
@return no. of tables to optimize */
static ulint fts_optimize_how_many()
{
- ulint i;
- ib_time_t delta;
- ulint n_tables = 0;
- ib_time_t current_time;
-
- current_time = ut_time();
+ ulint n_tables = 0;
+ const time_t current_time = time(NULL);
- for (i = 0; i < ib_vector_size(fts_slots); ++i) {
+ for (ulint i = 0; i < ib_vector_size(fts_slots); ++i) {
const fts_slot_t* slot = static_cast<const fts_slot_t*>(
ib_vector_get_const(fts_slots, i));
if (slot->table_id == 0) {
continue;
}
- if (!slot->running) {
- ut_a(slot->completed <= current_time);
-
- delta = current_time - slot->completed;
+ const time_t end = slot->running
+ ? slot->last_run : slot->completed;
+ ulint interval = ulint(current_time - end);
- /* Skip slots that have been optimized recently. */
- if (delta >= slot->interval_time) {
- ++n_tables;
- }
- } else {
- ut_a(slot->last_run <= current_time);
-
- delta = current_time - slot->last_run;
-
- if (delta > slot->interval_time) {
- ++n_tables;
- }
+ if (lint(interval) < 0
+ || interval >= FTS_OPTIMIZE_INTERVAL_IN_SECS) {
+ ++n_tables;
}
}
@@ -2731,14 +2727,15 @@ Check if the total memory used by all FTS table exceeds the maximum limit.
@return true if a sync is needed, false otherwise */
static bool fts_is_sync_needed()
{
- ulint total_memory = 0;
- double time_diff = difftime(ut_time(), last_check_sync_time);
+ ulint total_memory = 0;
+ const time_t now = time(NULL);
+ double time_diff = difftime(now, last_check_sync_time);
- if (fts_need_sync || time_diff < 5) {
+ if (fts_need_sync || (time_diff >= 0 && time_diff < 5)) {
return(false);
}
- last_check_sync_time = ut_time();
+ last_check_sync_time = now;
for (ulint i = 0; i < ib_vector_size(fts_slots); ++i) {
const fts_slot_t* slot = static_cast<const fts_slot_t*>(
@@ -2776,7 +2773,7 @@ static void fts_optimize_sync_table(table_id_t table_id)
table_id, FALSE, DICT_TABLE_OP_NORMAL)) {
if (fil_table_accessible(table)
&& table->fts && table->fts->cache) {
- fts_sync_table(table, true, false, false);
+ fts_sync_table(table, false);
}
dict_table_close(table, FALSE, FALSE);
@@ -2969,7 +2966,7 @@ fts_optimize_init(void)
table_vector.clear();
fts_opt_shutdown_event = os_event_create(0);
- last_check_sync_time = ut_time();
+ last_check_sync_time = time(NULL);
os_thread_create(fts_optimize_thread, fts_optimize_wq, NULL);
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 5fad1e3e080..7b0ddceca0d 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -100,7 +100,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "row0sel.h"
#include "row0upd.h"
#include "fil0crypt.h"
-#include "ut0timer.h"
#include "srv0mon.h"
#include "srv0srv.h"
#include "srv0start.h"
@@ -1661,18 +1660,6 @@ thd_trx_is_auto_commit(
&& thd_is_select(thd));
}
-extern "C" time_t thd_start_time(const THD* thd);
-
-/******************************************************************//**
-Get the thread start time.
-@return the thread start time in seconds since the epoch. */
-ulint thd_start_time_in_secs(THD*)
-{
- // FIXME: This function should be added to the server code.
- //return(thd_start_time(thd));
- return(ulint(ut_time()));
-}
-
/** Enter InnoDB engine after checking the max number of user threads
allowed, else the thread is put into sleep.
@param[in,out] prebuilt row prebuilt handler */
@@ -1700,12 +1687,13 @@ innobase_srv_conc_enter_innodb(
} else if (trx->mysql_thd != NULL
&& thd_is_replication_slave_thread(trx->mysql_thd)) {
-
- UT_WAIT_FOR(
- srv_conc_get_active_threads()
- < srv_thread_concurrency,
- srv_replication_delay * 1000);
-
+ const ulonglong end = my_interval_timer()
+ + ulonglong(srv_replication_delay) * 1000000;
+ while (srv_conc_get_active_threads()
+ >= srv_thread_concurrency
+ || my_interval_timer() >= end) {
+ os_thread_sleep(2000 /* 2 ms */);
+ }
} else {
srv_conc_enter_innodb(prebuilt);
}
@@ -5798,6 +5786,7 @@ innobase_build_v_templ(
ulint n_v_col = ib_table->n_v_cols;
bool marker[REC_MAX_N_FIELDS];
+ DBUG_ENTER("innobase_build_v_templ");
ut_ad(ncol < REC_MAX_N_FIELDS);
if (add_v != NULL) {
@@ -5814,7 +5803,7 @@ innobase_build_v_templ(
if (!locked) {
mutex_exit(&dict_sys.mutex);
}
- return;
+ DBUG_VOID_RETURN;
}
memset(marker, 0, sizeof(bool) * ncol);
@@ -5825,7 +5814,8 @@ innobase_build_v_templ(
s_templ->n_col = ncol;
s_templ->n_v_col = n_v_col;
s_templ->rec_len = table->s->reclength;
- s_templ->default_rec = table->s->default_values;
+ s_templ->default_rec = UT_NEW_ARRAY_NOKEY(uchar, s_templ->rec_len);
+ memcpy(s_templ->default_rec, table->s->default_values, s_templ->rec_len);
/* Mark those columns could be base columns */
for (ulint i = 0; i < ib_table->n_v_cols; i++) {
@@ -5922,6 +5912,7 @@ innobase_build_v_templ(
s_templ->db_name = table->s->db.str;
s_templ->tb_name = table->s->table_name.str;
+ DBUG_VOID_RETURN;
}
/** Check consistency between .frm indexes and InnoDB indexes.
@@ -6127,6 +6118,8 @@ ha_innobase::open(const char* name, int, uint)
ib_table = open_dict_table(name, norm_name, is_part, ignore_err);
+ DEBUG_SYNC(thd, "ib_open_after_dict_open");
+
if (NULL == ib_table) {
if (is_part) {
@@ -6232,14 +6225,6 @@ no_such_table:
mutex_enter(&dict_sys.mutex);
if (ib_table->vc_templ == NULL) {
ib_table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
- } else if (ib_table->get_ref_count() == 1) {
- /* Clean and refresh the template if no one else
- get hold on it */
- dict_free_vc_templ(ib_table->vc_templ);
- ib_table->vc_templ->vtempl = NULL;
- }
-
- if (ib_table->vc_templ->vtempl == NULL) {
innobase_build_v_templ(
table, ib_table, ib_table->vc_templ, NULL,
true);
@@ -12350,6 +12335,21 @@ int create_table_info_t::prepare_create_table(const char* name, bool strict)
DBUG_RETURN(HA_ERR_UNSUPPORTED);
}
+ for (uint i = 0; i < m_form->s->keys; i++) {
+ const size_t max_field_len
+ = DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(m_flags);
+ const KEY& key = m_form->key_info[i];
+
+ if (key.algorithm == HA_KEY_ALG_FULLTEXT) {
+ continue;
+ }
+
+ if (too_big_key_part_length(max_field_len, key)) {
+ DBUG_RETURN(convert_error_code_to_mysql(
+ DB_TOO_BIG_INDEX_COL, m_flags, NULL));
+ }
+ }
+
DBUG_RETURN(parse_table_name(name));
}
@@ -14449,7 +14449,7 @@ ha_innobase::optimize(
if (innodb_optimize_fulltext_only) {
if (m_prebuilt->table->fts && m_prebuilt->table->fts->cache
&& m_prebuilt->table->space) {
- fts_sync_table(m_prebuilt->table, false, true, false);
+ fts_sync_table(m_prebuilt->table);
fts_optimize_table(m_prebuilt->table);
}
try_alter = false;
@@ -17982,8 +17982,7 @@ innodb_defragment_frequency_update(THD*, st_mysql_sys_var*, void*,
const void* save)
{
srv_defragment_frequency = (*static_cast<const uint*>(save));
- srv_defragment_interval = ut_microseconds_to_timer(
- (ulonglong) (1000000.0 / srv_defragment_frequency));
+ srv_defragment_interval = 1000000000ULL / srv_defragment_frequency;
}
static inline char *my_strtok_r(char *str, const char *delim, char **saveptr)
@@ -20365,6 +20364,7 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
if (table->vc_templ != NULL) {
return NULL;
}
+ DBUG_ENTER("innobase_init_vc_templ");
table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t());
@@ -20372,13 +20372,13 @@ TABLE* innobase_init_vc_templ(dict_table_t* table)
ut_ad(mysql_table);
if (!mysql_table) {
- return NULL;
+ DBUG_RETURN(NULL);
}
mutex_enter(&dict_sys.mutex);
innobase_build_v_templ(mysql_table, table, table->vc_templ, NULL, true);
mutex_exit(&dict_sys.mutex);
- return mysql_table;
+ DBUG_RETURN(mysql_table);
}
/** Change dbname and table name in table->vc_templ.
@@ -20423,7 +20423,7 @@ innobase_rename_vc_templ(
given col_no.
@param[in] foreign foreign key information
@param[in] update updated parent vector.
-@param[in] col_no column position of the table
+@param[in] col_no base column position of the child table to check
@return updated field from the parent update vector, else NULL */
static
dfield_t*
@@ -20439,6 +20439,10 @@ innobase_get_field_from_update_vector(
ulint prefix_col_no;
for (ulint i = 0; i < foreign->n_fields; i++) {
+ if (dict_index_get_nth_col_no(foreign->foreign_index, i)
+ != col_no) {
+ continue;
+ }
parent_col_no = dict_index_get_nth_col_no(parent_index, i);
parent_field_no = dict_table_get_nth_col_pos(
@@ -20448,8 +20452,7 @@ innobase_get_field_from_update_vector(
upd_field_t* parent_ufield
= &update->fields[j];
- if (parent_ufield->field_no == parent_field_no
- && parent_col_no == col_no) {
+ if (parent_ufield->field_no == parent_field_no) {
return(&parent_ufield->new_val);
}
}
@@ -20580,6 +20583,7 @@ innobase_get_computed_value(
ut_ad(thd != NULL);
ut_ad(mysql_table);
+ DBUG_ENTER("innobase_get_computed_value");
const mysql_row_templ_t*
vctempl = index->table->vc_templ->vtempl[
index->table->vc_templ->n_col + col->v_pos];
@@ -20668,7 +20672,7 @@ innobase_get_computed_value(
stderr);
dtuple_print(stderr, row);
#endif /* INNODB_VIRTUAL_DEBUG */
- return(NULL);
+ DBUG_RETURN(NULL);
}
if (vctempl->mysql_null_bit_mask
@@ -20676,7 +20680,7 @@ innobase_get_computed_value(
& vctempl->mysql_null_bit_mask)) {
dfield_set_null(field);
field->type.prtype |= DATA_VIRTUAL;
- return(field);
+ DBUG_RETURN(field);
}
row_mysql_store_col_in_innobase_format(
@@ -20708,7 +20712,7 @@ innobase_get_computed_value(
dfield_dup(field, heap);
}
- return(field);
+ DBUG_RETURN(field);
}
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index a0ce93bec3c..28e1a1e36f1 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -944,3 +944,10 @@ ib_push_frm_error(
TABLE* table, /*!< in: MySQL table */
ulint n_keys, /*!< in: InnoDB #keys */
bool push_warning); /*!< in: print warning ? */
+
+/** Check each index part length whether they not exceed the max limit
+@param[in] max_field_len maximum allowed key part length
+@param[in] key MariaDB key definition
+@return true if index column length exceeds limit */
+MY_ATTRIBUTE((warn_unused_result))
+bool too_big_key_part_length(size_t max_field_len, const KEY& key);
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 73260da824f..19c35c66885 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -3990,22 +3990,15 @@ created_clustered:
DBUG_RETURN(indexdefs);
}
-/*******************************************************************//**
-Check each index column size, make sure they do not exceed the max limit
-@return true if index column size exceeds limit */
-static MY_ATTRIBUTE((nonnull, warn_unused_result))
-bool
-innobase_check_column_length(
-/*=========================*/
- ulint max_col_len, /*!< in: maximum column length */
- const KEY* key_info) /*!< in: Indexes to be created */
+MY_ATTRIBUTE((warn_unused_result))
+bool too_big_key_part_length(size_t max_field_len, const KEY& key)
{
- for (ulint key_part = 0; key_part < key_info->user_defined_key_parts; key_part++) {
- if (key_info->key_part[key_part].length > max_col_len) {
- return(true);
+ for (ulint i = 0; i < key.user_defined_key_parts; i++) {
+ if (key.key_part[i].length > max_field_len) {
+ return true;
}
}
- return(false);
+ return false;
}
/********************************************************************//**
@@ -7665,7 +7658,7 @@ check_if_ok_to_rename:
continue;
}
- if (innobase_check_column_length(max_col_len, key)) {
+ if (too_big_key_part_length(max_col_len, *key)) {
my_error(ER_INDEX_COLUMN_TOO_LONG, MYF(0),
max_col_len);
goto err_exit_no_heap;
@@ -8799,13 +8792,13 @@ innobase_drop_foreign_try(
}
/** Rename a column in the data dictionary tables.
-@param[in] user_table InnoDB table that was being altered
-@param[in] trx data dictionary transaction
-@param[in] table_name Table name in MySQL
-@param[in] from old column name
-@param[in] to new column name
-@param[in] new_clustered whether the table has been rebuilt
-@param[in] is_virtual whether it is a virtual column
+@param[in] user_table InnoDB table that was being altered
+@param[in] trx Data dictionary transaction
+@param[in] table_name Table name in MySQL
+@param[in] from old column name
+@param[in] to new column name
+@param[in] new_clustered whether the table has been rebuilt
+@param[in] evict_fk_cache Evict the fk info from cache
@retval true Failure
@retval false Success */
static MY_ATTRIBUTE((nonnull, warn_unused_result))
@@ -8816,7 +8809,8 @@ innobase_rename_column_try(
const char* table_name,
const char* from,
const char* to,
- bool new_clustered)
+ bool new_clustered,
+ bool evict_fk_cache)
{
dberr_t error;
@@ -8978,7 +8972,8 @@ rename_foreign:
}
}
- if (new_clustered) {
+ /* Reload the foreign key info for instant table too. */
+ if (new_clustered || evict_fk_cache) {
std::for_each(fk_evict.begin(), fk_evict.end(),
dict_foreign_remove_from_cache);
}
@@ -9027,7 +9022,9 @@ innobase_rename_columns_try(
if (innobase_rename_column_try(
ctx->old_table, trx, table_name,
cf->field->field_name.str,
- cf->field_name.str, true)) {
+ cf->field_name.str,
+ ctx->need_rebuild(),
+ ctx->is_instant())) {
return(true);
}
goto processed_field;
@@ -9076,7 +9073,7 @@ static void get_type(const Field& f, ulint& prtype, ulint& mtype, ulint& len)
}
/** Enlarge a column in the data dictionary tables.
-@param user_table InnoDB table that was being altered
+@param ctx In-place ALTER TABLE context
@param trx data dictionary transaction
@param table_name Table name in MySQL
@param pos 0-based index to user_table->cols[] or user_table->v_cols[]
@@ -9087,7 +9084,7 @@ static void get_type(const Field& f, ulint& prtype, ulint& mtype, ulint& len)
static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_rename_or_enlarge_column_try(
- const dict_table_t* user_table,
+ ha_innobase_inplace_ctx*ctx,
trx_t* trx,
const char* table_name,
ulint pos,
@@ -9095,8 +9092,10 @@ innobase_rename_or_enlarge_column_try(
bool is_v)
{
dict_col_t* col;
+ dict_table_t* user_table = ctx->old_table;
DBUG_ENTER("innobase_rename_or_enlarge_column_try");
+ DBUG_ASSERT(!ctx->need_rebuild());
DBUG_ASSERT(trx_get_dict_operation(trx) == TRX_DICT_OP_INDEX);
ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH);
@@ -9156,7 +9155,7 @@ innobase_rename_or_enlarge_column_try(
if (!same_name
&& innobase_rename_column_try(user_table, trx, table_name,
col_name, f.field_name.str,
- false)) {
+ false, ctx->is_instant())) {
DBUG_RETURN(true);
}
@@ -9214,7 +9213,7 @@ innobase_rename_or_enlarge_columns_try(
while (Create_field* cf = cf_it++) {
if (cf->field == *fp) {
if (innobase_rename_or_enlarge_column_try(
- ctx->old_table, trx, table_name,
+ ctx, trx, table_name,
idx, **af, is_v)) {
DBUG_RETURN(true);
}
@@ -9824,74 +9823,6 @@ commit_try_rebuild(
index->to_be_dropped = 0;
}
- /* We copied the table. Any indexes that were requested to be
- dropped were not created in the copy of the table. Apply any
- last bit of the rebuild log and then rename the tables. */
-
- if (ctx->online) {
- DEBUG_SYNC_C("row_log_table_apply2_before");
-
- dict_vcol_templ_t* s_templ = NULL;
-
- if (ctx->new_table->n_v_cols > 0) {
- s_templ = UT_NEW_NOKEY(
- dict_vcol_templ_t());
- s_templ->vtempl = NULL;
-
- innobase_build_v_templ(
- altered_table, ctx->new_table, s_templ,
- NULL, true);
- ctx->new_table->vc_templ = s_templ;
- }
-
- error = row_log_table_apply(
- ctx->thr, user_table, altered_table,
- static_cast<ha_innobase_inplace_ctx*>(
- ha_alter_info->handler_ctx)->m_stage,
- ctx->new_table);
-
- if (s_templ) {
- ut_ad(ctx->need_rebuild());
- dict_free_vc_templ(s_templ);
- UT_DELETE(s_templ);
- ctx->new_table->vc_templ = NULL;
- }
-
- ulint err_key = thr_get_trx(ctx->thr)->error_key_num;
-
- switch (error) {
- KEY* dup_key;
- case DB_SUCCESS:
- break;
- case DB_DUPLICATE_KEY:
- if (err_key == ULINT_UNDEFINED) {
- /* This should be the hidden index on
- FTS_DOC_ID. */
- dup_key = NULL;
- } else {
- DBUG_ASSERT(err_key <
- ha_alter_info->key_count);
- dup_key = &ha_alter_info
- ->key_info_buffer[err_key];
- }
- print_keydup_error(altered_table, dup_key, MYF(0));
- DBUG_RETURN(true);
- case DB_ONLINE_LOG_TOO_BIG:
- my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0),
- get_error_key_name(err_key, ha_alter_info,
- rebuilt_table));
- DBUG_RETURN(true);
- case DB_INDEX_CORRUPT:
- my_error(ER_INDEX_CORRUPT, MYF(0),
- get_error_key_name(err_key, ha_alter_info,
- rebuilt_table));
- DBUG_RETURN(true);
- default:
- my_error_innodb(error, table_name, user_table->flags);
- DBUG_RETURN(true);
- }
- }
-
if ((ha_alter_info->handler_flags
& ALTER_COLUMN_NAME)
&& innobase_rename_columns_try(ha_alter_info, ctx, old_table,
@@ -10642,6 +10573,91 @@ do { \
# define DBUG_INJECT_CRASH(prefix, count)
#endif
+/** Apply the log for the table rebuild operation.
+@param[in] ctx Inplace Alter table context
+@param[in] altered_table MySQL table that is being altered
+@return true Failure, else false. */
+static bool alter_rebuild_apply_log(
+ ha_innobase_inplace_ctx* ctx,
+ Alter_inplace_info* ha_alter_info,
+ TABLE* altered_table)
+{
+ DBUG_ENTER("alter_rebuild_apply_log");
+
+ if (!ctx->online) {
+ DBUG_RETURN(false);
+ }
+
+ /* We copied the table. Any indexes that were requested to be
+ dropped were not created in the copy of the table. Apply any
+ last bit of the rebuild log and then rename the tables. */
+ dict_table_t* user_table = ctx->old_table;
+ dict_table_t* rebuilt_table = ctx->new_table;
+
+ DEBUG_SYNC_C("row_log_table_apply2_before");
+
+ dict_vcol_templ_t* s_templ = NULL;
+
+ if (ctx->new_table->n_v_cols > 0) {
+ s_templ = UT_NEW_NOKEY(
+ dict_vcol_templ_t());
+ s_templ->vtempl = NULL;
+
+ innobase_build_v_templ(altered_table, ctx->new_table, s_templ,
+ NULL, true);
+ ctx->new_table->vc_templ = s_templ;
+ }
+
+ dberr_t error = row_log_table_apply(
+ ctx->thr, user_table, altered_table,
+ static_cast<ha_innobase_inplace_ctx*>(
+ ha_alter_info->handler_ctx)->m_stage,
+ ctx->new_table);
+
+ if (s_templ) {
+ ut_ad(ctx->need_rebuild());
+ dict_free_vc_templ(s_templ);
+ UT_DELETE(s_templ);
+ ctx->new_table->vc_templ = NULL;
+ }
+
+ ulint err_key = thr_get_trx(ctx->thr)->error_key_num;
+
+ switch (error) {
+ KEY* dup_key;
+ case DB_SUCCESS:
+ break;
+ case DB_DUPLICATE_KEY:
+ if (err_key == ULINT_UNDEFINED) {
+ /* This should be the hidden index on
+ FTS_DOC_ID. */
+ dup_key = NULL;
+ } else {
+ DBUG_ASSERT(err_key < ha_alter_info->key_count);
+ dup_key = &ha_alter_info->key_info_buffer[err_key];
+ }
+
+ print_keydup_error(altered_table, dup_key, MYF(0));
+ DBUG_RETURN(true);
+ case DB_ONLINE_LOG_TOO_BIG:
+ my_error(ER_INNODB_ONLINE_LOG_TOO_BIG, MYF(0),
+ get_error_key_name(err_key, ha_alter_info,
+ rebuilt_table));
+ DBUG_RETURN(true);
+ case DB_INDEX_CORRUPT:
+ my_error(ER_INDEX_CORRUPT, MYF(0),
+ get_error_key_name(err_key, ha_alter_info,
+ rebuilt_table));
+ DBUG_RETURN(true);
+ default:
+ my_error_innodb(error, ctx->old_table->name.m_name,
+ user_table->flags);
+ DBUG_RETURN(true);
+ }
+
+ DBUG_RETURN(false);
+}
+
/** Commit or rollback the changes made during
prepare_inplace_alter_table() and inplace_alter_table() inside
the storage engine. Note that the allowed level of concurrency
@@ -10786,6 +10802,19 @@ ha_innobase::commit_inplace_alter_table(
ut_ad(!ctx->new_table->fts->add_wq);
fts_optimize_remove_table(ctx->new_table);
}
+
+ /* Apply the online log of the table before acquiring
+ data dictionary latches. Here alter thread already acquired
+ MDL_EXCLUSIVE on the table. So there can't be anymore DDLs, DMLs
+ for the altered table. By applying the log here, InnoDB
+ makes sure that concurrent DDLs, purge thread or any other
+ background thread doesn't wait for the dict_operation_lock
+ for longer time. */
+ if (new_clustered && commit
+ && alter_rebuild_apply_log(
+ ctx, ha_alter_info, altered_table)) {
+ DBUG_RETURN(true);
+ }
}
if (!trx) {
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index 568320457f9..1dfb427e2b5 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -826,6 +826,18 @@ dict_table_has_atomic_blobs(const dict_table_t* table)
return(DICT_TF_HAS_ATOMIC_BLOBS(table->flags));
}
+/** @return potential max length stored inline for externally stored fields */
+inline size_t dict_table_t::get_overflow_field_local_len() const
+{
+ if (dict_table_has_atomic_blobs(this)) {
+ /* ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED: do not
+ store any BLOB prefix locally */
+ return BTR_EXTERN_FIELD_REF_SIZE;
+ }
+ /* up to MySQL 5.1: store a 768-byte prefix locally */
+ return BTR_EXTERN_FIELD_REF_SIZE + DICT_ANTELOPE_MAX_INDEX_COL_LEN;
+}
+
/** Set the various values in a dict_table_t::flags pointer.
@param[in,out] flags, Pointer to a 4 byte Table Flags
@param[in] format, File Format
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic
index ca2e5a5c52b..41c5c2220a4 100644
--- a/storage/innobase/include/dict0dict.ic
+++ b/storage/innobase/include/dict0dict.ic
@@ -1274,6 +1274,9 @@ void
dict_free_vc_templ(
dict_vcol_templ_t* vc_templ)
{
+ UT_DELETE_ARRAY(vc_templ->default_rec);
+ vc_templ->default_rec = NULL;
+
if (vc_templ->vtempl != NULL) {
ut_ad(vc_templ->n_v_col > 0);
for (ulint i = 0; i < vc_templ->n_col
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index f507007fee9..e72b24da9f5 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -1214,6 +1214,12 @@ struct dict_index_t {
bool
vers_history_row(const rec_t* rec, bool &history_row);
+ /** If a record of this index might not fit on a single B-tree page,
+ return true.
+ @param[in] strict issue error or warning
+ @return true if the index record could become too big */
+ bool rec_potentially_too_big(bool strict) const;
+
/** Reconstruct the clustered index fields. */
inline void reconstruct_fields();
@@ -1776,6 +1782,9 @@ struct dict_table_t {
ut_ad(fk_checks > 0);
}
+ /** For overflow fields returns potential max length stored inline */
+ inline size_t get_overflow_field_local_len() const;
+
private:
/** Initialize instant->field_map.
@tparam replace_dropped whether to point clustered index fields
@@ -1979,7 +1988,7 @@ public:
unsigned stat_initialized:1;
/** Timestamp of last recalc of the stats. */
- ib_time_t stats_last_recalc;
+ time_t stats_last_recalc;
/** The two bits below are set in the 'stat_persistent' member. They
have the following meaning:
diff --git a/storage/innobase/include/dict0stats.h b/storage/innobase/include/dict0stats.h
index 5bd921b1b8b..ab001130364 100644
--- a/storage/innobase/include/dict0stats.h
+++ b/storage/innobase/include/dict0stats.h
@@ -216,7 +216,7 @@ rolled back only in the case of error, but not freed.
dberr_t
dict_stats_save_index_stat(
dict_index_t* index,
- ib_time_t last_update,
+ time_t last_update,
const char* stat_name,
ib_uint64_t stat_value,
ib_uint64_t* sample_size,
diff --git a/storage/innobase/include/fts0fts.h b/storage/innobase/include/fts0fts.h
index b5c81250c28..07be853efad 100644
--- a/storage/innobase/include/fts0fts.h
+++ b/storage/innobase/include/fts0fts.h
@@ -780,16 +780,9 @@ fts_drop_orphaned_tables(void);
/** Run SYNC on the table, i.e., write out data from the cache to the
FTS auxiliary INDEX table and clear the cache at the end.
@param[in,out] table fts table
-@param[in] unlock_cache whether unlock cache when write node
-@param[in] wait whether wait for existing sync to finish
-@param[in] has_dict whether has dict operation lock
+@param[in] wait whether to wait for existing sync to finish
@return DB_SUCCESS on success, error code on failure. */
-dberr_t
-fts_sync_table(
- dict_table_t* table,
- bool unlock_cache,
- bool wait,
- bool has_dict);
+dberr_t fts_sync_table(dict_table_t* table, bool wait = true);
/****************************************************************//**
Free the query graph but check whether dict_sys.mutex is already
diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h
index 26f18cc3d1d..a08a60b9e95 100644
--- a/storage/innobase/include/fts0types.h
+++ b/storage/innobase/include/fts0types.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -123,7 +123,8 @@ struct fts_sync_t {
doc_id_t max_doc_id; /*!< The doc id at which the cache was
noted as being full, we use this to
set the upper_limit field */
- ib_time_t start_time; /*!< SYNC start time */
+ time_t start_time; /*!< SYNC start time; only used if
+ fts_enable_diag_print */
bool in_progress; /*!< flag whether sync is in progress.*/
bool unlock_cache; /*!< flag whether unlock cache when
write fts node */
diff --git a/storage/innobase/include/ha_prototypes.h b/storage/innobase/include/ha_prototypes.h
index b529f37d76e..f37dff44b2f 100644
--- a/storage/innobase/include/ha_prototypes.h
+++ b/storage/innobase/include/ha_prototypes.h
@@ -361,14 +361,6 @@ thd_trx_is_auto_commit(
/*===================*/
THD* thd); /*!< in: thread handle, or NULL */
-/******************************************************************//**
-Get the thread start time.
-@return the thread start time in seconds since the epoch. */
-ulint
-thd_start_time_in_secs(
-/*===================*/
- THD* thd); /*!< in: thread handle, or NULL */
-
/*****************************************************************//**
A wrapper function of innobase_convert_name(), convert a table name
to the MySQL system_charset_info (UTF-8) and quote it if needed.
diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h
index 0481ecab3a2..91ee6b07c40 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -566,11 +566,10 @@ lock_print_info_summary(
/** Prints transaction lock wait and MVCC state.
@param[in,out] file file where to print
-@param[in] trx transaction */
+@param[in] trx transaction
+@param[in] now current time */
void
-lock_trx_print_wait_and_mvcc_state(
- FILE* file,
- const trx_t* trx);
+lock_trx_print_wait_and_mvcc_state(FILE* file, const trx_t* trx, time_t now);
/*********************************************************************//**
Prints info of locks for each transaction. This function assumes that the
diff --git a/storage/innobase/include/lock0types.h b/storage/innobase/include/lock0types.h
index bdd03c49554..cb04afdf9db 100644
--- a/storage/innobase/include/lock0types.h
+++ b/storage/innobase/include/lock0types.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, MariaDB Corporation.
+Copyright (c) 2018, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -190,10 +190,14 @@ struct ib_lock_t
lock. The link node in a singly linked
list, used during hashing. */
- /* Statistics for how long lock has been held and time
- how long this lock had to be waited before it was granted */
- time_t requested_time; /*!< Lock request time */
- ulint wait_time; /*!< Time waited this lock or 0 */
+ /** time(NULL) of the lock request creation.
+ Used for computing wait_time and diagnostics only.
+ Note: bogus durations may be reported
+ when the system time is adjusted! */
+ time_t requested_time;
+ /** Cumulated wait time in seconds.
+ Note: may be bogus when the system time is adjusted! */
+ ulint wait_time;
union {
lock_table_t tab_lock;/*!< table lock */
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index 347d33e0907..5a687b5df08 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -231,7 +231,7 @@ struct recv_sys_t{
/*!< the LSN of a MLOG_CHECKPOINT
record, or 0 if none was parsed */
/** the time when progress was last reported */
- ib_time_t progress_time;
+ time_t progress_time;
mem_heap_t* heap; /*!< memory heap of log records and file
addresses*/
hash_table_t* addr_hash;/*!< hash table of file addresses of pages */
@@ -282,7 +282,7 @@ struct recv_sys_t{
@param[in] time the current time
@return whether progress should be reported
(the last report was at least 15 seconds ago) */
- bool report(ib_time_t time)
+ bool report(time_t time)
{
if (time - progress_time < 15) {
return false;
diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h
index fa4c2526ae3..6d0f95cba19 100644
--- a/storage/innobase/include/mem0mem.h
+++ b/storage/innobase/include/mem0mem.h
@@ -73,7 +73,7 @@ allocations of small buffers. */
/** If a memory heap is allowed to grow into the buffer pool, the following
is the maximum size for a single allocated buffer: */
-#define MEM_MAX_ALLOC_IN_BUF (srv_page_size - 200)
+#define MEM_MAX_ALLOC_IN_BUF (srv_page_size - 200 + REDZONE_SIZE)
/** Space needed when allocating for a user a field of length N.
The space is allocated only in multiples of UNIV_MEM_ALIGNMENT. */
diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic
index e00e814571c..fae2aaf4d04 100644
--- a/storage/innobase/include/mem0mem.ic
+++ b/storage/innobase/include/mem0mem.ic
@@ -183,13 +183,15 @@ mem_heap_alloc(
ulint n)
{
mem_block_t* block;
- void* buf;
+ byte* buf;
ulint free;
ut_d(mem_block_validate(heap));
block = UT_LIST_GET_LAST(heap->base);
+ n += REDZONE_SIZE;
+
ut_ad(!(block->type & MEM_HEAP_BUFFER) || (n <= MEM_MAX_ALLOC_IN_BUF));
/* Check if there is enough space in block. If not, create a new
@@ -212,7 +214,8 @@ mem_heap_alloc(
mem_block_set_free(block, free + MEM_SPACE_NEEDED(n));
- TRASH_ALLOC(buf, n);
+ buf = buf + REDZONE_SIZE;
+ UNIV_MEM_ALLOC(buf, n - REDZONE_SIZE);
return(buf);
}
@@ -342,6 +345,8 @@ mem_heap_free_top(
ut_d(mem_block_validate(heap));
+ n += REDZONE_SIZE;
+
block = UT_LIST_GET_LAST(heap->base);
/* Subtract the free field of block */
diff --git a/storage/innobase/include/row0ftsort.h b/storage/innobase/include/row0ftsort.h
index b2c5651c9c5..beb2f8c2bfb 100644
--- a/storage/innobase/include/row0ftsort.h
+++ b/storage/innobase/include/row0ftsort.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -59,6 +59,8 @@ struct fts_psort_t;
struct fts_psort_common_t {
row_merge_dup_t* dup; /*!< descriptor of FTS index */
dict_table_t* new_table; /*!< source table */
+ /** Old table page size */
+ ulint old_zip_size;
trx_t* trx; /*!< transaction */
fts_psort_t* all_info; /*!< all parallel sort info */
os_event_t sort_event; /*!< sort event */
@@ -190,26 +192,27 @@ row_merge_create_fts_sort_index(
instead of 8 bytes integer to
store Doc ID during sort */
-/********************************************************************//**
-Initialize FTS parallel sort structures.
-@return TRUE if all successful */
-ibool
+/** Initialize FTS parallel sort structures.
+@param[in] trx transaction
+@param[in,out] dup descriptor of FTS index being created
+@param[in] new_table table where indexes are created
+@param[in] opt_doc_id_size whether to use 4 bytes instead of 8 bytes
+ integer to store Doc ID during sort
+@param[in] old_zip_size page size of the old table during alter
+@param[out] psort parallel sort info to be instantiated
+@param[out] merge parallel merge info to be instantiated
+@return true if all successful */
+bool
row_fts_psort_info_init(
-/*====================*/
- trx_t* trx, /*!< in: transaction */
- row_merge_dup_t* dup, /*!< in,own: descriptor of
- FTS index being created */
- const dict_table_t* new_table,/*!< in: table where indexes are
- created */
- ibool opt_doc_id_size,
- /*!< in: whether to use 4 bytes
- instead of 8 bytes integer to
- store Doc ID during sort */
- fts_psort_t** psort, /*!< out: parallel sort info to be
- instantiated */
- fts_psort_t** merge) /*!< out: parallel merge info
- to be instantiated */
+ trx_t* trx,
+ row_merge_dup_t*dup,
+ dict_table_t* new_table,
+ bool opt_doc_id_size,
+ ulint old_zip_size,
+ fts_psort_t** psort,
+ fts_psort_t** merge)
MY_ATTRIBUTE((nonnull));
+
/********************************************************************//**
Clean up and deallocate FTS parallel sort structures, and close
temparary merge sort files */
diff --git a/storage/innobase/include/srv0mon.h b/storage/innobase/include/srv0mon.h
index 5651c70a1ba..5a4d424981e 100644
--- a/storage/innobase/include/srv0mon.h
+++ b/storage/innobase/include/srv0mon.h
@@ -2,7 +2,7 @@
Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -64,9 +64,9 @@ create the internal counter ID in "monitor_id_t". */
/** Structure containing the actual values of a monitor counter. */
struct monitor_value_t {
- ib_time_t mon_start_time; /*!< Start time of monitoring */
- ib_time_t mon_stop_time; /*!< Stop time of monitoring */
- ib_time_t mon_reset_time; /*!< Time counter resetted */
+ time_t mon_start_time; /*!< Start time of monitoring */
+ time_t mon_stop_time; /*!< Stop time of monitoring */
+ time_t mon_reset_time; /*!< Time of resetting the counter */
mon_type_t mon_value; /*!< Current counter Value */
mon_type_t mon_max_value; /*!< Current Max value */
mon_type_t mon_min_value; /*!< Current Min value */
@@ -719,8 +719,8 @@ monitor counter
#define MONITOR_INC_TIME_IN_MICRO_SECS(monitor, value) \
MONITOR_CHECK_DEFINED(value); \
if (MONITOR_IS_ON(monitor)) { \
- uintmax_t old_time = (value); \
- value = ut_time_us(NULL); \
+ uintmax_t old_time = value; \
+ value = microsecond_interval_timer(); \
MONITOR_VALUE(monitor) += (mon_type_t) (value - old_time);\
}
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 843eadacc5f..fe1be626a23 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -1064,10 +1064,14 @@ struct srv_slot_t{
ibool suspended; /*!< TRUE if the thread is
waiting for the event of this
slot */
- ib_time_t suspend_time; /*!< time when the thread was
- suspended. Initialized by
- lock_wait_table_reserve_slot()
- for lock wait */
+ /** time(NULL) when the thread was suspended.
+ FIXME: Use my_interval_timer() or similar, to avoid bogus
+ timeouts in lock_wait_check_and_cancel() or lock_wait_suspend_thread()
+ when the system time is adjusted to the past!
+
+ FIXME: This is duplicating trx_lock_t::wait_started,
+ which is being used for diagnostic purposes only. */
+ time_t suspend_time;
ulong wait_timeout; /*!< wait time that if exceeded
the thread will be timed out.
Initialized by
diff --git a/storage/innobase/include/trx0i_s.h b/storage/innobase/include/trx0i_s.h
index 97fb0a7cdaa..65c7d321597 100644
--- a/storage/innobase/include/trx0i_s.h
+++ b/storage/innobase/include/trx0i_s.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -127,12 +127,12 @@ struct i_s_trx_row_t {
trx_id_t trx_id; /*!< transaction identifier */
const char* trx_state; /*!< transaction state from
trx_get_que_state_str() */
- ib_time_t trx_started; /*!< trx_t::start_time */
+ time_t trx_started; /*!< trx_t::start_time */
const i_s_locks_row_t* requested_lock_row;
/*!< pointer to a row
in innodb_locks if trx
is waiting, or NULL */
- ib_time_t trx_wait_started; /*!< trx_t::wait_started */
+ time_t trx_wait_started; /*!< trx_t->lock.wait_started */
uintmax_t trx_weight; /*!< TRX_WEIGHT() */
ulint trx_mysql_thread_id; /*!< thd_get_thread_id() */
const char* trx_query; /*!< MySQL statement being
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index 06362a62865..9d2a7680900 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -927,10 +927,11 @@ public:
on dict_sys.latch. Protected
by dict_sys.latch. */
- time_t start_time; /*!< time the state last time became
- TRX_STATE_ACTIVE */
- ib_uint64_t start_time_micro; /*!< start time of transaction in
- microseconds */
+ /** wall-clock time of the latest transition to TRX_STATE_ACTIVE;
+ used for diagnostic purposes only */
+ time_t start_time;
+ /** microsecond_interval_timer() of transaction start */
+ ulonglong start_time_micro;
lsn_t commit_lsn; /*!< lsn at the time of the commit */
table_id_t table_id; /*!< Table to drop iff dict_operation
== TRX_DICT_OP_TABLE, or 0. */
diff --git a/storage/innobase/include/ut0timer.h b/storage/innobase/include/ut0timer.h
deleted file mode 100644
index 376af3cf0ef..00000000000
--- a/storage/innobase/include/ut0timer.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by 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-1335 USA
-
-*****************************************************************************/
-
-/********************************************************************//**
-@file include/ut0timer.h
-Timer routines
-
-Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
-modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
-*************************************************************************/
-#ifndef ut0timer_h
-#define ut0timer_h
-
-#include "univ.i"
-
-/* Current timer stats */
-extern struct my_timer_unit_info ut_timer;
-
-/**************************************************************//**
-Function pointer to point selected timer function.
-@return timer current value */
-extern ulonglong (*ut_timer_now)(void);
-
-/**************************************************************//**
-Sets up the data required for use of my_timer_* functions.
-Selects the best timer by high frequency, and tight resolution.
-Points my_timer_now() to the selected timer function.
-Initializes my_timer struct to contain the info for selected timer.*/
-UNIV_INTERN
-void ut_init_timer(void);
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into microseconds in a double
-@return time in microseconds */
-UNIV_INLINE
-double
-ut_timer_to_microseconds(
-/*=====================*/
- ulonglong when); /*!< in: time where to calculate */
-/**************************************************************//**
-Convert microseconds in a double to native timer units in a ulonglong
-@return time in microseconds */
-UNIV_INLINE
-ulonglong
-ut_microseconds_to_timer(
-/*=====================*/
- ulonglong when); /*!< in: time where to calculate */
-
-#include "ut0timer.ic"
-
-#endif
diff --git a/storage/innobase/include/ut0timer.ic b/storage/innobase/include/ut0timer.ic
deleted file mode 100644
index 26cf0bd2fbe..00000000000
--- a/storage/innobase/include/ut0timer.ic
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by 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-1335 USA
-
-*****************************************************************************/
-
-/********************************************************************//**
-@file include/ut0timer.ic
-Timer routines
-
-Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
-modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
-*************************************************************************/
-
-/**************************************************************//**
-Convert native timer units in a ulonglong into microseconds in a double
-@return time in microseconds */
-UNIV_INLINE
-double
-ut_timer_to_microseconds(
-/*=====================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)(when);
- ret *= 1000000.0;
- ret /= (double)(ut_timer.frequency);
- return ret;
-}
-
-/**************************************************************//**
-Convert microseconds in a double to native timer units in a ulonglong
-@return time in microseconds */
-UNIV_INLINE
-ulonglong
-ut_microseconds_to_timer(
-/*=====================*/
- ulonglong when) /*!< in: time where to calculate */
-{
- double ret = (double)when;
- ret *= (double)(ut_timer.frequency);
- ret /= 1000000.0;
- return (ulonglong)ret;
-}
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index a063399849d..410d2ead738 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -50,25 +50,6 @@ Created 1/20/1994 Heikki Tuuri
/** Index name prefix in fast index creation, as a string constant */
#define TEMP_INDEX_PREFIX_STR "\377"
-/** Time stamp */
-typedef time_t ib_time_t;
-
-/*********************************************************************//**
-Delays execution for at most max_wait_us microseconds or returns earlier
-if cond becomes true.
-@param cond in: condition to wait for; evaluated every 2 ms
-@param max_wait_us in: maximum delay to wait, in microseconds */
-# define UT_WAIT_FOR(cond, max_wait_us) \
-do { \
- uintmax_t start_us; \
- start_us = ut_time_us(NULL); \
- while (!(cond) \
- && ut_time_us(NULL) - start_us < (max_wait_us)) {\
- \
- os_thread_sleep(2000 /* 2 ms */); \
- } \
-} while (0)
-
#define ut_max std::max
#define ut_min std::min
@@ -165,44 +146,6 @@ ut_2_power_up(
MY_ATTRIBUTE((const));
/**********************************************************//**
-Returns system time. We do not specify the format of the time returned:
-the only way to manipulate it is to use the function ut_difftime.
-@return system time */
-ib_time_t
-ut_time(void);
-/*=========*/
-
-/**********************************************************//**
-Returns system time.
-Upon successful completion, the value 0 is returned; otherwise the
-value -1 is returned and the global variable errno is set to indicate the
-error.
-@return 0 on success, -1 otherwise */
-int
-ut_usectime(
-/*========*/
- ulint* sec, /*!< out: seconds since the Epoch */
- ulint* ms); /*!< out: microseconds since the Epoch+*sec */
-
-/**********************************************************//**
-Returns the number of microseconds since epoch. Similar to
-time(3), the return value is also stored in *tloc, provided
-that tloc is non-NULL.
-@return us since epoch */
-uintmax_t
-ut_time_us(
-/*=======*/
- uintmax_t* tloc); /*!< out: us since epoch, if non-NULL */
-/**********************************************************//**
-Returns the number of milliseconds since some epoch. The
-value may wrap around. It should only be used for heuristic
-purposes.
-@return ms since epoch */
-ulint
-ut_time_ms(void);
-/*============*/
-
-/**********************************************************//**
Returns the number of milliseconds since some epoch. The
value may wrap around. It should only be used for heuristic
purposes.
@@ -210,16 +153,6 @@ purposes.
ulint
ut_time_ms(void);
/*============*/
-
-/**********************************************************//**
-Returns the difference of two times in seconds.
-@return time2 - time1 expressed in seconds */
-double
-ut_difftime(
-/*========*/
- ib_time_t time2, /*!< in: time */
- ib_time_t time1); /*!< in: time */
-
#endif /* !UNIV_INNOCHECKSUM */
/** Determine how many bytes (groups of 8 bits) are needed to
diff --git a/storage/innobase/include/ut0wqueue.h b/storage/innobase/include/ut0wqueue.h
index 008ea2a70dd..6a096a36894 100644
--- a/storage/innobase/include/ut0wqueue.h
+++ b/storage/innobase/include/ut0wqueue.h
@@ -84,7 +84,7 @@ ib_wqueue_timedwait(
/*================*/
/* out: work item or NULL on timeout*/
ib_wqueue_t* wq, /* in: work queue */
- ib_time_t wait_in_usecs); /* in: wait time in micro seconds */
+ ulint wait_in_usecs); /* in: wait time in micro seconds */
/********************************************************************
Return first item on work queue or NULL if queue is empty
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 781fb6dabb4..21ff8097af7 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -72,44 +72,39 @@ extern "C" void thd_rpl_deadlock_check(MYSQL_THD thd, MYSQL_THD other_thd);
extern "C" int thd_need_wait_reports(const MYSQL_THD thd);
extern "C" int thd_need_ordering_with(const MYSQL_THD thd, const MYSQL_THD other_thd);
-/** Print info of a table lock.
+/** Pretty-print a table lock.
@param[in,out] file output stream
@param[in] lock table lock */
-static
-void
-lock_table_print(FILE* file, const lock_t* lock);
+static void lock_table_print(FILE* file, const lock_t* lock);
-/** Print info of a record lock.
+/** Pretty-print a record lock.
@param[in,out] file output stream
-@param[in] lock record lock */
-static
-void
-lock_rec_print(FILE* file, const lock_t* lock);
+@param[in] lock record lock
+@param[in,out] mtr mini-transaction for accessing the record */
+static void lock_rec_print(FILE* file, const lock_t* lock, mtr_t& mtr);
/** Deadlock checker. */
class DeadlockChecker {
public:
- /** Checks if a joining lock request results in a deadlock. If
- a deadlock is found this function will resolve the deadlock
- by choosing a victim transaction and rolling it back. It
- will attempt to resolve all deadlocks. The returned transaction
- id will be the joining transaction id or 0 if some other
- transaction was chosen as a victim and rolled back or no
- deadlock found.
-
- @param lock lock the transaction is requesting
- @param trx transaction requesting the lock
-
- @return id of transaction chosen as victim or 0 */
- static const trx_t* check_and_resolve(
- const lock_t* lock,
- trx_t* trx);
+ /** Check if a joining lock request results in a deadlock.
+ If a deadlock is found, we will resolve the deadlock by
+ choosing a victim transaction and rolling it back.
+ We will attempt to resolve all deadlocks.
+
+ @param[in] lock the lock request
+ @param[in,out] trx transaction requesting the lock
+
+ @return trx if it was chosen as victim
+ @retval NULL if another victim was chosen,
+ or there is no deadlock (any more) */
+ static const trx_t* check_and_resolve(const lock_t* lock, trx_t* trx);
private:
/** Do a shallow copy. Default destructor OK.
@param trx the start transaction (start node)
@param wait_lock lock that a transaction wants
- @param mark_start visited node counter */
+ @param mark_start visited node counter
+ @param report_waiters whether to call thd_rpl_deadlock_check() */
DeadlockChecker(
const trx_t* trx,
const lock_t* wait_lock,
@@ -751,11 +746,12 @@ lock_rec_has_to_wait(
thread, we need to look at trx ordering and lock types */
if (wsrep_thd_is_BF(trx->mysql_thd, FALSE)
&& wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) {
+ mtr_t mtr;
if (wsrep_debug) {
ib::info() << "BF-BF lock conflict, locking: "
<< for_locking;
- lock_rec_print(stderr, lock2);
+ lock_rec_print(stderr, lock2, mtr);
ib::info()
<< " SQL1: " << wsrep_thd_query(trx->mysql_thd)
<< " SQL2: "
@@ -777,7 +773,7 @@ lock_rec_has_to_wait(
<< " locked "
<< wsrep_thd_transaction_state_str(
lock2->trx->mysql_thd);
- lock_rec_print(stderr, lock2);
+ lock_rec_print(stderr, lock2, mtr);
ib::info() << " SQL1: "
<< wsrep_thd_query(trx->mysql_thd)
<< " SQL2: "
@@ -1100,6 +1096,7 @@ wsrep_kill_victim(
}
my_bool bf_other = wsrep_thd_is_BF(lock->trx->mysql_thd, TRUE);
+ mtr_t mtr;
if ((!bf_other) ||
(wsrep_thd_order_before(
@@ -1127,7 +1124,7 @@ wsrep_kill_victim(
ib::info() << "*** WAITING FOR THIS LOCK TO BE GRANTED:";
if (lock_get_type(lock) == LOCK_REC) {
- lock_rec_print(stderr, lock);
+ lock_rec_print(stderr, lock, mtr);
} else {
lock_table_print(stderr, lock);
}
@@ -1293,6 +1290,7 @@ wsrep_print_wait_locks(
lock_t* c_lock) /* conflicting lock to print */
{
if (wsrep_debug && c_lock->trx->lock.wait_lock != c_lock) {
+ mtr_t mtr;
ib::info() << "WSREP: c_lock != wait lock";
ib::info() << " SQL: "
<< wsrep_thd_query(c_lock->trx->mysql_thd);
@@ -1300,13 +1298,14 @@ wsrep_print_wait_locks(
if (lock_get_type_low(c_lock) & LOCK_TABLE) {
lock_table_print(stderr, c_lock);
} else {
- lock_rec_print(stderr, c_lock);
+ lock_rec_print(stderr, c_lock, mtr);
}
if (lock_get_type_low(c_lock->trx->lock.wait_lock) & LOCK_TABLE) {
lock_table_print(stderr, c_lock->trx->lock.wait_lock);
} else {
- lock_rec_print(stderr, c_lock->trx->lock.wait_lock);
+ lock_rec_print(stderr, c_lock->trx->lock.wait_lock,
+ mtr);
}
}
}
@@ -1519,11 +1518,7 @@ If only one of them is a wait lock, it has lower priority.
If either is a high priority transaction, the lock has higher priority.
Otherwise, the one with an older transaction has higher priority.
@returns true if lock1 has higher priority, false otherwise. */
-static
-bool
-has_higher_priority(
- lock_t *lock1,
- lock_t *lock2)
+static bool has_higher_priority(lock_t *lock1, lock_t *lock2)
{
if (lock1 == NULL) {
return false;
@@ -1730,10 +1725,7 @@ lock_rec_enqueue_waiting(
lock_prdt_set_prdt(lock, prdt);
}
- if (
-#ifdef UNIV_DEBUG
- const trx_t* victim =
-#endif
+ if (ut_d(const trx_t* victim =)
DeadlockChecker::check_and_resolve(lock, trx)) {
ut_ad(victim == trx);
lock_reset_lock_and_trx_wait(lock);
@@ -1757,7 +1749,7 @@ lock_rec_enqueue_waiting(
trx->lock.que_state = TRX_QUE_LOCK_WAIT;
trx->lock.was_chosen_as_deadlock_victim = false;
- trx->lock.wait_started = ut_time();
+ trx->lock.wait_started = time(NULL);
ut_a(que_thr_stop(thr));
@@ -2067,12 +2059,13 @@ lock_rec_has_to_wait_in_queue(
if (wsrep_thd_is_BF(wait_lock->trx->mysql_thd, FALSE) &&
wsrep_thd_is_BF(lock->trx->mysql_thd, TRUE)) {
if (wsrep_debug) {
+ mtr_t mtr;
ib::info() << "WSREP: waiting BF trx: " << ib::hex(wait_lock->trx->id)
<< " query: " << wsrep_thd_query(wait_lock->trx->mysql_thd);
- lock_rec_print(stderr, wait_lock);
+ lock_rec_print(stderr, wait_lock, mtr);
ib::info() << "WSREP: do not wait another BF trx: " << ib::hex(lock->trx->id)
<< " query: " << wsrep_thd_query(lock->trx->mysql_thd);
- lock_rec_print(stderr, lock);
+ lock_rec_print(stderr, lock, mtr);
}
/* don't wait for another BF lock */
continue;
@@ -3770,7 +3763,7 @@ lock_table_enqueue_waiting(
);
const trx_t* victim_trx =
- DeadlockChecker::check_and_resolve(lock, trx);
+ DeadlockChecker::check_and_resolve(lock, trx);
if (victim_trx != 0) {
ut_ad(victim_trx == trx);
@@ -3791,7 +3784,7 @@ lock_table_enqueue_waiting(
trx->lock.que_state = TRX_QUE_LOCK_WAIT;
- trx->lock.wait_started = ut_time();
+ trx->lock.wait_started = time(NULL);
trx->lock.was_chosen_as_deadlock_victim = false;
ut_a(que_thr_stop(thr));
@@ -4429,20 +4422,14 @@ lock_table_print(FILE* file, const lock_t* lock)
putc('\n', file);
}
-/** Print info of a record lock.
+/** Pretty-print a record lock.
@param[in,out] file output stream
-@param[in] lock record lock */
-static
-void
-lock_rec_print(FILE* file, const lock_t* lock)
+@param[in] lock record lock
+@param[in,out] mtr mini-transaction for accessing the record */
+static void lock_rec_print(FILE* file, const lock_t* lock, mtr_t& mtr)
{
ulint space;
ulint page_no;
- mtr_t mtr;
- mem_heap_t* heap = NULL;
- ulint offsets_[REC_OFFS_NORMAL_SIZE];
- ulint* offsets = offsets_;
- rec_offs_init(offsets_);
ut_ad(lock_mutex_own());
ut_a(lock_get_type_low(lock) == LOCK_REC);
@@ -4482,13 +4469,16 @@ lock_rec_print(FILE* file, const lock_t* lock)
fputs(" waiting", file);
}
- mtr_start(&mtr);
-
putc('\n', file);
- const buf_block_t* block;
+ mem_heap_t* heap = NULL;
+ ulint offsets_[REC_OFFS_NORMAL_SIZE];
+ ulint* offsets = offsets_;
+ rec_offs_init(offsets_);
- block = buf_page_try_get(page_id_t(space, page_no), &mtr);
+ mtr.start();
+ const buf_block_t* block = buf_page_try_get(page_id_t(space, page_no),
+ &mtr);
for (ulint i = 0; i < lock_rec_get_n_bits(lock); ++i) {
@@ -4517,9 +4507,9 @@ lock_rec_print(FILE* file, const lock_t* lock)
putc('\n', file);
}
- mtr_commit(&mtr);
+ mtr.commit();
- if (heap) {
+ if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
}
@@ -4622,11 +4612,10 @@ lock_print_info_summary(
/** Prints transaction lock wait and MVCC state.
@param[in,out] file file where to print
-@param[in] trx transaction */
+@param[in] trx transaction
+@param[in] now current time */
void
-lock_trx_print_wait_and_mvcc_state(
- FILE* file,
- const trx_t* trx)
+lock_trx_print_wait_and_mvcc_state(FILE* file, const trx_t* trx, time_t now)
{
fprintf(file, "---");
@@ -4646,10 +4635,11 @@ lock_trx_print_wait_and_mvcc_state(
fprintf(file,
"------- TRX HAS BEEN WAITING %lu SEC"
" FOR THIS LOCK TO BE GRANTED:\n",
- (ulong) difftime(ut_time(), trx->lock.wait_started));
+ (ulong) difftime(now, trx->lock.wait_started));
if (lock_get_type_low(trx->lock.wait_lock) == LOCK_REC) {
- lock_rec_print(file, trx->lock.wait_lock);
+ mtr_t mtr;
+ lock_rec_print(file, trx->lock.wait_lock, mtr);
} else {
lock_table_print(file, trx->lock.wait_lock);
}
@@ -4667,6 +4657,7 @@ lock_trx_print_locks(
FILE* file, /*!< in/out: File to write */
const trx_t* trx) /*!< in: current transaction */
{
+ mtr_t mtr;
uint32_t i= 0;
/* Iterate over the transaction's locks. */
for (lock_t *lock = UT_LIST_GET_FIRST(trx->lock.trx_locks);
@@ -4674,7 +4665,7 @@ lock_trx_print_locks(
lock = UT_LIST_GET_NEXT(trx_locks, lock)) {
if (lock_get_type_low(lock) == LOCK_REC) {
- lock_rec_print(file, lock);
+ lock_rec_print(file, lock, mtr);
} else {
ut_ad(lock_get_type_low(lock) & LOCK_TABLE);
@@ -4695,20 +4686,21 @@ lock_trx_print_locks(
/** Functor to display all transactions */
struct lock_print_info
{
- lock_print_info(FILE* file) : file(file) {}
+ lock_print_info(FILE* file, time_t now) : file(file), now(now) {}
void operator()(const trx_t* trx) const
{
ut_ad(mutex_own(&trx_sys.mutex));
if (trx == purge_sys.query->trx)
return;
- lock_trx_print_wait_and_mvcc_state(file, trx);
+ lock_trx_print_wait_and_mvcc_state(file, trx, now);
if (trx->will_lock && srv_print_innodb_lock_monitor)
lock_trx_print_locks(file, trx);
}
FILE* const file;
+ const time_t now;
};
/*********************************************************************//**
@@ -4723,9 +4715,10 @@ lock_print_info_all_transactions(
ut_ad(lock_mutex_own());
fprintf(file, "LIST OF TRANSACTIONS FOR EACH SESSION:\n");
+ const time_t now = time(NULL);
mutex_enter(&trx_sys.mutex);
- ut_list_map(trx_sys.trx_list, lock_print_info(file));
+ ut_list_map(trx_sys.trx_list, lock_print_info(file, now));
mutex_exit(&trx_sys.mutex);
lock_mutex_exit();
@@ -6642,10 +6635,11 @@ DeadlockChecker::print(const lock_t* lock)
ut_ad(lock_mutex_own());
if (lock_get_type_low(lock) == LOCK_REC) {
- lock_rec_print(lock_latest_err_file, lock);
+ mtr_t mtr;
+ lock_rec_print(lock_latest_err_file, lock, mtr);
if (srv_print_all_deadlocks) {
- lock_rec_print(stderr, lock);
+ lock_rec_print(stderr, lock, mtr);
}
} else {
lock_table_print(lock_latest_err_file, lock);
@@ -6940,7 +6934,7 @@ DeadlockChecker::search()
@param trx transaction rolled back
@param lock lock trx wants */
void
-DeadlockChecker::rollback_print(const trx_t* trx, const lock_t* lock)
+DeadlockChecker::rollback_print(const trx_t* trx, const lock_t* lock)
{
ut_ad(lock_mutex_own());
@@ -6985,16 +6979,17 @@ DeadlockChecker::trx_rollback()
trx_mutex_exit(trx);
}
-/** Checks if a joining lock request results in a deadlock. If a deadlock is
-found this function will resolve the deadlock by choosing a victim transaction
-and rolling it back. It will attempt to resolve all deadlocks. The returned
-transaction id will be the joining transaction instance or NULL if some other
-transaction was chosen as a victim and rolled back or no deadlock found.
+/** Check if a joining lock request results in a deadlock.
+If a deadlock is found, we will resolve the deadlock by
+choosing a victim transaction and rolling it back.
+We will attempt to resolve all deadlocks.
-@param[in] lock lock the transaction is requesting
-@param[in,out] trx transaction requesting the lock
+@param[in] lock the lock request
+@param[in,out] trx transaction requesting the lock
-@return transaction instanace chosen as victim or 0 */
+@return trx if it was chosen as victim
+@retval NULL if another victim was chosen,
+or there is no deadlock (any more) */
const trx_t*
DeadlockChecker::check_and_resolve(const lock_t* lock, trx_t* trx)
{
diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc
index ead9815ac02..94104172577 100644
--- a/storage/innobase/lock/lock0wait.cc
+++ b/storage/innobase/lock/lock0wait.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -58,7 +58,7 @@ lock_wait_table_print(void)
(ulong) slot->in_use,
(ulong) slot->suspended,
slot->wait_timeout,
- (ulong) difftime(ut_time(), slot->suspend_time));
+ (ulong) difftime(time(NULL), slot->suspend_time));
}
}
@@ -155,7 +155,7 @@ lock_wait_table_reserve_slot(
os_event_reset(slot->event);
slot->suspended = TRUE;
- slot->suspend_time = ut_time();
+ slot->suspend_time = time(NULL);
slot->wait_timeout = wait_timeout;
if (slot == lock_sys.last_slot) {
@@ -231,13 +231,8 @@ lock_wait_suspend_thread(
user OS thread */
{
srv_slot_t* slot;
- double wait_time;
trx_t* trx;
ibool was_declared_inside_innodb;
- int64_t start_time = 0;
- int64_t finish_time;
- ulint sec;
- ulint ms;
ulong lock_wait_timeout;
trx = thr_get_trx(thr);
@@ -283,15 +278,12 @@ lock_wait_suspend_thread(
lock_wait_mutex_exit();
trx_mutex_exit(trx);
+ ulonglong start_time = 0;
+
if (thr->lock_state == QUE_THR_LOCK_ROW) {
srv_stats.n_lock_wait_count.inc();
srv_stats.n_lock_wait_current_count++;
-
- if (ut_usectime(&sec, &ms) == -1) {
- start_time = -1;
- } else {
- start_time = int64_t(sec) * 1000000 + int64_t(ms);
- }
+ start_time = my_interval_timer();
}
ulint lock_type = ULINT_UNDEFINED;
@@ -371,28 +363,23 @@ lock_wait_suspend_thread(
row_mysql_freeze_data_dictionary(trx);
}
- wait_time = ut_difftime(ut_time(), slot->suspend_time);
+ double wait_time = difftime(time(NULL), slot->suspend_time);
/* Release the slot for others to use */
lock_wait_table_release_slot(slot);
if (thr->lock_state == QUE_THR_LOCK_ROW) {
- int64_t diff_time;
- if (start_time == -1 || ut_usectime(&sec, &ms) == -1) {
- finish_time = -1;
- diff_time = 0;
- } else {
- finish_time = int64_t(sec) * 1000000 + int64_t(ms);
- diff_time = std::max<int64_t>(
- 0, finish_time - start_time);
- srv_stats.n_lock_wait_time.add(diff_time);
+ const ulonglong finish_time = my_interval_timer();
+ if (finish_time >= start_time) {
+ const ulint diff_time = static_cast<ulint>
+ ((finish_time - start_time) / 1000);
+ srv_stats.n_lock_wait_time.add(diff_time);
/* Only update the variable if we successfully
retrieved the start and finish times. See Bug#36819. */
- if (ulint(diff_time) > lock_sys.n_lock_max_wait_time) {
- lock_sys.n_lock_max_wait_time
- = ulint(diff_time);
+ if (diff_time > lock_sys.n_lock_max_wait_time) {
+ lock_sys.n_lock_max_wait_time = diff_time;
}
/* Record the lock wait time for this thread */
thd_storage_lock_wait(trx->mysql_thd, diff_time);
@@ -468,19 +455,12 @@ lock_wait_check_and_cancel(
const srv_slot_t* slot) /*!< in: slot reserved by a user
thread when the wait started */
{
- trx_t* trx;
- double wait_time;
- ib_time_t suspend_time = slot->suspend_time;
-
ut_ad(lock_wait_mutex_own());
-
ut_ad(slot->in_use);
-
ut_ad(slot->suspended);
- wait_time = ut_difftime(ut_time(), suspend_time);
-
- trx = thr_get_trx(slot->thr);
+ double wait_time = difftime(time(NULL), slot->suspend_time);
+ trx_t* trx = thr_get_trx(slot->thr);
if (trx_is_interrupted(trx)
|| (slot->wait_timeout < 100000000
@@ -515,7 +495,6 @@ lock_wait_check_and_cancel(
trx_mutex_exit(trx);
}
-
}
/*********************************************************************//**
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index 5cb27a4a68c..52edbcf238f 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -60,7 +60,7 @@ Created 9/20/1997 Heikki Tuuri
/** Log records are stored in the hash table in chunks at most of this size;
this must be less than srv_page_size as it is stored in the buffer pool */
-#define RECV_DATA_BLOCK_SIZE (MEM_MAX_ALLOC_IN_BUF - sizeof(recv_data_t))
+#define RECV_DATA_BLOCK_SIZE (MEM_MAX_ALLOC_IN_BUF - sizeof(recv_data_t) - REDZONE_SIZE)
/** Read-ahead area in applying log records to file pages */
#define RECV_READ_AHEAD_AREA 32
@@ -864,7 +864,7 @@ void recv_sys_t::create()
addr_hash = hash_create(size / 512);
n_addrs = 0;
- progress_time = ut_time();
+ progress_time = time(NULL);
recv_max_page_lsn = 0;
memset(truncated_undo_spaces, 0, sizeof truncated_undo_spaces);
@@ -1006,7 +1006,7 @@ fail:
}
}
- if (recv_sys.report(ut_time())) {
+ if (recv_sys.report(time(NULL))) {
ib::info() << "Read redo log up to LSN=" << *start_lsn;
service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
"Read redo log up to LSN=" LSN_PF,
@@ -2079,7 +2079,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
mtr.discard_modifications();
mtr.commit();
- ib_time_t time = ut_time();
+ time_t now = time(NULL);
mutex_enter(&recv_sys.mutex);
@@ -2092,7 +2092,7 @@ static void recv_recover_page(buf_block_t* block, mtr_t& mtr,
ut_a(recv_sys.n_addrs > 0);
if (ulint n = --recv_sys.n_addrs) {
- if (recv_sys.report(time)) {
+ if (recv_sys.report(now)) {
ib::info() << "To recover: " << n << " pages from log";
service_manager_extend_timeout(
INNODB_EXTEND_TIMEOUT_INTERVAL, "To recover: " ULINTPF " pages from log", n);
diff --git a/storage/innobase/os/os0event.cc b/storage/innobase/os/os0event.cc
index d6dd137f692..0676ba5f6c1 100644
--- a/storage/innobase/os/os0event.cc
+++ b/storage/innobase/os/os0event.cc
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2013, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -25,13 +26,11 @@ Created 2012-09-23 Sunny Bains
#include "os0event.h"
#include "ut0mutex.h"
+#include <my_sys.h>
#ifdef _WIN32
#include <windows.h>
#include <synchapi.h>
-#endif /* _WIN32 */
-
-#ifdef _WIN32
/** Native condition variable. */
typedef CONDITION_VARIABLE os_cond_t;
#else
@@ -358,21 +357,9 @@ os_event::wait_time_low(
struct timespec abstime;
if (time_in_usec != OS_SYNC_INFINITE_TIME) {
- struct timeval tv;
- int ret;
- ulint sec;
- ulint usec;
-
- ret = ut_usectime(&sec, &usec);
- ut_a(ret == 0);
-
- tv.tv_sec = sec;
- tv.tv_usec = usec;
-
- tv.tv_usec += time_in_usec;
-
- abstime.tv_sec = tv.tv_sec + tv.tv_usec / 1000000;
- abstime.tv_nsec = tv.tv_usec % 1000000 * 1000;
+ ulonglong usec = ulonglong(time_in_usec) + my_hrtime().val;
+ abstime.tv_sec = usec / 1000000;
+ abstime.tv_nsec = (usec % 1000000) * 1000;
} else {
abstime.tv_nsec = 999999999;
abstime.tv_sec = (time_t) ULINT_MAX;
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 594e9f0aeb4..ceb6c69aec8 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -5885,7 +5885,7 @@ AIO::start(
os_aio_validate();
- os_last_printout = ut_time();
+ os_last_printout = time(NULL);
if (srv_use_native_aio) {
return(true);
@@ -6141,7 +6141,7 @@ AIO::reserve_slot(
}
slot->is_reserved = true;
- slot->reservation_time = ut_time();
+ slot->reservation_time = time(NULL);
slot->m1 = m1;
slot->m2 = m2;
slot->file = file;
@@ -6951,7 +6951,7 @@ private:
{
ulint age;
- age = (ulint) difftime(ut_time(), slot->reservation_time);
+ age = (ulint) difftime(time(NULL), slot->reservation_time);
if ((age >= 2 && age > m_oldest)
|| (age >= 2
@@ -7353,7 +7353,7 @@ os_aio_print(FILE* file)
AIO::print_all(file);
putc('\n', file);
- current_time = ut_time();
+ current_time = time(NULL);
time_elapsed = 0.001 + difftime(current_time, os_last_printout);
fprintf(file,
@@ -7419,7 +7419,7 @@ os_aio_refresh_stats()
os_bytes_read_since_printout = 0;
- os_last_printout = ut_time();
+ os_last_printout = time(NULL);
}
/** Checks that all slots in the system have been freed, that is, there are
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc
index 97a485810ec..ded90c1c4f8 100644
--- a/storage/innobase/page/page0cur.cc
+++ b/storage/innobase/page/page0cur.cc
@@ -41,7 +41,7 @@ number between 0 and 2^64-1 inclusive. The formula and the constants
being used are:
X[n+1] = (a * X[n] + c) mod m
where:
-X[0] = ut_time_us(NULL)
+X[0] = my_interval_timer()
a = 1103515245 (3^5 * 5 * 7 * 129749)
c = 12345 (3 * 5 * 823)
m = 18446744073709551616 (2^64)
@@ -54,12 +54,10 @@ page_cur_lcg_prng(void)
{
#define LCG_a 1103515245
#define LCG_c 12345
- static ib_uint64_t lcg_current = 0;
- static ibool initialized = FALSE;
+ static uint64_t lcg_current;
- if (!initialized) {
- lcg_current = (ib_uint64_t) ut_time_us(NULL);
- initialized = TRUE;
+ if (!lcg_current) {
+ lcg_current = my_interval_timer();
}
/* no need to "% 2^64" explicitly because lcg_current is
diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc
index c1bb2f2c37d..243f44ad118 100644
--- a/storage/innobase/page/page0zip.cc
+++ b/storage/innobase/page/page0zip.cc
@@ -1258,7 +1258,7 @@ page_zip_compress(
ulint n_blobs = 0;
byte* storage; /* storage of uncompressed
columns */
- uintmax_t usec = ut_time_us(NULL);
+ const ulonglong ns = my_interval_timer();
#ifdef PAGE_ZIP_COMPRESS_DBG
FILE* logfile = NULL;
#endif
@@ -1509,7 +1509,7 @@ err_exit:
dict_index_zip_failure(index);
}
- uintmax_t time_diff = ut_time_us(NULL) - usec;
+ const uint64_t time_diff = (my_interval_timer() - ns) / 1000;
page_zip_stat[page_zip->ssize - 1].compressed_usec
+= time_diff;
if (cmp_per_index_enabled) {
@@ -1575,7 +1575,7 @@ err_exit:
fclose(logfile);
}
#endif /* PAGE_ZIP_COMPRESS_DBG */
- uintmax_t time_diff = ut_time_us(NULL) - usec;
+ const uint64_t time_diff = (my_interval_timer() - ns) / 1000;
page_zip_stat[page_zip->ssize - 1].compressed_ok++;
page_zip_stat[page_zip->ssize - 1].compressed_usec += time_diff;
if (cmp_per_index_enabled) {
@@ -3202,13 +3202,13 @@ page_zip_decompress(
page header fields that should not change
after page creation */
{
- uintmax_t usec = ut_time_us(NULL);
+ const ulonglong ns = my_interval_timer();
if (!page_zip_decompress_low(page_zip, page, all)) {
return(FALSE);
}
- uintmax_t time_diff = ut_time_us(NULL) - usec;
+ const uint64_t time_diff = (my_interval_timer() - ns) / 1000;
page_zip_stat[page_zip->ssize - 1].decompressed++;
page_zip_stat[page_zip->ssize - 1].decompressed_usec += time_diff;
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc
index 8a7485e1064..e9076bfae50 100644
--- a/storage/innobase/row/row0ftsort.cc
+++ b/storage/innobase/row/row0ftsort.cc
@@ -159,25 +159,26 @@ row_merge_create_fts_sort_index(
return(new_index);
}
-/*********************************************************************//**
-Initialize FTS parallel sort structures.
-@return TRUE if all successful */
-ibool
+
+/** Initialize FTS parallel sort structures.
+@param[in] trx transaction
+@param[in,out] dup descriptor of FTS index being created
+@param[in,out] new_table table where indexes are created
+@param[in] opt_doc_id_size whether to use 4 bytes instead of 8 bytes
+ integer to store Doc ID during sort
+@param[in] old_zip_size page size of the old table during alter
+@param[out] psort parallel sort info to be instantiated
+@param[out] merge parallel merge info to be instantiated
+@return true if all successful */
+bool
row_fts_psort_info_init(
-/*====================*/
- trx_t* trx, /*!< in: transaction */
- row_merge_dup_t* dup, /*!< in,own: descriptor of
- FTS index being created */
- const dict_table_t* new_table,/*!< in: table on which indexes are
- created */
- ibool opt_doc_id_size,
- /*!< in: whether to use 4 bytes
- instead of 8 bytes integer to
- store Doc ID during sort */
- fts_psort_t** psort, /*!< out: parallel sort info to be
- instantiated */
- fts_psort_t** merge) /*!< out: parallel merge info
- to be instantiated */
+ trx_t* trx,
+ row_merge_dup_t*dup,
+ dict_table_t* new_table,
+ bool opt_doc_id_size,
+ ulint old_zip_size,
+ fts_psort_t** psort,
+ fts_psort_t** merge)
{
ulint i;
ulint j;
@@ -187,6 +188,7 @@ row_fts_psort_info_init(
ulint block_size;
ibool ret = TRUE;
bool encrypted = false;
+ ut_ad(ut_is_2pow(old_zip_size));
block_size = 3 * srv_sort_buf_size;
@@ -209,7 +211,8 @@ row_fts_psort_info_init(
}
common_info->dup = dup;
- common_info->new_table = (dict_table_t*) new_table;
+ common_info->new_table = new_table;
+ common_info->old_zip_size = old_zip_size;
common_info->trx = trx;
common_info->all_info = psort_info;
common_info->sort_event = os_event_create(0);
@@ -803,7 +806,7 @@ DECLARE_THREAD(fts_parallel_tokenization)(
block = psort_info->merge_block;
crypt_block = psort_info->crypt_block;
- const ulint zip_size = table->space->zip_size();
+ const ulint zip_size = psort_info->psort_common->old_zip_size;
row_merge_fts_get_next_doc_item(psort_info, &doc_item);
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index c965d51a6d1..bd894d06541 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -1430,7 +1430,8 @@ row_ins_foreign_check_on_constraint(
cascade->state = UPD_NODE_UPDATE_CLUSTERED;
#ifdef WITH_WSREP
- err = wsrep_append_foreign_key(trx, foreign, clust_rec, clust_index,
+ err = wsrep_append_foreign_key(trx, foreign, cascade->pcur->old_rec,
+ clust_index,
FALSE, WSREP_SERVICE_KEY_EXCLUSIVE);
if (err != DB_SUCCESS) {
fprintf(stderr,
@@ -1816,6 +1817,10 @@ row_ins_check_foreign_constraint(
&& wsrep_protocol_version < 4)
? WSREP_SERVICE_KEY_SHARED
: WSREP_SERVICE_KEY_REFERENCE);
+ if (err != DB_SUCCESS) {
+ fprintf(stderr,
+ "WSREP: foreign key append failed: %d\n", err);
+ }
#endif /* WITH_WSREP */
goto end_scan;
} else if (foreign->type != 0) {
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index e62a41e4275..55d3292b9e6 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -2567,6 +2567,7 @@ write_buffers:
BTR_SEARCH_LEAF, &pcur,
&mtr);
buf = row_merge_buf_empty(buf);
+ merge_buf[i] = buf;
/* Restart the outer loop on the
record. We did not insert it
into any index yet. */
@@ -2692,6 +2693,7 @@ write_buffers:
}
}
merge_buf[i] = row_merge_buf_empty(buf);
+ buf = merge_buf[i];
if (UNIV_LIKELY(row != NULL)) {
/* Try writing the record again, now
@@ -2869,8 +2871,7 @@ wait_again:
if (max_doc_id && err == DB_SUCCESS) {
/* Sync fts cache for other fts indexes to keep all
fts indexes consistent in sync_doc_id. */
- err = fts_sync_table(const_cast<dict_table_t*>(new_table),
- false, true, false);
+ err = fts_sync_table(const_cast<dict_table_t*>(new_table));
if (err == DB_SUCCESS) {
fts_update_next_doc_id(NULL, new_table, max_doc_id);
@@ -4682,6 +4683,7 @@ row_merge_build_indexes(
created */
if (!row_fts_psort_info_init(
trx, dup, new_table, opt_doc_id_size,
+ old_table->space->zip_size(),
&psort_info, &merge_info)) {
error = DB_CORRUPTION;
goto func_exit;
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 8e3c8ff8d28..c834fba9b13 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -3412,7 +3412,9 @@ row_drop_table_for_mysql(
calling btr_search_drop_page_hash_index() while we
hold the InnoDB dictionary lock, we will drop any
adaptive hash index entries upfront. */
- bool immune = is_temp_name
+ const bool immune = is_temp_name
+ || create_failed
+ || sqlcom == SQLCOM_CREATE_TABLE
|| strstr(table->name.m_name, "/FTS");
while (buf_LRU_drop_page_hash_for_tablespace(table)) {
diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc
index ac3c5af7d8e..f327dce121b 100644
--- a/storage/innobase/row/row0vers.cc
+++ b/storage/innobase/row/row0vers.cc
@@ -897,7 +897,8 @@ row_vers_old_has_index_entry(
ut_ad(mtr_memo_contains_page_flagged(mtr, rec, MTR_MEMO_PAGE_X_FIX
| MTR_MEMO_PAGE_S_FIX));
- ut_ad(!rw_lock_own(&(purge_sys.latch), RW_LOCK_S));
+ ut_ad(!rw_lock_own(&purge_sys.latch, RW_LOCK_S));
+ ut_ad(also_curr || !vcol_info);
clust_index = dict_table_get_first_index(index->table);
@@ -964,7 +965,7 @@ row_vers_old_has_index_entry(
entry = row_build_index_entry(
row, ext, index, heap);
if (entry && !dtuple_coll_cmp(ientry, entry)) {
- goto safe_to_purge;
+ goto unsafe_to_purge;
}
} else {
/* Build index entry out of row */
@@ -985,7 +986,7 @@ row_vers_old_has_index_entry(
clust_index, clust_offsets,
index, ientry, roll_ptr,
trx_id, NULL, &vrow, mtr)) {
- goto safe_to_purge;
+ goto unsafe_to_purge;
}
}
clust_offsets = rec_get_offsets(rec, clust_index, NULL,
@@ -1018,7 +1019,7 @@ row_vers_old_has_index_entry(
a different binary value in a char field, but the
collation identifies the old and new value anyway! */
if (entry && !dtuple_coll_cmp(ientry, entry)) {
-safe_to_purge:
+unsafe_to_purge:
mem_heap_free(heap);
if (v_heap) {
@@ -1058,7 +1059,6 @@ safe_to_purge:
if (!prev_version) {
/* Versions end here */
-unsafe_to_purge:
mem_heap_free(heap);
if (v_heap) {
@@ -1120,7 +1120,7 @@ unsafe_to_purge:
and new value anyway! */
if (entry && !dtuple_coll_cmp(ientry, entry)) {
- goto safe_to_purge;
+ goto unsafe_to_purge;
}
}
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 909b208b9d8..6df284b1f15 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1668,8 +1668,9 @@ DECLARE_THREAD(srv_monitor_thread)(void*)
pfs_register_thread(srv_monitor_thread_key);
#endif /* UNIV_PFS_THREAD */
- srv_last_monitor_time = ut_time();
- last_monitor_time = ut_time();
+ current_time = time(NULL);
+ srv_last_monitor_time = current_time;
+ last_monitor_time = current_time;
mutex_skipped = 0;
last_srv_print_monitor = srv_print_innodb_monitor;
loop:
@@ -1680,12 +1681,12 @@ loop:
os_event_wait_time_low(srv_monitor_event, 5000000, sig_count);
- current_time = ut_time();
+ current_time = time(NULL);
time_elapsed = difftime(current_time, last_monitor_time);
if (time_elapsed > 15) {
- last_monitor_time = ut_time();
+ last_monitor_time = current_time;
if (srv_print_innodb_monitor) {
/* Reset mutex_skipped counter everytime
@@ -2022,20 +2023,16 @@ static
void
srv_shutdown_print_master_pending(
/*==============================*/
- ib_time_t* last_print_time, /*!< last time the function
+ time_t* last_print_time, /*!< last time the function
print the message */
ulint n_tables_to_drop, /*!< number of tables to
be dropped */
ulint n_bytes_merged) /*!< number of change buffer
just merged */
{
- ib_time_t current_time;
- double time_elapsed;
-
- current_time = ut_time();
- time_elapsed = ut_difftime(current_time, *last_print_time);
+ time_t current_time = time(NULL);
- if (time_elapsed > 60) {
+ if (difftime(current_time, *last_print_time) > 60) {
*last_print_time = current_time;
if (n_tables_to_drop) {
@@ -2113,8 +2110,8 @@ void
srv_master_do_active_tasks(void)
/*============================*/
{
- ib_time_t cur_time = ut_time();
- uintmax_t counter_time = ut_time_us(NULL);
+ time_t cur_time = time(NULL);
+ ulonglong counter_time = microsecond_interval_timer();
/* First do the tasks that we are suppose to do at each
invocation of this function. */
@@ -2144,7 +2141,7 @@ srv_master_do_active_tasks(void)
/* Do an ibuf merge */
srv_main_thread_op_info = "doing insert buffer merge";
- counter_time = ut_time_us(NULL);
+ counter_time = microsecond_interval_timer();
ibuf_merge_in_background(false);
MONITOR_INC_TIME_IN_MICRO_SECS(
MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time);
@@ -2209,8 +2206,6 @@ void
srv_master_do_idle_tasks(void)
/*==========================*/
{
- uintmax_t counter_time;
-
++srv_main_idle_loops;
MONITOR_INC(MONITOR_MASTER_IDLE_LOOPS);
@@ -2219,7 +2214,7 @@ srv_master_do_idle_tasks(void)
/* ALTER TABLE in MySQL requires on Unix that the table handler
can drop tables lazily after there no longer are SELECT
queries to them. */
- counter_time = ut_time_us(NULL);
+ ulonglong counter_time = microsecond_interval_timer();
srv_main_thread_op_info = "doing background drop tables";
row_drop_tables_for_mysql_in_background();
MONITOR_INC_TIME_IN_MICRO_SECS(
@@ -2238,7 +2233,7 @@ srv_master_do_idle_tasks(void)
log_free_check();
/* Do an ibuf merge */
- counter_time = ut_time_us(NULL);
+ counter_time = microsecond_interval_timer();
srv_main_thread_op_info = "doing insert buffer merge";
ibuf_merge_in_background(true);
MONITOR_INC_TIME_IN_MICRO_SECS(
@@ -2291,7 +2286,7 @@ srv_shutdown(bool ibuf_merge)
{
ulint n_bytes_merged = 0;
ulint n_tables_to_drop;
- ib_time_t now = ut_time();
+ time_t now = time(NULL);
do {
ut_ad(!srv_read_only_mode);
@@ -2429,10 +2424,10 @@ static bool srv_purge_should_exit()
uint32_t history_size = trx_sys.rseg_history_len;
if (history_size) {
#if defined HAVE_SYSTEMD && !defined EMBEDDED_LIBRARY
- static ib_time_t progress_time;
- ib_time_t time = ut_time();
- if (time - progress_time >= 15) {
- progress_time = time;
+ static time_t progress_time;
+ time_t now = time(NULL);
+ if (now - progress_time >= 15) {
+ progress_time = now;
service_manager_extend_timeout(
INNODB_EXTEND_TIMEOUT_INTERVAL,
"InnoDB: to purge %u transactions",
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 985382c69a5..5783bb9ae66 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -47,7 +47,6 @@ Created 2/16/1996 Heikki Tuuri
#include "row0ftsort.h"
#include "ut0mem.h"
-#include "ut0timer.h"
#include "mem0mem.h"
#include "data0data.h"
#include "data0type.h"
diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc
index e6c2220765f..6e858254ad4 100644
--- a/storage/innobase/sync/sync0arr.cc
+++ b/storage/innobase/sync/sync0arr.cc
@@ -2,7 +2,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -119,8 +119,10 @@ struct sync_cell_t {
has not been signalled in the
period between the reset and
wait call. */
- time_t reservation_time;/*!< time when the thread reserved
- the wait cell */
+ /** time(NULL) when the wait cell was reserved.
+ FIXME: sync_array_print_long_waits_low() may display bogus
+ warnings when the system time is adjusted to the past! */
+ time_t reservation_time;
};
/* NOTE: It is allowed for a thread to wait for an event allocated for
@@ -375,7 +377,7 @@ sync_array_reserve_cell(
cell->thread_id = os_thread_get_curr_id();
- cell->reservation_time = ut_time();
+ cell->reservation_time = time(NULL);
/* Make sure the event is reset and also store the value of
signal_count at which the event was reset. */
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index 145af721366..a39fb5d2e95 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -140,9 +140,8 @@ struct i_s_table_cache_t {
struct trx_i_s_cache_t {
rw_lock_t rw_lock; /*!< read-write lock protecting
the rest of this structure */
- uintmax_t last_read; /*!< last time the cache was read;
- measured in microseconds since
- epoch */
+ ulonglong last_read; /*!< last time the cache was read;
+ measured in nanoseconds */
ib_mutex_t last_read_mutex;/*!< mutex protecting the
last_read member - it is updated
inside a shared lock of the
@@ -457,7 +456,7 @@ fill_trx_row(
ut_ad(lock_mutex_own());
row->trx_id = trx_get_id_for_print(trx);
- row->trx_started = (ib_time_t) trx->start_time;
+ row->trx_started = trx->start_time;
row->trx_state = trx_get_que_state_str(trx);
row->requested_lock_row = requested_lock_row;
ut_ad(requested_lock_row == NULL
@@ -466,7 +465,7 @@ fill_trx_row(
if (trx->lock.wait_lock != NULL) {
ut_a(requested_lock_row != NULL);
- row->trx_wait_started = (ib_time_t) trx->lock.wait_started;
+ row->trx_wait_started = trx->lock.wait_started;
} else {
ut_a(requested_lock_row == NULL);
row->trx_wait_started = 0;
@@ -1183,22 +1182,16 @@ add_trx_relevant_locks_to_cache(
}
/** The minimum time that a cache must not be updated after it has been
-read for the last time; measured in microseconds. We use this technique
+read for the last time; measured in nanoseconds. We use this technique
to ensure that SELECTs which join several INFORMATION SCHEMA tables read
the same version of the cache. */
-#define CACHE_MIN_IDLE_TIME_US 100000 /* 0.1 sec */
+#define CACHE_MIN_IDLE_TIME_NS 100000000 /* 0.1 sec */
/*******************************************************************//**
Checks if the cache can safely be updated.
-@return TRUE if can be updated */
-static
-ibool
-can_cache_be_updated(
-/*=================*/
- trx_i_s_cache_t* cache) /*!< in: cache */
+@return whether the cache can be updated */
+static bool can_cache_be_updated(trx_i_s_cache_t* cache)
{
- uintmax_t now;
-
/* Here we read cache->last_read without acquiring its mutex
because last_read is only updated when a shared rw lock on the
whole cache is being held (see trx_i_s_cache_end_read()) and
@@ -1208,13 +1201,7 @@ can_cache_be_updated(
ut_ad(rw_lock_own(&cache->rw_lock, RW_LOCK_X));
- now = ut_time_us(NULL);
- if (now - cache->last_read > CACHE_MIN_IDLE_TIME_US) {
-
- return(TRUE);
- }
-
- return(FALSE);
+ return my_interval_timer() - cache->last_read > CACHE_MIN_IDLE_TIME_NS;
}
/*******************************************************************//**
@@ -1314,8 +1301,7 @@ trx_i_s_possibly_fetch_data_into_cache(
lock_mutex_exit();
/* update cache last read time */
- time_t now = ut_time_us(NULL);
- cache->last_read = now;
+ cache->last_read = my_interval_timer();
return(0);
}
@@ -1405,12 +1391,10 @@ trx_i_s_cache_end_read(
/*===================*/
trx_i_s_cache_t* cache) /*!< in: cache */
{
- uintmax_t now;
-
ut_ad(rw_lock_own(&cache->rw_lock, RW_LOCK_S));
/* update cache last read time */
- now = ut_time_us(NULL);
+ const ulonglong now = my_interval_timer();
mutex_enter(&cache->last_read_mutex);
cache->last_read = now;
mutex_exit(&cache->last_read_mutex);
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index eeca6ef9286..db0e9c0758c 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -137,7 +137,8 @@ purge_graph_build()
trx_t* trx = trx_create();
ut_ad(!trx->id);
- trx->start_time = ut_time();
+ trx->start_time = time(NULL);
+ trx->start_time_micro = microsecond_interval_timer();
trx->state = TRX_STATE_ACTIVE;
trx->op_info = "purge trx";
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index 310e7982352..61f0ce57777 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -726,9 +726,9 @@ static my_bool trx_roll_count_callback(rw_trx_hash_element_t *element,
/** Report progress when rolling back a row of a recovered transaction. */
void trx_roll_report_progress()
{
- ib_time_t time = ut_time();
+ time_t now = time(NULL);
mutex_enter(&recv_sys.mutex);
- bool report = recv_sys.report(time);
+ bool report = recv_sys.report(now);
mutex_exit(&recv_sys.mutex);
if (report) {
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index c75d766a48b..ab67e09b992 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -610,7 +610,8 @@ trx_resurrect_table_locks(
*/
static void trx_resurrect(trx_undo_t *undo, trx_rseg_t *rseg,
- ib_time_t start_time, uint64_t *rows_to_undo,
+ time_t start_time, ulonglong start_time_micro,
+ uint64_t *rows_to_undo,
bool is_old_insert)
{
trx_state_t state;
@@ -662,6 +663,7 @@ static void trx_resurrect(trx_undo_t *undo, trx_rseg_t *rseg,
trx->id= undo->trx_id;
trx->is_recovered= true;
trx->start_time= start_time;
+ trx->start_time_micro= start_time_micro;
if (undo->dict_operation)
{
@@ -702,7 +704,8 @@ trx_lists_init_at_db_start()
/* Look from the rollback segments if there exist undo logs for
transactions. */
- const ib_time_t start_time = ut_time();
+ const time_t start_time = time(NULL);
+ const ulonglong start_time_micro= microsecond_interval_timer();
uint64_t rows_to_undo = 0;
for (ulint i = 0; i < TRX_SYS_N_RSEGS; ++i) {
@@ -721,8 +724,8 @@ trx_lists_init_at_db_start()
undo = UT_LIST_GET_FIRST(rseg->old_insert_list);
while (undo) {
trx_undo_t* next = UT_LIST_GET_NEXT(undo_list, undo);
- trx_resurrect(undo, rseg, start_time, &rows_to_undo,
- true);
+ trx_resurrect(undo, rseg, start_time, start_time_micro,
+ &rows_to_undo, true);
undo = next;
}
@@ -733,6 +736,7 @@ trx_lists_init_at_db_start()
trx_t *trx = trx_sys.find(0, undo->trx_id, false);
if (!trx) {
trx_resurrect(undo, rseg, start_time,
+ start_time_micro,
&rows_to_undo, false);
} else {
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE) ||
@@ -990,14 +994,10 @@ trx_start_low(
}
}
- if (trx->mysql_thd != NULL) {
- trx->start_time = thd_start_time_in_secs(trx->mysql_thd);
- trx->start_time_micro = thd_query_start_micro(trx->mysql_thd);
-
- } else {
- trx->start_time = ut_time();
- trx->start_time_micro = 0;
- }
+ trx->start_time = time(NULL);
+ trx->start_time_micro = trx->mysql_thd
+ ? thd_query_start_micro(trx->mysql_thd)
+ : microsecond_interval_timer();
ut_a(trx->error_state == DB_SUCCESS);
@@ -1232,7 +1232,7 @@ trx_update_mod_tables_timestamp(
{
/* consider using trx->start_time if calling time() is too
expensive here */
- time_t now = ut_time();
+ const time_t now = time(NULL);
trx_mod_tables_t::const_iterator end = trx->mod_tables.end();
diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc
index bbc519ad92b..5ccd15dd5ca 100644
--- a/storage/innobase/ut/ut0crc32.cc
+++ b/storage/innobase/ut/ut0crc32.cc
@@ -539,23 +539,6 @@ ut_crc32_init()
ut_cpuid(vend, &model, &family, &stepping,
&features_ecx, &features_edx);
- /* Valgrind does not understand the CRC32 instructions:
-
- vex amd64->IR: unhandled instruction bytes: 0xF2 0x48 0xF 0x38 0xF0 0xA
- valgrind: Unrecognised instruction at address 0xad3db5.
- Your program just tried to execute an instruction that Valgrind
- did not recognise. There are two possible reasons for this.
- 1. Your program has a bug and erroneously jumped to a non-code
- location. If you are running Memcheck and you just saw a
- warning about a bad jump, it's probably your program's fault.
- 2. The instruction is legitimate but Valgrind doesn't handle it,
- i.e. it's Valgrind's fault. If you think this is the case or
- you are not sure, please let us know and we'll try to fix it.
- Either way, Valgrind will now raise a SIGILL signal which will
- probably kill your program.
-
- */
-
if (features_ecx & 1 << 20) {
ut_crc32 = ut_crc32_hw;
ut_crc32_implementation = "Using SSE2 crc32 instructions";
diff --git a/storage/innobase/ut/ut0timer.cc b/storage/innobase/ut/ut0timer.cc
deleted file mode 100644
index 9aefcafebc6..00000000000
--- a/storage/innobase/ut/ut0timer.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
-
-Copyright (c) 2013, 2014, Facebook, Inc. All Rights Reserved.
-Copyright (c) 2014, SkySQL Ab. 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-1335 USA
-
-*****************************************************************************/
-
-/********************************************************************//**
-@file ut/ut0timer.cc
-Timer rountines
-
-Created 30/07/2014 Jan Lindström jan.lindstrom@skysql.com
-modified from https://github.com/facebook/mysql-5.6/commit/c75a413edeb96eb99bf11d7269bdfea06f96d6b6
-*************************************************************************/
-
-#include "data0type.h"
-#include <my_rdtsc.h>
-#include <ut0timer.h>
-
-/**************************************************************//**
-Initial timer definition
-@return 0 */
-static
-ulonglong
-ut_timer_none(void)
-/*===============*/
-{
- return 0;
-}
-
-/**************************************************************//**
-Function pointer to point selected timer function.
-@return timer current value */
-ulonglong (*ut_timer_now)(void) = &ut_timer_none;
-
-struct my_timer_unit_info ut_timer;
-extern MYSQL_PLUGIN_IMPORT MY_TIMER_INFO sys_timer_info;
-
-/**************************************************************//**
-Sets up the data required for use of my_timer_* functions.
-Selects the best timer by high frequency, and tight resolution.
-Points my_timer_now() to the selected timer function.
-Initializes my_timer struct to contain the info for selected timer.*/
-UNIV_INTERN
-void
-ut_init_timer(void)
-/*===============*/
-{
- if (sys_timer_info.cycles.frequency > 1000000 &&
- sys_timer_info.cycles.resolution == 1) {
- ut_timer = sys_timer_info.cycles;
- ut_timer_now = &my_timer_cycles;
- } else if (sys_timer_info.nanoseconds.frequency > 1000000 &&
- sys_timer_info.nanoseconds.resolution == 1) {
- ut_timer = sys_timer_info.nanoseconds;
- ut_timer_now = &my_timer_nanoseconds;
- } else if (sys_timer_info.microseconds.frequency >= 1000000 &&
- sys_timer_info.microseconds.resolution == 1) {
- ut_timer = sys_timer_info.microseconds;
- ut_timer_now = &my_timer_microseconds;
-
- } else if (sys_timer_info.milliseconds.frequency >= 1000 &&
- sys_timer_info.milliseconds.resolution == 1) {
- ut_timer = sys_timer_info.milliseconds;
- ut_timer_now = &my_timer_milliseconds;
- } else if (sys_timer_info.ticks.frequency >= 1000 &&
- /* Will probably be false */
- sys_timer_info.ticks.resolution == 1) {
- ut_timer = sys_timer_info.ticks;
- ut_timer_now = &my_timer_ticks;
- } else {
- /* None are acceptable, so leave it as "None", and fill in struct */
- ut_timer.frequency = 1; /* Avoid div-by-zero */
- ut_timer.overhead = 0; /* Since it doesn't do anything */
- ut_timer.resolution = 10; /* Another sign it's bad */
- ut_timer.routine = 0; /* None */
- }
-}
diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc
index 4265e23334b..5c19fcb6825 100644
--- a/storage/innobase/ut/ut0ut.cc
+++ b/storage/innobase/ut/ut0ut.cc
@@ -39,136 +39,6 @@ Created 5/11/1994 Heikki Tuuri
#include "log.h"
#include "my_cpu.h"
-#ifdef _WIN32
-typedef VOID(WINAPI *time_fn)(LPFILETIME);
-static time_fn ut_get_system_time_as_file_time = GetSystemTimeAsFileTime;
-
-/*****************************************************************//**
-NOTE: The Windows epoch starts from 1601/01/01 whereas the Unix
-epoch starts from 1970/1/1. For selection of constant see:
-http://support.microsoft.com/kb/167296/ */
-#define WIN_TO_UNIX_DELTA_USEC 11644473600000000LL
-
-
-/*****************************************************************//**
-This is the Windows version of gettimeofday(2).
-@return 0 if all OK else -1 */
-static
-int
-ut_gettimeofday(
-/*============*/
- struct timeval* tv, /*!< out: Values are relative to Unix epoch */
- void* tz) /*!< in: not used */
-{
- FILETIME ft;
- int64_t tm;
-
- if (!tv) {
- errno = EINVAL;
- return(-1);
- }
-
- ut_get_system_time_as_file_time(&ft);
-
- tm = (int64_t) ft.dwHighDateTime << 32;
- tm |= ft.dwLowDateTime;
-
- ut_a(tm >= 0); /* If tm wraps over to negative, the quotient / 10
- does not work */
-
- tm /= 10; /* Convert from 100 nsec periods to usec */
-
- /* If we don't convert to the Unix epoch the value for
- struct timeval::tv_sec will overflow.*/
- tm -= WIN_TO_UNIX_DELTA_USEC;
-
- tv->tv_sec = (long) (tm / 1000000L);
- tv->tv_usec = (long) (tm % 1000000L);
-
- return(0);
-}
-#else
-/** An alias for gettimeofday(2). On Microsoft Windows, we have to
-reimplement this function. */
-#define ut_gettimeofday gettimeofday
-#endif
-
-/**********************************************************//**
-Returns system time. We do not specify the format of the time returned:
-the only way to manipulate it is to use the function ut_difftime.
-@return system time */
-ib_time_t
-ut_time(void)
-/*=========*/
-{
- return(time(NULL));
-}
-
-
-/**********************************************************//**
-Returns system time.
-Upon successful completion, the value 0 is returned; otherwise the
-value -1 is returned and the global variable errno is set to indicate the
-error.
-@return 0 on success, -1 otherwise */
-int
-ut_usectime(
-/*========*/
- ulint* sec, /*!< out: seconds since the Epoch */
- ulint* ms) /*!< out: microseconds since the Epoch+*sec */
-{
- struct timeval tv;
- int ret;
- int errno_gettimeofday;
- int i;
-
- for (i = 0; i < 10; i++) {
-
- ret = ut_gettimeofday(&tv, NULL);
-
- if (ret == -1) {
- errno_gettimeofday = errno;
- ib::error() << "gettimeofday(): "
- << strerror(errno_gettimeofday);
- os_thread_sleep(100000); /* 0.1 sec */
- errno = errno_gettimeofday;
- } else {
- break;
- }
- }
-
- if (ret != -1) {
- *sec = (ulint) tv.tv_sec;
- *ms = (ulint) tv.tv_usec;
- }
-
- return(ret);
-}
-
-/**********************************************************//**
-Returns the number of microseconds since epoch. Similar to
-time(3), the return value is also stored in *tloc, provided
-that tloc is non-NULL.
-@return us since epoch */
-uintmax_t
-ut_time_us(
-/*=======*/
- uintmax_t* tloc) /*!< out: us since epoch, if non-NULL */
-{
- struct timeval tv;
- uintmax_t us;
-
- ut_gettimeofday(&tv, NULL);
-
- us = uintmax_t(tv.tv_sec) * 1000000 + uintmax_t(tv.tv_usec);
-
- if (tloc != NULL) {
- *tloc = us;
- }
-
- return(us);
-}
-
/**********************************************************//**
Returns the number of milliseconds since some epoch. The
value may wrap around. It should only be used for heuristic
@@ -178,25 +48,8 @@ ulint
ut_time_ms(void)
/*============*/
{
- struct timeval tv;
-
- ut_gettimeofday(&tv, NULL);
-
- return(ulint(tv.tv_sec) * 1000 + ulint(tv.tv_usec / 1000));
-}
-
-/**********************************************************//**
-Returns the difference of two times in seconds.
-@return time2 - time1 expressed in seconds */
-double
-ut_difftime(
-/*========*/
- ib_time_t time2, /*!< in: time */
- ib_time_t time1) /*!< in: time */
-{
- return(difftime(time2, time1));
+ return static_cast<ulint>(my_interval_timer() / 1000000);
}
-
#endif /* !UNIV_INNOCHECKSUM */
/**********************************************************//**
diff --git a/storage/innobase/ut/ut0wqueue.cc b/storage/innobase/ut/ut0wqueue.cc
index 4697aa2fc46..026431695ed 100644
--- a/storage/innobase/ut/ut0wqueue.cc
+++ b/storage/innobase/ut/ut0wqueue.cc
@@ -135,7 +135,7 @@ ib_wqueue_timedwait(
/*================*/
/* out: work item or NULL on timeout*/
ib_wqueue_t* wq, /* in: work queue */
- ib_time_t wait_in_usecs) /* in: wait time in micro seconds */
+ ulint wait_in_usecs) /* in: wait time in micro seconds */
{
ib_list_node_t* node = NULL;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index 496f6006aa1..3edd642462f 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -356,10 +356,12 @@ static PSI_file_info all_aria_files[]=
{ &key_file_control, "control", PSI_FLAG_GLOBAL}
};
+# ifdef HAVE_PSI_STAGE_INTERFACE
static PSI_stage_info *all_aria_stages[]=
{
& stage_waiting_for_a_resource
};
+# endif /* HAVE_PSI_STAGE_INTERFACE */
static void init_aria_psi_keys(void)
{
@@ -380,9 +382,10 @@ static void init_aria_psi_keys(void)
count= array_elements(all_aria_files);
mysql_file_register(category, all_aria_files, count);
-
+# ifdef HAVE_PSI_STAGE_INTERFACE
count= array_elements(all_aria_stages);
mysql_stage_register(category, all_aria_stages, count);
+# endif /* HAVE_PSI_STAGE_INTERFACE */
}
#else
#define init_aria_psi_keys() /* no-op */
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 984ee5b4920..ba29fc6bba3 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -7550,7 +7550,7 @@ void _ma_print_block_info(MARIA_SHARE *share, uchar *buff)
{
LSN lsn= lsn_korr(buff);
- printf("LSN:" LSN_FMT " type: %u dir_entries: %u dir_free: %u empty_space: %u\n",
+ printf("LSN: " LSN_FMT " type: %u dir_entries: %u dir_free: %u empty_space: %u\n",
LSN_IN_PARTS(lsn),
(uint)buff[PAGE_TYPE_OFFSET],
(uint)buff[DIR_COUNT_OFFSET],
diff --git a/storage/maria/ma_checkpoint.c b/storage/maria/ma_checkpoint.c
index 5d6b66e752c..e525602f7a1 100644
--- a/storage/maria/ma_checkpoint.c
+++ b/storage/maria/ma_checkpoint.c
@@ -170,7 +170,7 @@ static int really_execute_checkpoint(void)
"Horizon" is a lower bound of the LSN of the next log record.
*/
checkpoint_start_log_horizon= translog_get_horizon();
- DBUG_PRINT("info",("checkpoint_start_log_horizon " LSN_FMT,
+ DBUG_PRINT("info",("checkpoint_start_log_horizon " LSN_FMT "",
LSN_IN_PARTS(checkpoint_start_log_horizon)));
lsn_store(checkpoint_start_log_horizon_char, checkpoint_start_log_horizon);
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index d0fb480d955..8f3c9d4bfac 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -3859,7 +3859,14 @@ my_bool translog_init_with_table(const char *directory,
my_bool pageok;
DBUG_PRINT("info", ("The log is really present"));
- DBUG_ASSERT(sure_page <= last_page);
+ if (sure_page > last_page)
+ {
+ my_printf_error(HA_ERR_GENERIC, "Aria engine: log data error\n"
+ "last_log_page: " LSN_FMT " is less than\n"
+ "checkpoint page: " LSN_FMT, MYF(0),
+ LSN_IN_PARTS(last_page), LSN_IN_PARTS(sure_page));
+ goto err;
+ }
/* TODO: check page size */
@@ -4007,7 +4014,7 @@ my_bool translog_init_with_table(const char *directory,
if (!logs_found)
{
TRANSLOG_FILE *file= (TRANSLOG_FILE*)my_malloc(sizeof(TRANSLOG_FILE),
- MYF(0));
+ MYF(MY_WME));
DBUG_PRINT("info", ("The log is not found => we will create new log"));
if (file == NULL)
goto err;
@@ -5329,7 +5336,7 @@ static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst)
{
uint64 diff;
DBUG_ENTER("translog_put_LSN_diff");
- DBUG_PRINT("enter", ("Base: " LSN_FMT " val: " LSN_FMT " dst:%p",
+ DBUG_PRINT("enter", ("Base: " LSN_FMT " val: " LSN_FMT " dst: %p",
LSN_IN_PARTS(base_lsn), LSN_IN_PARTS(lsn),
dst));
DBUG_ASSERT(base_lsn > lsn);
@@ -5375,7 +5382,7 @@ static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst)
dst[1]= 1;
lsn_store(dst + 2, lsn);
}
- DBUG_PRINT("info", ("new dst:%p", dst));
+ DBUG_PRINT("info", ("new dst: %p", dst));
DBUG_RETURN(dst);
}
@@ -7994,7 +8001,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
{
struct st_translog_buffer *buffer= log_descriptor.buffers + i;
translog_buffer_lock(buffer);
- DBUG_PRINT("info", ("Check buffer:%p #: %u "
+ DBUG_PRINT("info", ("Check buffer: %p #: %u "
"prev last LSN: " LSN_FMT " "
"last LSN: " LSN_FMT " status: %s",
buffer,
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index 6e660a87bf4..05aca8f37e1 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -1384,7 +1384,7 @@ uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite)
is too new). Recovery does it by itself.
*/
share->state.is_of_horizon= translog_get_horizon();
- DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT,
+ DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT "",
LSN_IN_PARTS(share->state.is_of_horizon)));
}
res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite);
diff --git a/storage/maria/ma_recovery.c b/storage/maria/ma_recovery.c
index 4806a9feb20..59e5ae47519 100644
--- a/storage/maria/ma_recovery.c
+++ b/storage/maria/ma_recovery.c
@@ -538,8 +538,6 @@ end:
if (error && !abort_message_printed)
{
- if (!trace_file)
- fputc('\n', stderr);
my_message(HA_ERR_INITIALIZATION,
"Aria recovery failed. Please run aria_chk -r on all Aria "
"tables and delete all aria_log.######## files", MYF(0));
@@ -674,13 +672,16 @@ prototype_redo_exec_hook(INCOMPLETE_LOG)
{
MARIA_HA *info;
+ /* We try to get table first, so that we get the table in in the trace log */
+ info= get_MARIA_HA_from_REDO_record(rec);
+
if (skip_DDLs)
{
tprint(tracef, "we skip DDLs\n");
return 0;
}
- if ((info= get_MARIA_HA_from_REDO_record(rec)) == NULL)
+ if (!info)
{
/* no such table, don't need to warn */
return 0;
@@ -1151,6 +1152,9 @@ prototype_redo_exec_hook(REDO_REPAIR_TABLE)
my_bool quick_repair;
DBUG_ENTER("exec_REDO_LOGREC_REDO_REPAIR_TABLE");
+ /* We try to get table first, so that we get the table in in the trace log */
+ info= get_MARIA_HA_from_REDO_record(rec);
+
if (skip_DDLs)
{
/*
@@ -1160,8 +1164,13 @@ prototype_redo_exec_hook(REDO_REPAIR_TABLE)
tprint(tracef, "we skip DDLs\n");
DBUG_RETURN(0);
}
- if ((info= get_MARIA_HA_from_REDO_record(rec)) == NULL)
- DBUG_RETURN(0);
+
+ if (!info)
+ {
+ /* no such table, don't need to warn */
+ return 0;
+ }
+
if (maria_is_crashed(info))
{
tprint(tracef, "we skip repairing crashed table\n");
@@ -1463,17 +1472,21 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
}
if (share->state.state.data_file_length != dfile_len)
{
- tprint(tracef, ", has wrong state.data_file_length (fixing it)");
+ tprint(tracef, ", has wrong state.data_file_length "
+ "(fixing it from %llu to %llu)",
+ (ulonglong) share->state.state.data_file_length, (ulonglong) dfile_len);
share->state.state.data_file_length= dfile_len;
}
if (share->state.state.key_file_length != kfile_len)
{
- tprint(tracef, ", has wrong state.key_file_length (fixing it)");
+ tprint(tracef, ", has wrong state.key_file_length "
+ "(fixing it from %llu to %llu)",
+ (ulonglong) share->state.state.key_file_length, (ulonglong) kfile_len);
share->state.state.key_file_length= kfile_len;
}
if ((dfile_len % share->block_size) || (kfile_len % share->block_size))
{
- tprint(tracef, ", has too short last page\n");
+ tprint(tracef, ", has too short last page");
/* Recovery will fix this, no error */
ALERT_USER();
}
@@ -2784,7 +2797,7 @@ static int run_redo_phase(LSN lsn, LSN lsn_end, enum maria_apply_log_way apply)
{
fprintf(stderr, " 100%%");
fflush(stderr);
- procent_printed= 1;
+ procent_printed= 1; /* Will be follwed by time */
}
DBUG_RETURN(0);
@@ -2934,7 +2947,6 @@ static int run_undo_phase(uint uncommitted)
recovery_message_printed= REC_MSG_UNDO;
}
tprint(tracef, "%u transactions will be rolled back\n", uncommitted);
- procent_printed= 1;
for( ; ; )
{
char llbuf[22];
@@ -2987,7 +2999,6 @@ static int run_undo_phase(uint uncommitted)
/* In the future, we want to have this phase *online* */
}
}
- procent_printed= 0;
DBUG_RETURN(0);
}
@@ -3487,6 +3498,11 @@ static int close_all_tables(void)
}
}
end:
+ if (recovery_message_printed == REC_MSG_FLUSH)
+ {
+ fputc('\n', stderr);
+ fflush(stderr);
+ }
mysql_mutex_unlock(&THR_LOCK_maria);
DBUG_RETURN(error);
}
diff --git a/storage/maria/ma_recovery_util.c b/storage/maria/ma_recovery_util.c
index 54d7420c96e..3b617f625f0 100644
--- a/storage/maria/ma_recovery_util.c
+++ b/storage/maria/ma_recovery_util.c
@@ -70,14 +70,7 @@ void tprint(FILE *trace_file __attribute__ ((unused)),
#endif
va_start(args, format);
if (trace_file != NULL)
- {
- if (procent_printed)
- {
- procent_printed= 0;
- fputc('\n', trace_file);
- }
vfprintf(trace_file, format, args);
- }
va_end(args);
}
@@ -93,9 +86,10 @@ void eprint(FILE *trace_file __attribute__ ((unused)),
if (procent_printed)
{
- /* In silent mode, print on another line than the 0% 10% 20% line */
procent_printed= 0;
- fputc('\n', trace_file);
+ /* In silent mode, print on another line than the 0% 10% 20% line */
+ fputc('\n', stderr);
+ fflush(stderr);
}
vfprintf(trace_file , format, args);
fputc('\n', trace_file);
diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp
index 9b545450185..348b5bdc1b3 100644
--- a/storage/mroonga/ha_mroonga.hpp
+++ b/storage/mroonga/ha_mroonga.hpp
@@ -407,11 +407,11 @@ public:
ha_mroonga(handlerton *hton, TABLE_SHARE *share_arg);
~ha_mroonga();
const char *table_type() const; // required
- const char *index_type(uint inx);
+ const char *index_type(uint inx) mrn_override;
const char **bas_ext() const; // required
- ulonglong table_flags() const; // required
- ulong index_flags(uint idx, uint part, bool all_parts) const; // required
+ ulonglong table_flags() const mrn_override; // required
+ ulong index_flags(uint idx, uint part, bool all_parts) const mrn_override; // required
// required
int create(const char *name, TABLE *form, HA_CREATE_INFO *info
@@ -430,40 +430,40 @@ public:
#ifndef MRN_HANDLER_HAVE_HA_CLOSE
int close(); // required
#endif
- int info(uint flag); // required
+ int info(uint flag) mrn_override; // required
- uint lock_count() const;
+ uint lock_count() const mrn_override;
THR_LOCK_DATA **store_lock(THD *thd, // required
THR_LOCK_DATA **to,
- enum thr_lock_type lock_type);
- int external_lock(THD *thd, int lock_type);
+ enum thr_lock_type lock_type) mrn_override;
+ int external_lock(THD *thd, int lock_type) mrn_override;
- int rnd_init(bool scan); // required
- int rnd_end();
+ int rnd_init(bool scan) mrn_override; // required
+ int rnd_end() mrn_override;
#ifndef MRN_HANDLER_HAVE_HA_RND_NEXT
int rnd_next(uchar *buf); // required
#endif
#ifndef MRN_HANDLER_HAVE_HA_RND_POS
int rnd_pos(uchar *buf, uchar *pos); // required
#endif
- void position(const uchar *record); // required
- int extra(enum ha_extra_function operation);
- int extra_opt(enum ha_extra_function operation, ulong cache_size);
+ void position(const uchar *record) mrn_override; // required
+ int extra(enum ha_extra_function operation) mrn_override;
+ int extra_opt(enum ha_extra_function operation, ulong cache_size) mrn_override;
- int delete_table(const char *name);
- int write_row(const uchar *buf);
- int update_row(const uchar *old_data, const uchar *new_data);
- int delete_row(const uchar *buf);
+ int delete_table(const char *name) mrn_override;
+ int write_row(const uchar *buf) mrn_override;
+ int update_row(const uchar *old_data, const uchar *new_data) mrn_override;
+ int delete_row(const uchar *buf) mrn_override;
- uint max_supported_record_length() const;
- uint max_supported_keys() const;
- uint max_supported_key_parts() const;
- uint max_supported_key_length() const;
- uint max_supported_key_part_length() const;
+ uint max_supported_record_length() const mrn_override;
+ uint max_supported_keys() const mrn_override;
+ uint max_supported_key_parts() const mrn_override;
+ uint max_supported_key_length() const mrn_override;
+ uint max_supported_key_part_length() const mrn_override;
- ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
- int index_init(uint idx, bool sorted);
- int index_end();
+ ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key) mrn_override;
+ int index_init(uint idx, bool sorted) mrn_override;
+ int index_end() mrn_override;
#ifndef MRN_HANDLER_HAVE_HA_INDEX_READ_MAP
int index_read_map(uchar * buf, const uchar * key,
key_part_map keypart_map,
@@ -485,35 +485,35 @@ public:
#ifndef MRN_HANDLER_HAVE_HA_INDEX_LAST
int index_last(uchar *buf);
#endif
- int index_next_same(uchar *buf, const uchar *key, uint keylen);
+ int index_next_same(uchar *buf, const uchar *key, uint keylen) mrn_override;
- int ft_init();
- FT_INFO *ft_init_ext(uint flags, uint inx, String *key);
- int ft_read(uchar *buf);
+ int ft_init() mrn_override;
+ FT_INFO *ft_init_ext(uint flags, uint inx, String *key) mrn_override;
+ int ft_read(uchar *buf) mrn_override;
- const Item *cond_push(const Item *cond);
- void cond_pop();
+ const Item *cond_push(const Item *cond) mrn_override;
+ void cond_pop() mrn_override;
- bool get_error_message(int error, String *buf);
+ bool get_error_message(int error, String *buf) mrn_override;
- int reset();
+ int reset() mrn_override;
- handler *clone(const char *name, MEM_ROOT *mem_root);
- uint8 table_cache_type();
+ handler *clone(const char *name, MEM_ROOT *mem_root) mrn_override;
+ uint8 table_cache_type() mrn_override;
#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ
ha_rows multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
void *seq_init_param,
uint n_ranges, uint *bufsz,
- uint *flags, Cost_estimate *cost);
+ uint *flags, Cost_estimate *cost) mrn_override;
ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
#ifdef MRN_HANDLER_HAVE_MULTI_RANGE_READ_INFO_KEY_PARTS
uint key_parts,
#endif
- uint *bufsz, uint *flags, Cost_estimate *cost);
+ uint *bufsz, uint *flags, Cost_estimate *cost) mrn_override;
int multi_range_read_init(RANGE_SEQ_IF *seq, void *seq_init_param,
uint n_ranges, uint mode,
- HANDLER_BUFFER *buf);
- int multi_range_read_next(range_id_t *range_info);
+ HANDLER_BUFFER *buf) mrn_override;
+ int multi_range_read_next(range_id_t *range_info) mrn_override;
#else // MRN_HANDLER_HAVE_MULTI_RANGE_READ
int read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
KEY_MULTI_RANGE *ranges,
@@ -523,38 +523,38 @@ public:
int read_multi_range_next(KEY_MULTI_RANGE **found_range_p);
#endif // MRN_HANDLER_HAVE_MULTI_RANGE_READ
#ifdef MRN_HANDLER_START_BULK_INSERT_HAS_FLAGS
- void start_bulk_insert(ha_rows rows, uint flags);
+ void start_bulk_insert(ha_rows rows, uint flags) mrn_override;
#else
void start_bulk_insert(ha_rows rows);
#endif
- int end_bulk_insert();
- int delete_all_rows();
- int truncate();
- double scan_time();
- double read_time(uint index, uint ranges, ha_rows rows);
+ int end_bulk_insert() mrn_override;
+ int delete_all_rows() mrn_override;
+ int truncate() mrn_override;
+ double scan_time() mrn_override;
+ double read_time(uint index, uint ranges, ha_rows rows) mrn_override;
#ifdef MRN_HANDLER_HAVE_KEYS_TO_USE_FOR_SCANNING
- const key_map *keys_to_use_for_scanning();
+ const key_map *keys_to_use_for_scanning() mrn_override;
#endif
- ha_rows estimate_rows_upper_bound();
- void update_create_info(HA_CREATE_INFO* create_info);
- int rename_table(const char *from, const char *to);
- bool is_crashed() const;
- bool auto_repair(int error) const;
+ ha_rows estimate_rows_upper_bound() mrn_override;
+ void update_create_info(HA_CREATE_INFO* create_info) mrn_override;
+ int rename_table(const char *from, const char *to) mrn_override;
+ bool is_crashed() const mrn_override;
+ bool auto_repair(int error) const mrn_override;
bool auto_repair() const;
- int disable_indexes(uint mode);
- int enable_indexes(uint mode);
- int check(THD* thd, HA_CHECK_OPT* check_opt);
- int repair(THD* thd, HA_CHECK_OPT* check_opt);
- bool check_and_repair(THD *thd);
- int analyze(THD* thd, HA_CHECK_OPT* check_opt);
- int optimize(THD* thd, HA_CHECK_OPT* check_opt);
- bool is_fatal_error(int error_num, uint flags=0);
+ int disable_indexes(uint mode) mrn_override;
+ int enable_indexes(uint mode) mrn_override;
+ int check(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
+ int repair(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
+ bool check_and_repair(THD *thd) mrn_override;
+ int analyze(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
+ int optimize(THD* thd, HA_CHECK_OPT* check_opt) mrn_override;
+ bool is_fatal_error(int error_num, uint flags=0) mrn_override;
bool check_if_incompatible_data(HA_CREATE_INFO *create_info,
- uint table_changes);
+ uint table_changes) mrn_override;
#ifdef MRN_HANDLER_HAVE_CHECK_IF_SUPPORTED_INPLACE_ALTER
enum_alter_inplace_result
check_if_supported_inplace_alter(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
+ Alter_inplace_info *ha_alter_info) mrn_override;
#else
alter_table_operations alter_table_flags(alter_table_operations flags);
# ifdef MRN_HANDLER_HAVE_FINAL_ADD_INDEX
@@ -570,78 +570,78 @@ public:
int update_auto_increment();
void set_next_insert_id(ulonglong id);
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values,
- ulonglong *first_value, ulonglong *nb_reserved_values);
+ ulonglong *first_value, ulonglong *nb_reserved_values) mrn_override;
void restore_auto_increment(ulonglong prev_insert_id);
- void release_auto_increment();
- int check_for_upgrade(HA_CHECK_OPT *check_opt);
+ void release_auto_increment() mrn_override;
+ int check_for_upgrade(HA_CHECK_OPT *check_opt) mrn_override;
#ifdef MRN_HANDLER_HAVE_RESET_AUTO_INCREMENT
- int reset_auto_increment(ulonglong value);
+ int reset_auto_increment(ulonglong value) mrn_override;
#endif
- bool was_semi_consistent_read();
- void try_semi_consistent_read(bool yes);
- void unlock_row();
- int start_stmt(THD *thd, thr_lock_type lock_type);
+ bool was_semi_consistent_read() mrn_override;
+ void try_semi_consistent_read(bool yes) mrn_override;
+ void unlock_row() mrn_override;
+ int start_stmt(THD *thd, thr_lock_type lock_type) mrn_override;
protected:
#ifdef MRN_HANDLER_RECORDS_RETURN_ERROR
int records(ha_rows *num_rows);
#else
- ha_rows records();
+ ha_rows records() mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_RND_NEXT
- int rnd_next(uchar *buf);
+ int rnd_next(uchar *buf) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_RND_POS
- int rnd_pos(uchar *buf, uchar *pos);
+ int rnd_pos(uchar *buf, uchar *pos) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_INDEX_READ_MAP
int index_read_map(uchar *buf, const uchar *key,
key_part_map keypart_map,
- enum ha_rkey_function find_flag);
+ enum ha_rkey_function find_flag) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_INDEX_NEXT
- int index_next(uchar *buf);
+ int index_next(uchar *buf) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_INDEX_PREV
- int index_prev(uchar *buf);
+ int index_prev(uchar *buf) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_INDEX_FIRST
- int index_first(uchar *buf);
+ int index_first(uchar *buf) mrn_override;
#endif
#ifdef MRN_HANDLER_HAVE_HA_INDEX_LAST
- int index_last(uchar *buf);
+ int index_last(uchar *buf) mrn_override;
#endif
- void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share_arg);
- bool primary_key_is_clustered();
- bool is_fk_defined_on_table_or_index(uint index);
- char *get_foreign_key_create_info();
+ void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share_arg) mrn_override;
+ bool primary_key_is_clustered() mrn_override;
+ bool is_fk_defined_on_table_or_index(uint index) mrn_override;
+ char *get_foreign_key_create_info() mrn_override;
#ifdef MRN_HANDLER_HAVE_GET_TABLESPACE_NAME
char *get_tablespace_name(THD *thd, char *name, uint name_len);
#endif
- bool can_switch_engines();
- int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
- int get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
- uint referenced_by_foreign_key();
- void init_table_handle_for_HANDLER();
- void free_foreign_key_create_info(char* str);
+ bool can_switch_engines() mrn_override;
+ int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override;
+ int get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list) mrn_override;
+ uint referenced_by_foreign_key() mrn_override;
+ void init_table_handle_for_HANDLER() mrn_override;
+ void free_foreign_key_create_info(char* str) mrn_override;
#ifdef MRN_HAVE_HA_REBIND_PSI
- void unbind_psi();
- void rebind_psi();
+ void unbind_psi() mrn_override;
+ void rebind_psi() mrn_override;
#endif
my_bool register_query_cache_table(THD *thd,
const char *table_key,
uint key_length,
qc_engine_callback *engine_callback,
- ulonglong *engine_data);
+ ulonglong *engine_data) mrn_override;
#ifdef MRN_HANDLER_HAVE_CHECK_IF_SUPPORTED_INPLACE_ALTER
bool prepare_inplace_alter_table(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
+ Alter_inplace_info *ha_alter_info) mrn_override;
bool inplace_alter_table(TABLE *altered_table,
- Alter_inplace_info *ha_alter_info);
+ Alter_inplace_info *ha_alter_info) mrn_override;
bool commit_inplace_alter_table(TABLE *altered_table,
Alter_inplace_info *ha_alter_info,
- bool commit);
- void notify_table_changed();
+ bool commit) mrn_override;
+ void notify_table_changed() mrn_override;
#endif
private:
@@ -692,7 +692,7 @@ private:
int generic_geo_open_cursor(const uchar *key, enum ha_rkey_function find_flag);
#ifdef MRN_HANDLER_HAVE_HA_CLOSE
- int close();
+ int close() mrn_override;
#endif
bool is_dry_write();
bool is_enable_optimization();
diff --git a/storage/mroonga/vendor/groonga/CMakeLists.txt b/storage/mroonga/vendor/groonga/CMakeLists.txt
index e1f45b7fda9..564e859d146 100644
--- a/storage/mroonga/vendor/groonga/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -77,9 +77,8 @@ if(DEFINED GRN_EMBED)
else()
set(GRN_EMBED_DEFAULT OFF)
endif()
-option(GRN_EMBED
- "Build as a static library to embed into an application"
- ${GRN_EMBED_DEFAULT})
+set(GRN_EMBED ${GRN_EMBED_DEFAULT} CACHE BOOL
+ "Build as a static library to embed into an application")
set(BIN_DIR "bin")
set(SBIN_DIR "sbin")
diff --git a/storage/mroonga/vendor/groonga/lib/hash.c b/storage/mroonga/vendor/groonga/lib/hash.c
index 8fe180481c9..3fb372ee222 100644
--- a/storage/mroonga/vendor/groonga/lib/hash.c
+++ b/storage/mroonga/vendor/groonga/lib/hash.c
@@ -89,12 +89,6 @@ grn_tiny_array_at_inline(grn_tiny_array *array, grn_id id)
return id ? grn_tiny_array_put(array, id) : NULL;
}
-inline static void *
-grn_tiny_array_next(grn_tiny_array *array)
-{
- return grn_tiny_array_put(array, array->max + 1);
-}
-
void
grn_tiny_array_init(grn_ctx *ctx, grn_tiny_array *array,
uint16_t element_size, uint16_t flags)
@@ -204,15 +198,6 @@ grn_tiny_bitmap_put_byte(grn_tiny_bitmap *bitmap, grn_id bit_id) {
/* Requirements: bit_id != GRN_ID_NIL. */
/* Return value: 1/0 on success, -1 on failure. */
-inline static int
-grn_tiny_bitmap_get(grn_tiny_bitmap *bitmap, grn_id bit_id)
-{
- uint8_t * const ptr = grn_tiny_bitmap_get_byte(bitmap, bit_id);
- return ptr ? ((*ptr >> (bit_id & 7)) & 1) : -1;
-}
-
-/* Requirements: bit_id != GRN_ID_NIL. */
-/* Return value: 1/0 on success, -1 on failure. */
/* Note: A bitmap is extended if needed. */
inline static int
grn_tiny_bitmap_put(grn_tiny_bitmap *bitmap, grn_id bit_id)
@@ -309,18 +294,6 @@ grn_io_array_bit_off(grn_ctx *ctx, grn_io *io,
return ptr;
}
-inline static void *
-grn_io_array_bit_flip(grn_ctx *ctx, grn_io *io,
- uint32_t segment_id, uint32_t offset)
-{
- uint8_t * const ptr = (uint8_t *)grn_io_array_at_inline(
- ctx, io, segment_id, (offset >> 3) + 1, GRN_TABLE_ADD);
- if (ptr) {
- *ptr ^= 1 << (offset & 7);
- }
- return ptr;
-}
-
/* grn_table_queue */
static void
@@ -1738,13 +1711,6 @@ get_value(grn_ctx *ctx, grn_hash *hash, entry_str *n)
return grn_hash_entry_get_value(ctx, hash, (grn_hash_entry *)n);
}
-inline static grn_rc
-put_key(grn_ctx *ctx, grn_hash *hash, entry_str *n, uint32_t h,
- const char *key, unsigned int len)
-{
- return grn_hash_entry_put_key(ctx, hash, (grn_hash_entry *)n, h, key, len);
-}
-
inline static int
match_key(grn_ctx *ctx, grn_hash *hash, entry_str *ee, uint32_t h,
const char *key, unsigned int len)
diff --git a/storage/mroonga/vendor/groonga/lib/ii.c b/storage/mroonga/vendor/groonga/lib/ii.c
index 58c789616d9..cd5559e6958 100644
--- a/storage/mroonga/vendor/groonga/lib/ii.c
+++ b/storage/mroonga/vendor/groonga/lib/ii.c
@@ -2194,23 +2194,6 @@ buffer_close(grn_ctx *ctx, grn_ii *ii, uint32_t pseg)
return GRN_SUCCESS;
}
-inline static uint32_t
-buffer_open_if_capable(grn_ctx *ctx, grn_ii *ii, int32_t seg, int size, buffer **b)
-{
- uint32_t pseg, pos = SEG2POS(seg, 0);
- if ((pseg = buffer_open(ctx, ii, pos, NULL, b)) != GRN_II_PSEG_NOT_ASSIGNED) {
- uint16_t nterms = (*b)->header.nterms - (*b)->header.nterms_void;
- if (!((nterms < 4096 ||
- (ii->header->total_chunk_size >> ((nterms >> 8) - 6))
- > (*b)->header.chunk_size) &&
- ((*b)->header.buffer_free >= size + sizeof(buffer_term)))) {
- buffer_close(ctx, ii, pseg);
- return GRN_II_PSEG_NOT_ASSIGNED;
- }
- }
- return pseg;
-}
-
typedef struct {
uint32_t rid;
uint32_t sid;
diff --git a/storage/mroonga/vendor/groonga/lib/pat.c b/storage/mroonga/vendor/groonga/lib/pat.c
index e2f98fba0d2..642173e2fdc 100644
--- a/storage/mroonga/vendor/groonga/lib/pat.c
+++ b/storage/mroonga/vendor/groonga/lib/pat.c
@@ -142,20 +142,6 @@ pat_get(grn_ctx *ctx, grn_pat *pat, grn_id id)
return res;
}
-inline static pat_node *
-pat_node_new(grn_ctx *ctx, grn_pat *pat, grn_id *id)
-{
- uint32_t n = pat->header->curr_rec + 1;
- pat_node *res;
- if (n > GRN_ID_MAX) { return NULL; }
- if ((res = pat_get(ctx, pat, n))) {
- pat->header->curr_rec = n;
- pat->header->n_entries++;
- }
- if (id) { *id = n; }
- return res;
-}
-
/* sis operation */
inline static sis_node *
diff --git a/storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c b/storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c
index dc64e802fbb..ddd69714b1e 100644
--- a/storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c
+++ b/storage/mroonga/vendor/groonga/lib/ts/ts_expr_node.c
@@ -187,55 +187,6 @@ grn_ts_ref_zero(void)
return (grn_ts_ref){ 0, 0.0 };
}
-/* grn_ts_bool_vector_zero() returns a zero. */
-inline static grn_ts_bool_vector
-grn_ts_bool_vector_zero(void)
-{
- return (grn_ts_bool_vector){ NULL, 0 };
-}
-
-/* grn_ts_int_vector_zero() returns a zero. */
-inline static grn_ts_int_vector
-grn_ts_int_vector_zero(void)
-{
- return (grn_ts_int_vector){ NULL, 0 };
-}
-
-/* grn_ts_float_vector_zero() returns a zero. */
-inline static grn_ts_float_vector
-grn_ts_float_vector_zero(void)
-{
- return (grn_ts_float_vector){ NULL, 0 };
-}
-
-/* grn_ts_time_vector_zero() returns a zero. */
-inline static grn_ts_time_vector
-grn_ts_time_vector_zero(void)
-{
- return (grn_ts_time_vector){ NULL, 0 };
-}
-
-/* grn_ts_text_vector_zero() returns a zero. */
-inline static grn_ts_text_vector
-grn_ts_text_vector_zero(void)
-{
- return (grn_ts_text_vector){ NULL, 0 };
-}
-
-/* grn_ts_geo_vector_zero() returns a zero. */
-inline static grn_ts_geo_vector
-grn_ts_geo_vector_zero(void)
-{
- return (grn_ts_geo_vector){ NULL, 0 };
-}
-
-/* grn_ts_ref_vector_zero() returns a zero. */
-inline static grn_ts_ref_vector
-grn_ts_ref_vector_zero(void)
-{
- return (grn_ts_ref_vector){ NULL, 0 };
-}
-
/* grn_ts_data_type_to_kind() returns a kind associated with a type. */
static grn_ts_data_kind
grn_ts_data_type_to_kind(grn_ts_data_type type)
diff --git a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
index 80e531e5319..d1ca2a8a0d8 100644
--- a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
@@ -25,9 +25,8 @@ if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED)
else()
set(GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT OFF)
endif()
-option(GROONGA_NORMALIZER_MYSQL_EMBED
- "Build as a static library to embed into an application"
- ${GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT})
+set(GROONGA_NORMALIZER_MYSQL_EMBED ${GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT}
+ CACHE BOOL "Build as a static library to embed into an application")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version" VERSION)
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
index 4bb5241b822..96da9737dbc 100644
--- a/storage/rocksdb/build_rocksdb.cmake
+++ b/storage/rocksdb/build_rocksdb.cmake
@@ -171,7 +171,20 @@ set(LIBS ${ROCKSDB_LIBS} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
#add_subdirectory(${ROCKSDB_SOURCE_DIR}/tools)
# Main library source code
-
+# Note : RocksDB has a lot of unittests. We should not include these files
+# in the build, because 1. they are not needed and 2. gtest causes warnings
+# in windows build, which are treated as errors and cause the build to fail.
+#
+# Unit tests themselves:
+# - *_test.cc
+# - *_bench.cc
+#
+# - table/mock_table.cc
+# - utilities/cassandra/cassandra_compaction_filter.cc
+# - utilities/cassandra/format.cc
+# - utilities/cassandra/merge_operator.cc
+# - utilities/cassandra/test_utils.cc
+#
set(ROCKSDB_SOURCES
cache/clock_cache.cc
cache/lru_cache.cc
@@ -209,7 +222,6 @@ set(ROCKSDB_SOURCES
db/flush_job.cc
db/flush_scheduler.cc
db/forward_iterator.cc
- db/in_memory_stats_history.cc
db/internal_stats.cc
db/log_reader.cc
db/logs_with_prep_tracker.cc
@@ -251,16 +263,17 @@ set(ROCKSDB_SOURCES
memtable/alloc_tracker.cc
memtable/hash_linklist_rep.cc
memtable/hash_skiplist_rep.cc
- memtable/memtablerep_bench.cc
memtable/skiplistrep.cc
memtable/vectorrep.cc
memtable/write_buffer_manager.cc
monitoring/histogram.cc
monitoring/histogram_windowing.cc
monitoring/instrumented_mutex.cc
+ monitoring/in_memory_stats_history.cc
monitoring/iostats_context.cc
monitoring/perf_context.cc
monitoring/perf_level.cc
+ monitoring/persistent_stats_history.cc
monitoring/statistics.cc
monitoring/thread_status_impl.cc
monitoring/thread_status_updater.cc
@@ -298,7 +311,6 @@ set(ROCKSDB_SOURCES
table/iterator.cc
table/merging_iterator.cc
table/meta_blocks.cc
- table/mock_table.cc
table/persistent_cache_helper.cc
table/plain/plain_table_builder.cc
table/plain/plain_table_factory.cc
@@ -308,13 +320,13 @@ set(ROCKSDB_SOURCES
table/sst_file_reader.cc
table/sst_file_writer.cc
table/table_properties.cc
- table/table_reader_bench.cc
table/two_level_iterator.cc
test_util/sync_point.cc
test_util/sync_point_impl.cc
tools/ldb_cmd.cc
tools/ldb_tool.cc
tools/sst_dump_tool.cc
+ trace_replay/block_cache_tracer.cc
trace_replay/trace_replay.cc
util/bloom.cc
util/coding.cc
@@ -338,10 +350,6 @@ set(ROCKSDB_SOURCES
utilities/blob_db/blob_log_format.cc
utilities/blob_db/blob_log_reader.cc
utilities/blob_db/blob_log_writer.cc
- utilities/cassandra/cassandra_compaction_filter.cc
- utilities/cassandra/format.cc
- utilities/cassandra/merge_operator.cc
- utilities/cassandra/test_utils.cc
utilities/checkpoint/checkpoint_impl.cc
utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc
utilities/convenience/info_log_finder.cc
@@ -361,8 +369,6 @@ set(ROCKSDB_SOURCES
utilities/persistent_cache/block_cache_tier.cc
utilities/persistent_cache/block_cache_tier_file.cc
utilities/persistent_cache/block_cache_tier_metadata.cc
- utilities/persistent_cache/hash_table_bench.cc
- utilities/persistent_cache/persistent_cache_bench.cc
utilities/persistent_cache/persistent_cache_tier.cc
utilities/persistent_cache/volatile_tier_impl.cc
utilities/simulator_cache/sim_cache.cc
@@ -384,7 +390,6 @@ set(ROCKSDB_SOURCES
utilities/ttl/db_ttl_impl.cc
utilities/write_batch_with_index/write_batch_with_index.cc
utilities/write_batch_with_index/write_batch_with_index_internal.cc
- util/log_write_bench.cc
util/murmurhash.cc
util/random.cc
util/rate_limiter.cc
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 59c764caa96..7eb53dd878c 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -71,6 +71,9 @@
#include "util/stop_watch.h"
#include "./rdb_source_revision.h"
+// MariaRocks: this is needed to access RocksDB debug syncpoints:
+#include "test_util/sync_point.h"
+
/* MyRocks includes */
#include "./event_listener.h"
#include "./ha_rocksdb_proto.h"
@@ -799,7 +802,7 @@ static void rocksdb_set_rocksdb_stats_level(THD *const thd,
RDB_MUTEX_LOCK_CHECK(rdb_sysvars_mutex);
rocksdb_db_options->statistics->set_stats_level(
- static_cast<const rocksdb::StatsLevel>(
+ static_cast<rocksdb::StatsLevel>(
*static_cast<const uint64_t *>(save)));
// Actual stats level is defined at rocksdb dbopt::statistics::stats_level_
// so adjusting rocksdb_stats_level here to make sure it points to
@@ -7792,6 +7795,28 @@ int ha_rocksdb::create(const char *const name, TABLE *const table_arg,
}
}
+ // The below adds/clears hooks in RocksDB sync points. There's no reason for
+ // this code to be in ::create() but it needs to be somewhere where it is
+ // away from any tight loops and where one can invoke it from mtr:
+ DBUG_EXECUTE_IF("rocksdb_enable_delay_commits",
+ {
+ auto syncpoint= rocksdb::SyncPoint::GetInstance();
+ syncpoint->SetCallBack("DBImpl::WriteImpl:BeforeLeaderEnters",
+ [&](void* /*arg*/) {my_sleep(500);} );
+ syncpoint->EnableProcessing();
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WRONG_ARGUMENTS,
+ "enable_delay_commits_mode ON");
+
+ });
+ DBUG_EXECUTE_IF("rocksdb_disable_delay_commits",
+ {
+ auto syncpoint= rocksdb::SyncPoint::GetInstance();
+ syncpoint->ClearCallBack("DBImpl::WriteImpl:BeforeLeaderEnters");
+ syncpoint->DisableProcessing();
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_WRONG_ARGUMENTS,
+ "enable_delay_commits_mode OFF");
+ });
+
DBUG_RETURN(create_table(str, table_arg, create_info->auto_increment_value));
}
@@ -12161,6 +12186,7 @@ void ha_rocksdb::get_auto_increment(ulonglong off, ulonglong inc,
an actual reserve of some values might be a better solution.
*/
DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars");
+ DEBUG_SYNC(ha_thd(), "rocksdb.autoinc_vars2");
if (off > inc) {
off = 1;
diff --git a/storage/rocksdb/mysql-test/rocksdb/include/have_write_prepared.inc b/storage/rocksdb/mysql-test/rocksdb/include/have_write_prepared.inc
new file mode 100644
index 00000000000..df088ea047d
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb/include/have_write_prepared.inc
@@ -0,0 +1,3 @@
+if (`select count(*) = 0 from information_schema.session_variables where variable_name = 'rocksdb_write_policy' and variable_value = 'write_prepared';`) {
+ --skip Test requires write_prepared policy
+}
diff --git a/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc b/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
index da16e1c9c3b..6e427f26fd6 100644
--- a/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
+++ b/storage/rocksdb/mysql-test/rocksdb/include/use_direct_io_option.inc
@@ -6,6 +6,7 @@
--source include/have_direct_io.inc
--echo Checking direct reads
+--let $restart_noprint=2
--let $_mysqld_option=$io_option
--source include/restart_mysqld_with_option.inc
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result b/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result
index 722edadb4da..a6bb9eb64c7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/2pc_group_commit.result
@@ -27,6 +27,12 @@ select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
Rocksdb_wal_synced
OK
+set debug_dbug='+d,rocksdb_enable_delay_commits';
+create table dummy10(a int) engine=rocksdb;
+Warnings:
+Warning 1210 enable_delay_commits_mode ON
+drop table dummy10;
+set debug_dbug='-d,rocksdb_enable_delay_commits';
##
## 2PC + durability + group commit
##
@@ -45,6 +51,12 @@ select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3)
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3)
OK
+set debug_dbug='+d,rocksdb_disable_delay_commits';
+create table dummy10(a int) engine=rocksdb;
+Warnings:
+Warning 1210 enable_delay_commits_mode OFF
+drop table dummy10;
+set debug_dbug='-d,rocksdb_disable_delay_commits';
##
# 2PC enabled, MyRocks durability disabled, single thread
##
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
index db64778d345..9331b4e22a5 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
@@ -12,17 +12,18 @@ SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
connect con3, localhost, root,,;
connection con1;
+SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
INSERT INTO t1 VALUES(NULL);
+connection default;
+SET debug_sync='now WAIT_FOR parked1';
connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
INSERT INTO t1 VALUES(NULL);
connection default;
-SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
SET debug_sync='now SIGNAL go1';
connection con3;
-SET debug_sync='now SIGNAL go2';
connection default;
connection con1;
connection con2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
index 24b93ee3395..32bb70a7464 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_cf_per_partition.result
@@ -355,7 +355,7 @@ test.t2 analyze Warning Engine-independent statistics are not collected for colu
test.t2 analyze status OK
EXPLAIN PARTITIONS SELECT * FROM t2 WHERE col3 = 0x4 AND col2 = 0x34567;
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 custom_p2 ref col3 col3 258 const 1 Using where
+1 SIMPLE t2 custom_p2 ref col3 col3 258 const # Using where
DROP TABLE t2;
CREATE TABLE `t2` (
`col1` bigint(20) NOT NULL,
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result b/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result
index 8de94e0297e..db9b119043a 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/unique_check.result
@@ -66,13 +66,14 @@ id id2 value
2 1 2
truncate table t2;
connection con1;
-set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
+set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
insert into t1 values (1,1);
+connection default;
+set debug_sync='now WAIT_FOR parked1';
connection con2;
-set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
+set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
insert into t2 values (1,1,1);
connection default;
-set debug_sync='now WAIT_FOR parked1';
set debug_sync='now WAIT_FOR parked2';
connection con3;
set session rocksdb_lock_wait_timeout=1;
@@ -81,8 +82,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert into t2 values (2,1,2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
connection default;
-set debug_sync='now SIGNAL go1';
-set debug_sync='now SIGNAL go2';
+set debug_sync='now SIGNAL go';
connection con1;
connection con2;
connection default;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test
index af9d2667e82..aeadf5381b0 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/2pc_group_commit.test
@@ -4,6 +4,13 @@
--echo # Disable for valgrind because this takes too long
--source include/not_valgrind.inc
+# MariaDB: tooling to slowdown commits (also when running on ramdisk, we need
+# write_prepared for some reason, this is set in the .opt file)
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/have_write_prepared.inc
+
+
--disable_warnings
DROP DATABASE IF EXISTS mysqlslap;
--enable_warnings
@@ -15,6 +22,7 @@ CREATE TABLE t1(id BIGINT AUTO_INCREMENT, value BIGINT, PRIMARY KEY(id)) ENGINE=
SET @save_rocksdb_enable_2pc= @@rocksdb_enable_2pc;
SET @save_rocksdb_flush_log_at_trx_commit= @@rocksdb_flush_log_at_trx_commit;
+
#
# In MariaDB, regular group commit operation does not cause increment of
# rocksdb_wal_group_syncs.
@@ -39,6 +47,19 @@ from information_schema.global_status where variable_name='Binlog_group_commits'
select IF(variable_value - @b3 between 1000 and 1500, 'OK', variable_value - @b3) as Rocksdb_wal_synced
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
+# SQL layer solution is sufficient for Binlog counts but not RocksDB.
+#set @tmp_bcwc= @@binlog_commit_wait_count;
+#set @tmp_bcwu= @@binlog_commit_wait_usec;
+#set global binlog_commit_wait_count=30;
+#set global binlog_commit_wait_usec=500*1000;
+
+# RocksDB-side solution:
+
+set debug_dbug='+d,rocksdb_enable_delay_commits';
+create table dummy10(a int) engine=rocksdb;
+drop table dummy10;
+set debug_dbug='-d,rocksdb_enable_delay_commits';
+
--echo ##
--echo ## 2PC + durability + group commit
--echo ##
@@ -55,6 +76,14 @@ from information_schema.global_status where variable_name='Binlog_group_commits'
select IF(variable_value - @b3 between 1 and 9000, 'OK', variable_value - @b3)
from information_schema.global_status where variable_name='Rocksdb_wal_synced';
+#set global binlog_commit_wait_count= @tmp_bcwc;
+#set global binlog_commit_wait_usec= @tmp_bcwu;
+
+set debug_dbug='+d,rocksdb_disable_delay_commits';
+create table dummy10(a int) engine=rocksdb;
+drop table dummy10;
+set debug_dbug='-d,rocksdb_disable_delay_commits';
+
--echo ##
--echo # 2PC enabled, MyRocks durability disabled, single thread
--echo ##
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
index 78521fbc9ef..5a40d28e1c9 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
@@ -23,22 +23,28 @@ connect (con3, localhost, root,,);
# Start each thread on an insert that will block waiting for a signal
connection con1;
+SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
send INSERT INTO t1 VALUES(NULL);
+connection default;
+SET debug_sync='now WAIT_FOR parked1';
+
connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
send INSERT INTO t1 VALUES(NULL);
# Wait for both threads to be at debug_sync point
connection default;
-SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
+
# Signal both threads to continue
+# (In MariaDB, we signal one of them which continues and signals the other)
send SET debug_sync='now SIGNAL go1';
connection con3;
-SET debug_sync='now SIGNAL go2';
+# MariaDB: do nothing here
+
connection default;
reap;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/check_ignore_unknown_options.test b/storage/rocksdb/mysql-test/rocksdb/t/check_ignore_unknown_options.test
index b39c022fc46..c8c12626139 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/check_ignore_unknown_options.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/check_ignore_unknown_options.test
@@ -1,22 +1,50 @@
-# MariaDB: "xargs" is not present on windows builders.
-# we could work around this but this is not a priority.
---source include/not_windows.inc
-
--disable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
select variable_name, variable_value from information_schema.global_variables where variable_name="rocksdb_ignore_unknown_options";
---exec find $MYSQLD_DATADIR/#rocksdb/OPTIONS* | sort -t- -k 2 -n | tail -1 | xargs -0 -I {} -t sh -c "sed -i 's/rocksdb_version=.*/rocksdb_version=99.9.9/' {}"
---exec find $MYSQLD_DATADIR/#rocksdb/OPTIONS* | sort -t- -k 2 -n | tail -1 | xargs -0 -I {} -t sh -c "echo hello=world>>{}"
+#
+# MariaDB: The following shell commands are not portable so we are
+# using perl instead:
+#--exec find $MYSQLD_DATADIR/#rocksdb/OPTIONS* | sort -t- -k 2 -n | tail -1 | xargs -0 -I {} -t sh -c "sed -i 's/rocksdb_version=.*/rocksdb_version=99.9.9/' {}"
+#--exec find $MYSQLD_DATADIR/#rocksdb/OPTIONS* | sort -t- -k 2 -n | tail -1 | xargs -0 -I {} -t sh -c "echo hello=world>>{}"
+
+perl;
+ my $path=$ENV{MYSQLTEST_VARDIR} . "/mysqld.1/data/\#rocksdb";
+ opendir(my $dh, $path) || die "Can't opendir $some_dir: $!";
+ my @files = grep { /^OPTIONS/ } readdir($dh);
+ closedir($dh);
+ sub compare_second_as_number {
+ local $aa= shift;
+ local $bb= shift;
+ $aa =~ s/OPTIONS-//;
+ $bb =~ s/OPTIONS-//;
+ return $aa <=> $bb;
+ }
+
+ @sorted_files = sort { compare_second_as_number($a, $b); } @files;
+ my $last_file= $sorted_files[-1];
+
+ my $contents="";
+ open(my $fh, "<", "$path/$last_file") || die ("Couldn't open $path/$last_file");
+ while (<$fh>) {
+ $_ =~ s/rocksdb_version=.*/rocksdb_version=99.9.9/;
+ $contents .= $_;
+ }
+ close($fh);
+ $contents .= "hello=world\n";
+ open(my $fh, ">", "$path/$last_file") || die("Can't open $path/$file for writing");
+ print $fh $contents;
+ close($fh);
+EOF
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--error 1
---exec $MYSQLD_CMD --plugin_load=$HA_ROCKSDB_SO --rocksdb_ignore_unknown_options=0 --loose-console --log-error=$error_log
+--exec $MYSQLD_CMD --plugin_load=$HA_ROCKSDB_SO --rocksdb_ignore_unknown_options=0 --log-error=$error_log
let SEARCH_FILE= $error_log;
let SEARCH_PATTERN= RocksDB: Compatibility check against existing database options failed;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
index 51ab32277a8..2fb1404219a 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
+++ b/storage/rocksdb/mysql-test/rocksdb/t/disabled.def
@@ -38,6 +38,8 @@ rocksdb_read_free_rpl_stress : Read-Free replication is not supported
blind_delete_rr : Read-Free replication is not supported
blind_delete_rc : Read-Free replication is not supported
+force_shutdown: requires support for SHUTDOWN statement which calls exit().
+
##
## Tests that do not fit MariaDB's test environment. Upstream seems to test
## on boxes with much more RAM and CPU, some tests are more of a stress tests
@@ -68,6 +70,8 @@ gap_lock_raise_error: MDEV-11735: MyRocks: Gap Lock detector support
show_engine : MariaRocks: MariaDB doesnt support SHOW ENGINE rocksdb TRANSACTION STATUS
issue243_transactionStatus: MariaDB doesnt support SHOW ENGINE rocksdb TRANSACTION STATUS
rpl_row_not_found : MariaDB doesnt support slave_exec_mode='SEMI_STRICT'
+rpl_row_not_found_rc : MariaDB doesnt support slave_exec_mode='SEMI_STRICT'
+
ddl_high_priority: Needs fractional @@lock_wait_timeout
deadlock_tracking : Needs SHOW ENGINE ROCKSDB TRANSACTION STATUS
bytes_written: Needs I_S.TABLE_STATISTICS.IO_WRITE_BYTES
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_per_partition.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_per_partition.test
index 3ba54dd9c84..fcbd8527acc 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_per_partition.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_cf_per_partition.test
@@ -421,6 +421,7 @@ SELECT DISTINCT(cf_name) FROM information_schema.rocksdb_cfstats WHERE cf_name='
# Verify that correct partition and key are used when searching.
ANALYZE TABLE t2;
+--replace_column 10 #
EXPLAIN PARTITIONS SELECT * FROM t2 WHERE col3 = 0x4 AND col2 = 0x34567;
DROP TABLE t2;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
index a7be5c9a7ac..6fcfd491af1 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_data_index_dir.test
@@ -13,18 +13,27 @@
DROP TABLE IF EXISTS t1;
--enable_warnings
+# On a Mac, strerror() prints "Unknown error: nn", as
+# opposed to "Unknown error nn" on Linux/etc.
+# Replacing 'error:' with 'error' below to make the output uniform.
+
+--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb DATA DIRECTORY = '/foo/bar/data';
+--replace_result error: error
show warnings;
+--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb INDEX DIRECTORY = '/foo/bar/index';
+--replace_result error: error
show warnings;
#
# Verify that we'll get the same error codes when using the partitions.
#
+--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -34,8 +43,10 @@ CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY) ENGINE=rocksdb PARTITION BY RANGE
DATA DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
+--replace_result error: error
show warnings;
+--replace_result error: error
--error ER_CANT_CREATE_TABLE
CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE (id)
(
@@ -45,4 +56,5 @@ CREATE TABLE t1 (id int not null primary key) ENGINE=rocksdb PARTITION BY RANGE
INDEX DIRECTORY = '/foo/bar/data/',
PARTITION P2 VALUES LESS THAN (MAXVALUE)
);
+--replace_result error: error
show warnings;
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test b/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test
index 26f34f86f73..e2520388ea7 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/unique_check.test
@@ -102,15 +102,17 @@ truncate table t2;
# 4) simulating T1 GetForUpdate() -> T2 GetForUpdate(). T2 should fail with lock wait timeout.
connection con1;
-set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go1';
+set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked1 WAIT_FOR go';
send insert into t1 values (1,1);
+connection default;
+set debug_sync='now WAIT_FOR parked1';
+
connection con2;
-set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go2';
+set debug_sync='rocksdb.update_write_row_after_unique_check SIGNAL parked2 WAIT_FOR go';
send insert into t2 values (1,1,1);
connection default;
-set debug_sync='now WAIT_FOR parked1';
set debug_sync='now WAIT_FOR parked2';
connection con3;
@@ -121,8 +123,7 @@ insert into t1 values (1,2);
insert into t2 values (2,1,2);
connection default;
-set debug_sync='now SIGNAL go1';
-set debug_sync='now SIGNAL go2';
+set debug_sync='now SIGNAL go';
connection con1;
reap;
diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/combinations b/storage/rocksdb/mysql-test/rocksdb_rpl/combinations
index 05da5c7b8ee..eae7431662b 100644
--- a/storage/rocksdb/mysql-test/rocksdb_rpl/combinations
+++ b/storage/rocksdb/mysql-test/rocksdb_rpl/combinations
@@ -5,8 +5,3 @@ rocksdb_write_policy=write_committed
[row-write-prepared]
binlog-format=row
rocksdb_write_policy=write_prepared
-
-[row-write-committed-slave-gtid-optimized]
-binlog-format=row
-rocksdb_write_policy=write_committed
-slave_gtid_info=optimized
diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def b/storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def
index b0fc68b84b2..2147e3e086d 100644
--- a/storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def
+++ b/storage/rocksdb/mysql-test/rocksdb_rpl/t/disabled.def
@@ -11,6 +11,8 @@ rpl_gtid_rocksdb_sys_header : MariaDB doesn't support printing "RocksDB: Last My
singledelete_idempotent_recovery: MariaDB doesn't support --slave-use-idempotent-for-recovery
rpl_mts_dependency_unique_key_conflicts: MariaDB doesn't support --slave-use-idempotent-for-recovery
rpl_missing_columns_sk_update : Uses log_column_names=ON feature which is only present in FB/MySQL
+optimize_myrocks_replace_into: requires @@enable_blind_replace support.
+rpl_gtid_crash_safe_optimized: requires slave_gtid_info=optimized
##
## Tests that do not fit MariaDB's test environment (Functional tests only,
diff --git a/storage/rocksdb/rocksdb b/storage/rocksdb/rocksdb
-Subproject ba64a4cf52cce5cf180135e5aeddaa90b7887f9
+Subproject e731f4402258554812c46334dc0d9483e6cc769
diff --git a/storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake b/storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake
index 2f04a33558a..eac557258ea 100644
--- a/storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake
+++ b/storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake
@@ -134,4 +134,4 @@ static __thread int tlsvar = 0;
int main(void) { return tlsvar; }" HAVE_GNU_TLS)
## set TOKUDB_REVISION
-set(CMAKE_TOKUDB_REVISION 0 CACHE INTEGER "Revision of tokudb.")
+set(CMAKE_TOKUDB_REVISION 0 CACHE INTERNAL "Revision of tokudb.")
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 3655c87b94e..c3ff1383f86 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -77,6 +77,15 @@ IF(UNIX)
ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles)
ENDFOREACH()
+ IF(RPM)
+ EXECUTE_PROCESS(COMMAND rpm -q --qf "%{VERSION}-%{RELEASE}" libsepol
+ OUTPUT_VARIABLE LIBSEPOL_VERSION RESULT_VARIABLE err)
+ IF (NOT err)
+ SET(CPACK_RPM_server_PACKAGE_REQUIRES
+ "${CPACK_RPM_server_PACKAGE_REQUIRES} libsepol >= ${LIBSEPOL_VERSION}"
+ PARENT_SCOPE)
+ ENDIF()
+ ENDIF()
ENDIF()
ENDIF()
diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh
index 2598e62dd77..ef40376127e 100644
--- a/support-files/rpm/server-postin.sh
+++ b/support-files/rpm/server-postin.sh
@@ -50,7 +50,7 @@ if [ $1 = 1 ] ; then
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
- chown -R %{mysqld_user}:%{mysqld_group} $datadir
+ chown -R -f %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
# Create data directory
diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
index 5d58f9a42b6..f654f98bfc4 100644
--- a/zlib/CMakeLists.txt
+++ b/zlib/CMakeLists.txt
@@ -124,6 +124,8 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
ADD_CONVENIENCE_LIBRARY(zlib STATIC
${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+RESTRICT_SYMBOL_EXPORTS(zlib)
+
if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
@@ -142,7 +144,4 @@ if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
elseif(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
- if(NOT APPLE)
- set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
- endif()
endif()