summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/binlog/r/binlog_write_error.result4
-rw-r--r--mysql-test/suite/binlog/r/flashback.result480
-rw-r--r--mysql-test/suite/binlog/t/flashback-master.opt2
-rw-r--r--mysql-test/suite/binlog/t/flashback.test163
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations6
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_write_error.result4
-rw-r--r--mysql-test/suite/binlog_encryption/mysqlbinlog.combinations6
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations6
-rw-r--r--mysql-test/suite/encryption/disabled.def4
-rw-r--r--mysql-test/suite/encryption/r/innochecksum.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change3.result4
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change4.result10
-rw-r--r--mysql-test/suite/encryption/r/innodb-bad-key-change5.result10
-rw-r--r--mysql-test/suite/encryption/r/innodb-discard-import-change.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-discard-import.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-alter.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-encryption-disable.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption-32k.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_compression.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result14
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption-page-compression.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_discard_import.result2
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_filekeys.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_is.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result10
-rw-r--r--mysql-test/suite/encryption/r/innodb_encryption_tables.result10
-rw-r--r--mysql-test/suite/encryption/r/innodb_lotoftables.result24
-rw-r--r--mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result6
-rw-r--r--mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result10
-rw-r--r--mysql-test/suite/encryption/t/innochecksum.test6
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change.test8
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change3.test20
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change4.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb-bad-key-change5.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import-change.test13
-rw-r--r--mysql-test/suite/encryption/t/innodb-discard-import.test13
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-alter.test8
-rw-r--r--mysql-test/suite/encryption/t/innodb-encryption-disable.test13
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption-32k.test18
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption.test20
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption_compression.test13
-rw-r--r--mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test20
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption-page-compression.test9
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_discard_import.test18
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_filekeys.test9
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_is.test14
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb_encryption_tables.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test14
-rw-r--r--mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test17
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub.opt2
-rw-r--r--mysql-test/suite/encryption/t/innodb_scrub_background.opt2
-rw-r--r--mysql-test/suite/galera/disabled.def3
-rw-r--r--mysql-test/suite/galera/r/create.result2
-rw-r--r--mysql-test/suite/galera/r/galera_forced_binlog_format.result4
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result2
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result3
-rw-r--r--mysql-test/suite/galera/r/galera_sbr.result4
-rw-r--r--mysql-test/suite/galera/r/galera_sbr_binlog.result4
-rw-r--r--mysql-test/suite/galera/r/galera_var_slave_threads.result9
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test2
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test3
-rw-r--r--mysql-test/suite/galera/t/galera_var_slave_threads.test9
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_basic.result2
-rw-r--r--mysql-test/suite/innodb/include/dml_ops.inc82
-rw-r--r--mysql-test/suite/innodb/include/have_innodb_punchhole.inc4
-rw-r--r--mysql-test/suite/innodb/include/ibd_convert.pl25
-rw-r--r--mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc16
-rw-r--r--mysql-test/suite/innodb/include/innodb_wl6501_crash.inc14
-rw-r--r--mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc4
-rw-r--r--mysql-test/suite/innodb/include/log_file_cleanup.inc16
-rw-r--r--mysql-test/suite/innodb/r/101_compatibility.result47
-rw-r--r--mysql-test/suite/innodb/r/alter_missing_tablespace.result34
-rw-r--r--mysql-test/suite/innodb/r/doublewrite.result2
-rw-r--r--mysql-test/suite/innodb/r/group_commit_crash.result1
-rw-r--r--mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result1
-rw-r--r--mysql-test/suite/innodb/r/innodb-16k.result17
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k-crash.result210
-rw-r--r--mysql-test/suite/innodb/r/innodb-32k.result442
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k-crash.result418
-rw-r--r--mysql-test/suite/innodb/r/innodb-64k.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-discard.result28
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-tempfile.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-bug-14068765.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb-bug-14084530.result11
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk-virtual.result86
-rw-r--r--mysql-test/suite/innodb/r/innodb-index.result15
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lz4.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzma.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_lzo.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_snappy.result54
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_tables.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-page_compression_zip.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb-trim.result20
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-1.result67
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result43
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result10
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-zip.result34
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522.result27
-rw-r--r--mysql-test/suite/innodb/r/innodb_blob_truncate.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug59641.result6
-rw-r--r--mysql-test/suite/innodb/r/innodb_monitor.result8
-rw-r--r--mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result9
-rw-r--r--mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result8
-rw-r--r--mysql-test/suite/innodb/r/log_alter_table.result16
-rw-r--r--mysql-test/suite/innodb/r/log_corruption.result19
-rw-r--r--mysql-test/suite/innodb/r/log_file.result344
-rw-r--r--mysql-test/suite/innodb/r/log_file_name.result77
-rw-r--r--mysql-test/suite/innodb/r/log_file_name_debug.result8
-rw-r--r--mysql-test/suite/innodb/r/log_file_size.result54
-rw-r--r--mysql-test/suite/innodb/r/log_file_size_checkpoint.result4
-rw-r--r--mysql-test/suite/innodb/r/temp_table.result (renamed from mysql-test/suite/innodb_zip/r/wl6470_1.result)17
-rw-r--r--mysql-test/suite/innodb/r/temp_table_savepoint.result (renamed from mysql-test/suite/innodb_zip/r/wl6470_2.result)173
-rw-r--r--mysql-test/suite/innodb/r/temporary_table.result639
-rw-r--r--mysql-test/suite/innodb/r/temporary_table_optimization.result266
-rw-r--r--mysql-test/suite/innodb/r/xa_recovery.result3
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption.zipbin0 -> 94694 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption0.zipbin0 -> 1211 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption1.zipbin0 -> 1257 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption2.zipbin0 -> 1304 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption3.zipbin0 -> 1304 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption4.zipbin0 -> 1308 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption4a.zipbin0 -> 1310 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption5.zipbin0 -> 1308 bytes
-rw-r--r--mysql-test/suite/innodb/std_data/log_corruption6.zipbin0 -> 1311 bytes
-rw-r--r--mysql-test/suite/innodb/t/101_compatibility.test105
-rw-r--r--mysql-test/suite/innodb/t/alter_missing_tablespace.test58
-rw-r--r--mysql-test/suite/innodb/t/doublewrite.test46
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash.test2
-rw-r--r--mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test2
-rw-r--r--mysql-test/suite/innodb/t/innochecksum.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb-16k.test16
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k-crash.test19
-rw-r--r--mysql-test/suite/innodb/t/innodb-32k.test35
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k-crash.test19
-rw-r--r--mysql-test/suite/innodb/t/innodb-64k.test27
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-discard.test54
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-tempfile.test7
-rw-r--r--mysql-test/suite/innodb/t/innodb-bug-14068765.test14
-rw-r--r--mysql-test/suite/innodb/t/innodb-bug-14084530.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb-fk-virtual.test61
-rw-r--r--mysql-test/suite/innodb/t/innodb-index.test17
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_lz4.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_lzma.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_lzo.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_snappy.test35
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_tables.test10
-rw-r--r--mysql-test/suite/innodb/t/innodb-page_compression_zip.test9
-rw-r--r--mysql-test/suite/innodb/t/innodb-trim.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb-trim.test54
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-1.test76
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test31
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test8
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-zip.test28
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522.test24
-rw-r--r--mysql-test/suite/innodb/t/innodb_blob_truncate.test13
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug59641.test31
-rw-r--r--mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test12
-rw-r--r--mysql-test/suite/innodb/t/log_alter_table.test51
-rw-r--r--mysql-test/suite/innodb/t/log_corruption.test149
-rw-r--r--mysql-test/suite/innodb/t/log_file.test262
-rw-r--r--mysql-test/suite/innodb/t/log_file_name.test267
-rw-r--r--mysql-test/suite/innodb/t/log_file_name_debug.test31
-rw-r--r--mysql-test/suite/innodb/t/log_file_size.test218
-rw-r--r--mysql-test/suite/innodb/t/log_file_size_checkpoint.test32
-rw-r--r--mysql-test/suite/innodb/t/temp_table.test (renamed from mysql-test/suite/innodb_zip/t/wl6470_1.test)30
-rw-r--r--mysql-test/suite/innodb/t/temp_table_savepoint.test (renamed from mysql-test/suite/innodb_zip/t/wl6470_2.test)191
-rw-r--r--mysql-test/suite/innodb/t/temporary_table.test445
-rw-r--r--mysql-test/suite/innodb/t/temporary_table_optimization.opt1
-rw-r--r--mysql-test/suite/innodb/t/temporary_table_optimization.test243
-rw-r--r--mysql-test/suite/innodb/t/xa_recovery.test22
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc40
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc144
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc8
-rw-r--r--mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc1
-rw-r--r--mysql-test/suite/innodb_zip/r/create_options.result24
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum.result3
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_2.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innochecksum_3.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-create-options.result870
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb-zip.result9
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug36169.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug52745.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug53591.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug56680.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result15
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_3.result39
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_4.result95
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_crash_5.result75
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6501_scale_1.result27
-rw-r--r--mysql-test/suite/innodb_zip/r/wl6915_1.result2079
-rw-r--r--mysql-test/suite/innodb_zip/t/create_options.test18
-rw-r--r--mysql-test/suite/innodb_zip/t/disabled.def14
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum.test13
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_2.opt1
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_2.test3
-rw-r--r--mysql-test/suite/innodb_zip/t/innochecksum_3.test16
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb-create-options.test561
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb-zip.test17
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36169.test8
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36172.test8
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug52745.test8
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug53591.test7
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug56680.test6
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test17
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_3.test1
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_4.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_crash_5.test1
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6501_scale_1.test4
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6560.test422
-rw-r--r--mysql-test/suite/innodb_zip/t/wl6915_1.test650
-rw-r--r--mysql-test/suite/json/r/json_no_table.result3622
-rw-r--r--mysql-test/suite/json/t/json_no_table.test2288
-rw-r--r--mysql-test/suite/parts/r/partition_repair_myisam.result12
-rw-r--r--mysql-test/suite/parts/t/partition_repair_myisam.test6
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_crash.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_killed_ddl.result10
-rw-r--r--mysql-test/suite/rpl/t/rpl_gtid_crash.test5
-rw-r--r--mysql-test/suite/rpl/t/rpl_killed_ddl.test10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result33
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result8
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff22
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result34
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result14
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result18
-rw-r--r--mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test30
-rw-r--r--mysql-test/suite/vcol/disabled.def1
-rw-r--r--mysql-test/suite/wsrep/r/binlog_format.result10
-rw-r--r--mysql-test/suite/wsrep/t/binlog_format.test2
240 files changed, 11343 insertions, 7531 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result
index 28cffb3a8e5..2606a9f40b3 100644
--- a/mysql-test/suite/binlog/r/binlog_write_error.result
+++ b/mysql-test/suite/binlog/r/binlog_write_error.result
@@ -59,8 +59,8 @@ DROP VIEW v1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
SET GLOBAL debug_dbug='';
SET GLOBAL debug_dbug='d,injecting_fault_writing';
-CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
-CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
+CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
+CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
SET GLOBAL debug_dbug='';
SET GLOBAL debug_dbug='d,injecting_fault_writing';
diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result
new file mode 100644
index 00000000000..94833c5224a
--- /dev/null
+++ b/mysql-test/suite/binlog/r/flashback.result
@@ -0,0 +1,480 @@
+#
+# Preparatory cleanup.
+#
+DROP TABLE IF EXISTS t1;
+#
+# We need a fixed timestamp to avoid varying results.
+#
+SET timestamp=1000000000;
+#
+# Delete all existing binary logs.
+#
+RESET MASTER;
+CREATE TABLE t1 (
+c01 tinyint,
+c02 smallint,
+c03 mediumint,
+c04 int,
+c05 bigint,
+c06 char(10),
+c07 varchar(20),
+c08 TEXT
+) ENGINE=InnoDB;
+#
+# Insert data to t1
+#
+INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
+INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
+INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255));
+#
+# Update t1
+#
+UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3;
+#
+# Clear t1
+#
+DELETE FROM t1;
+FLUSH LOGS;
+#
+# Show mysqlbinlog result without -B
+#
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup
+ROLLBACK/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
+/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
+/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
+/*!100001 SET @@session.server_id=1*//*!*/;
+/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+use `test`/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+CREATE TABLE t1 (
+c01 tinyint,
+c02 smallint,
+c03 mediumint,
+c04 int,
+c05 bigint,
+c06 char(10),
+c07 varchar(20),
+c08 TEXT
+) ENGINE=InnoDB
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans
+/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+COMMIT/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans
+/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+COMMIT/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans
+/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
+### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+COMMIT/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans
+/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
+### UPDATE `test`.`t1`
+### WHERE
+### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### SET
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### UPDATE `test`.`t1`
+### WHERE
+### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### SET
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+COMMIT/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans
+/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
+BEGIN
+/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
+### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+COMMIT/*!*/;
+# at #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
+#
+# Show mysqlbinlog result with -B
+#
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 9:46:40 at startup
+ROLLBACK/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+BEGIN/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
+### INSERT INTO `test`.`t1`
+### SET
+### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
+### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### INSERT INTO `test`.`t1`
+### SET
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### INSERT INTO `test`.`t1`
+### SET
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+COMMIT
+/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+BEGIN/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
+### UPDATE `test`.`t1`
+### WHERE
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### SET
+### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### UPDATE `test`.`t1`
+### WHERE
+### @1=100 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+### SET
+### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+COMMIT
+/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+BEGIN/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=127 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=32767 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=8388607 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=2147483647 /* INT meta=0 nullable=1 is_null=0 */
+### @5=9223372036854775807 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='aaaaaaaaaa' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='aaaaaaaaaaaaaaaaaaaa' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+COMMIT
+/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+BEGIN/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=1 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=2 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=3 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=4 /* INT meta=0 nullable=1 is_null=0 */
+### @5=5 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='abc' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='abcdefg' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='abcedfghijklmnopqrstuvwxyz' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+COMMIT
+/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
+BEGIN/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
+### DELETE FROM `test`.`t1`
+### WHERE
+### @1=0 /* TINYINT meta=0 nullable=1 is_null=0 */
+### @2=0 /* SHORTINT meta=0 nullable=1 is_null=0 */
+### @3=0 /* MEDIUMINT meta=0 nullable=1 is_null=0 */
+### @4=0 /* INT meta=0 nullable=1 is_null=0 */
+### @5=0 /* LONGINT meta=0 nullable=1 is_null=0 */
+### @6='' /* STRING(10) meta=65034 nullable=1 is_null=0 */
+### @7='' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
+### @8='' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */
+COMMIT
+/*!*/;
+#010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
+use `test`/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.pseudo_thread_id=#/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
+SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+SET @@session.lc_time_names=0/*!*/;
+SET @@session.collation_database=DEFAULT/*!*/;
+COMMIT
+/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
+#
+# Insert data to t1
+#
+TRUNCATE TABLE t1;
+INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
+INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
+INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60));
+#
+# Delete all existing binary logs.
+#
+RESET MASTER;
+SELECT * FROM t1;
+c01 c02 c03 c04 c05 c06 c07 c08
+0 0 0 0 0
+1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
+127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+#
+# Operate some data
+#
+UPDATE t1 SET c01=20;
+UPDATE t1 SET c02=200;
+UPDATE t1 SET c03=2000;
+DELETE FROM t1;
+FLUSH LOGS;
+#
+# Flashback & Check the result
+#
+SELECT * FROM t1;
+c01 c02 c03 c04 c05 c06 c07 c08
+127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
+0 0 0 0 0
+RESET MASTER;
+#
+# UPDATE multi-rows in one event
+#
+BEGIN;
+UPDATE t1 SET c01=10 WHERE c01=0;
+UPDATE t1 SET c01=20 WHERE c01=10;
+COMMIT;
+FLUSH LOGS;
+#
+# Flashback & Check the result
+#
+SELECT * FROM t1;
+c01 c02 c03 c04 c05 c06 c07 c08
+127 32767 8388607 2147483647 9223372036854775807 aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+1 2 3 4 5 abc abcdefg abcedfghijklmnopqrstuvwxyz
+0 0 0 0 0
+DROP TABLE t1;
+#
+# Self-referencing foreign keys
+#
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES (1, NULL);
+INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3);
+COMMIT;
+SELECT * FROM t1;
+a b
+1 NULL
+2 1
+3 2
+4 3
+RESET MASTER;
+DELETE FROM t1 ORDER BY a DESC;
+FLUSH LOGS;
+#
+# Flashback & Check the result
+#
+SELECT * FROM t1;
+a b
+1 NULL
+2 1
+3 2
+4 3
+DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/t/flashback-master.opt b/mysql-test/suite/binlog/t/flashback-master.opt
new file mode 100644
index 00000000000..476efbe20ab
--- /dev/null
+++ b/mysql-test/suite/binlog/t/flashback-master.opt
@@ -0,0 +1,2 @@
+--flashback
+--timezone=GMT-8
diff --git a/mysql-test/suite/binlog/t/flashback.test b/mysql-test/suite/binlog/t/flashback.test
new file mode 100644
index 00000000000..2f395a2a7b1
--- /dev/null
+++ b/mysql-test/suite/binlog/t/flashback.test
@@ -0,0 +1,163 @@
+--source include/have_log_bin.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # Preparatory cleanup.
+--echo #
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+--echo #
+--echo # We need a fixed timestamp to avoid varying results.
+--echo #
+SET timestamp=1000000000;
+
+--echo #
+--echo # Delete all existing binary logs.
+--echo #
+RESET MASTER;
+
+
+CREATE TABLE t1 (
+ c01 tinyint,
+ c02 smallint,
+ c03 mediumint,
+ c04 int,
+ c05 bigint,
+ c06 char(10),
+ c07 varchar(20),
+ c08 TEXT
+) ENGINE=InnoDB;
+
+--echo #
+--echo # Insert data to t1
+--echo #
+INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
+INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
+INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 255));
+
+
+--echo #
+--echo # Update t1
+--echo #
+UPDATE t1 SET c01=100 WHERE c02=0 OR c03=3;
+
+--echo #
+--echo # Clear t1
+--echo #
+DELETE FROM t1;
+
+FLUSH LOGS;
+
+--echo #
+--echo # Show mysqlbinlog result without -B
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Show mysqlbinlog result with -B
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
+--exec $MYSQL_BINLOG -B --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
+
+--echo #
+--echo # Insert data to t1
+--echo #
+TRUNCATE TABLE t1;
+INSERT INTO t1 VALUES(0,0,0,0,0,'','','');
+INSERT INTO t1 VALUES(1,2,3,4,5, "abc", "abcdefg", "abcedfghijklmnopqrstuvwxyz");
+INSERT INTO t1 VALUES(127, 32767, 8388607, 2147483647, 9223372036854775807, repeat('a', 10), repeat('a', 20), repeat('a', 60));
+
+--echo #
+--echo # Delete all existing binary logs.
+--echo #
+RESET MASTER;
+SELECT * FROM t1;
+
+--echo #
+--echo # Operate some data
+--echo #
+
+UPDATE t1 SET c01=20;
+UPDATE t1 SET c02=200;
+UPDATE t1 SET c03=2000;
+
+DELETE FROM t1;
+
+FLUSH LOGS;
+
+--echo #
+--echo # Flashback & Check the result
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql
+--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_1.sql;"
+
+SELECT * FROM t1;
+
+RESET MASTER;
+
+--echo #
+--echo # UPDATE multi-rows in one event
+--echo #
+BEGIN;
+UPDATE t1 SET c01=10 WHERE c01=0;
+UPDATE t1 SET c01=20 WHERE c01=10;
+COMMIT;
+
+FLUSH LOGS;
+
+--echo #
+--echo # Flashback & Check the result
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql
+--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_2.sql;"
+
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Self-referencing foreign keys
+--echo #
+CREATE TABLE t1 (a INT PRIMARY KEY, b INT, FOREIGN KEY my_fk(b) REFERENCES t1(a)) ENGINE=InnoDB;
+
+BEGIN;
+INSERT INTO t1 VALUES (1, NULL);
+INSERT INTO t1 VALUES (2, 1), (3, 2), (4, 3);
+COMMIT;
+
+SELECT * FROM t1;
+
+# New binlog
+RESET MASTER;
+
+DELETE FROM t1 ORDER BY a DESC;
+
+FLUSH LOGS;
+
+--echo #
+--echo # Flashback & Check the result
+--echo #
+
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--exec $MYSQL_BINLOG -B -vv $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql
+--exec $MYSQL -e "SET binlog_format= ROW; source $MYSQLTEST_VARDIR/tmp/mysqlbinlog_row_flashback_3.sql;"
+
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations b/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations
new file mode 100644
index 00000000000..710c53d0ace
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.combinations
@@ -0,0 +1,6 @@
+[cmpr]
+log-bin-compress=1
+log-bin-compress-min-len=10
+
+[ncmpr]
+log-bin-compress=0
diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.result b/mysql-test/suite/binlog_encryption/binlog_write_error.result
index 28cffb3a8e5..2606a9f40b3 100644
--- a/mysql-test/suite/binlog_encryption/binlog_write_error.result
+++ b/mysql-test/suite/binlog_encryption/binlog_write_error.result
@@ -59,8 +59,8 @@ DROP VIEW v1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
SET GLOBAL debug_dbug='';
SET GLOBAL debug_dbug='d,injecting_fault_writing';
-CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
-CREATE PROCEDURE p1(OUT rows INT) SELECT count(*) INTO rows FROM t1;
+CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
+CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1;
ERROR HY000: Error writing file 'master-bin' ((errno: #)
SET GLOBAL debug_dbug='';
SET GLOBAL debug_dbug='d,injecting_fault_writing';
diff --git a/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations b/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations
new file mode 100644
index 00000000000..710c53d0ace
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/mysqlbinlog.combinations
@@ -0,0 +1,6 @@
+[cmpr]
+log-bin-compress=1
+log-bin-compress-min-len=10
+
+[ncmpr]
+log-bin-compress=0
diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations
new file mode 100644
index 00000000000..710c53d0ace
--- /dev/null
+++ b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.combinations
@@ -0,0 +1,6 @@
+[cmpr]
+log-bin-compress=1
+log-bin-compress-min-len=10
+
+[ncmpr]
+log-bin-compress=0
diff --git a/mysql-test/suite/encryption/disabled.def b/mysql-test/suite/encryption/disabled.def
index c2f41b70d03..d92d3495cb8 100644
--- a/mysql-test/suite/encryption/disabled.def
+++ b/mysql-test/suite/encryption/disabled.def
@@ -10,5 +10,5 @@
#
##############################################################################
-innodb_scrub_background : MDEV-8139 background scrubbing does not work reliably
-innodb_scrub : MDEV-8139 occasional corruption of delete_3.ibd page 2
+innodb_scrub : MDEV-8139 scrubbing does not work reliably
+innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
diff --git a/mysql-test/suite/encryption/r/innochecksum.result b/mysql-test/suite/encryption/r/innochecksum.result
index 50eafbf9f5e..7cd7af7b93b 100644
--- a/mysql-test/suite/encryption/r/innochecksum.result
+++ b/mysql-test/suite/encryption/r/innochecksum.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
# Create and populate a tables
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
@@ -23,5 +19,3 @@ CREATE TABLE t5 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB PAGE_CO
# Write file to make mysql-test-run.pl start up the server again
# Cleanup
DROP TABLE t1, t2, t3, t4, t5;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index 7c6a9d2ba83..dc5be714f66 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -11,10 +11,6 @@ call mtr.add_suppression("InnoDB: Tablespace id .* is encrypted but encryption s
call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index id is .*");
# Start server with keys2.txt
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
index 6f4a46b4c44..79155bf43b9 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change3.result
@@ -1,7 +1,5 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
SHOW WARNINGS;
@@ -23,8 +21,6 @@ backup: t1
UNLOCK TABLES;
ALTER TABLE t1 DISCARD TABLESPACE;
restore: t1 .ibd and .cfg files
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
ALTER TABLE t1 IMPORT TABLESPACE;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
index 369a8c7989c..d6c2706e8bf 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result
@@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check Warning Table test/t1 in tablespace # is encrypted but encryption service or used key_id is not available. Can't continue reading table.
@@ -22,5 +14,3 @@ test.t1 check error Corrupt
SHOW WARNINGS;
Level Code Message
DROP TABLE t1;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
index 9d8b1ddd23b..75a0587d35d 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change5.result
@@ -4,16 +4,8 @@ call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop th
call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem.");
call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*");
call mtr.add_suppression("Couldn't load plugins from 'file_key_management*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize Warning Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue checking table.
@@ -30,5 +22,3 @@ Level Code Message
Warning 192 Table test/t1 is encrypted but encryption service or used key_id is not available. Can't continue reading table.
Error 1296 Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
DROP TABLE t1;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-discard-import-change.result b/mysql-test/suite/encryption/r/innodb-discard-import-change.result
index 2505780b70c..b0b01b7cf7b 100644
--- a/mysql-test/suite/encryption/r/innodb-discard-import-change.result
+++ b/mysql-test/suite/encryption/r/innodb-discard-import-change.result
@@ -1,6 +1,4 @@
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
create table t1(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
create table t2(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
diff --git a/mysql-test/suite/encryption/r/innodb-discard-import.result b/mysql-test/suite/encryption/r/innodb-discard-import.result
index 06f4abab9f4..91314a77177 100644
--- a/mysql-test/suite/encryption/r/innodb-discard-import.result
+++ b/mysql-test/suite/encryption/r/innodb-discard-import.result
@@ -1,7 +1,5 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
show warnings;
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-alter.result b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
index 2003df0f4f4..06e4172bbae 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-alter.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-alter.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO ENCRYPTION_KEY_ID=4;
@@ -53,5 +49,3 @@ Error 1005 Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
set innodb_default_encryption_key_id = 1;
drop table t1,t2;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
index 62b233c1c93..63ad0cf13fb 100644
--- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result
+++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted");
call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match.");
call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file.");
@@ -44,5 +40,3 @@ select * from t5;
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
drop table t1;
drop table t5;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result
index 6aa98a2fc68..fdebf23ce8f 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption-32k.result
@@ -1,9 +1,14 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3;
+ERROR HY000: Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options")
+show warnings;
+Level Code Message
+Warning 140 InnoDB: ENCRYPTION_KEY_ID 3 not available
+Error 1005 Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options")
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4;
show create table innodb_compact;
Table Create Table
@@ -16,7 +21,7 @@ Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=3
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=33
show create table innodb_redundant;
Table Create Table
innodb_redundant CREATE TABLE `innodb_redundant` (
@@ -72,9 +77,6 @@ innodb_compact CREATE TABLE `innodb_compact` (
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
-Warnings:
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT.
show create table innodb_dynamic;
Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption.result
index 051fd602db5..1069b8652da 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
Level Code Message
@@ -122,10 +118,6 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
@@ -201,10 +193,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
innodb_compact CREATE TABLE `innodb_compact` (
@@ -281,5 +269,3 @@ drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
drop table innodb_defkey;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
index 6efefb23b87..a5bd7da8421 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_compression.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb page_compressed=1;
show warnings;
@@ -76,10 +72,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decompressed';
variable_value >= 0
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
@@ -132,10 +124,6 @@ innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
show create table innodb_normal;
Table Create Table
innodb_normal CREATE TABLE `innodb_normal` (
@@ -188,5 +176,3 @@ drop procedure innodb_insert_proc;
drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
index 672202de774..ce74ac52537 100644
--- a/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb-page_encryption_log_encryption.result
@@ -1,10 +1,6 @@
call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*");
call mtr.add_suppression("Disabling redo log encryp*");
call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
Level Code Message
@@ -101,10 +97,6 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
@@ -172,10 +164,6 @@ innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
show create table innodb_compact;
Table Create Table
innodb_compact CREATE TABLE `innodb_compact` (
@@ -253,5 +241,3 @@ pk
1
2
DROP TABLE t1;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
index 9523c7c3982..60b9ff57605 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
set global innodb_compression_algorithm = 1;
@@ -264,5 +260,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
index ae1fbdebcb3..91581eb8837 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_discard_import.result
@@ -1,7 +1,5 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
index 576b44fe897..54cdf842b20 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result
@@ -1,8 +1,4 @@
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB;
@@ -65,7 +61,5 @@ COUNT(1)
SELECT COUNT(1) FROM t5;
COUNT(1)
400
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
drop table t1,t2,t3,t4, t5;
set GLOBAL innodb_default_encryption_key_id=1;
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_is.result b/mysql-test/suite/encryption/r/innodb_encryption_is.result
index 591c5a84ccc..0ce4a11f1ea 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_is.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_is.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
@@ -14,5 +10,3 @@ NAME ENCRYPTION_SCHEME MIN_KEY_VERSION CURRENT_KEY_VERSION CURRENT_KEY_ID
test/t1 1 1 1 1
test/t2 1 1 1 2
DROP TABLE t1, t2;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
index e49e38a8f3f..3d616ee71e3 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_row_compressed.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
@@ -27,10 +23,6 @@ NOT FOUND /private/ in innodb_compressed2.ibd
NOT FOUND /private/ in innodb_compressed3.ibd
# t4 yes on expecting NOT FOUND
NOT FOUND /private/ in innodb_compressed4.ibd
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
select * from innodb_compressed1 where d = 20;
c1 d a b
1 20 private evenmoreprivate
@@ -155,5 +147,3 @@ drop table innodb_compressed1;
drop table innodb_compressed2;
drop table innodb_compressed3;
drop table innodb_compressed4;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_encryption_tables.result b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
index da62c0a2f0e..e7bcc207612 100644
--- a/mysql-test/suite/encryption/r/innodb_encryption_tables.result
+++ b/mysql-test/suite/encryption/r/innodb_encryption_tables.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
@@ -105,10 +101,6 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed';
variable_value >= 0
1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
@@ -163,5 +155,3 @@ drop table innodb_compact;
drop table innodb_dynamic;
drop table innodb_compressed;
drop table innodb_redundant;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_lotoftables.result b/mysql-test/suite/encryption/r/innodb_lotoftables.result
index aea50a1fa67..cf5724b527a 100644
--- a/mysql-test/suite/encryption/r/innodb_lotoftables.result
+++ b/mysql-test/suite/encryption/r/innodb_lotoftables.result
@@ -86,47 +86,47 @@ Innodb_pages0_read 3
# Restart Success!
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
use test;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
use innodb_encrypted_1;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
use innodb_encrypted_2;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
use innodb_encrypted_3;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
use innodb_encrypted_1;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 1
+Innodb_pages0_read 303
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 101
+Innodb_pages0_read 303
use innodb_encrypted_2;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 101
+Innodb_pages0_read 303
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 201
+Innodb_pages0_read 303
use innodb_encrypted_3;
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 201
+Innodb_pages0_read 303
show status like 'innodb_pages0_read%';
Variable_name Value
-Innodb_pages0_read 301
+Innodb_pages0_read 303
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
index 798e0ca4357..d04525b0d5a 100644
--- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
CREATE TABLE t3 (id INT, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
@@ -176,5 +172,3 @@ NOT FOUND /mangled/ in t6.ibd
NOT FOUND /mysql/ in t7.ibd
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
index 22038c0e933..d3406e67f18 100644
--- a/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
+++ b/mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result
@@ -1,8 +1,4 @@
# Restart mysqld --loose-file-key-management-filename=keys2.txt
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
Level Code Message
@@ -106,10 +102,6 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
variable_value >= 0
1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
alter table innodb_compact engine=innodb encryption_key_id = 2;
alter table innodb_compressed engine=innodb encryption_key_id = 3;
alter table innodb_dynamic engine=innodb encryption_key_id = 4;
@@ -155,5 +147,3 @@ drop table innodb_compact;
drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/encryption/t/innochecksum.test b/mysql-test/suite/encryption/t/innochecksum.test
index 7b41b2c5413..39e86d49674 100644
--- a/mysql-test/suite/encryption/t/innochecksum.test
+++ b/mysql-test/suite/encryption/t/innochecksum.test
@@ -15,13 +15,9 @@ if (!$INNOCHECKSUM) {
--disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let MYSQLD_DATADIR= `SELECT @@datadir`;
--enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
@@ -97,6 +93,4 @@ DROP TABLE t1, t2, t3, t4, t5;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 3bcce90b01a..cc5e6b36ac3 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -29,14 +29,6 @@ call mtr.add_suppression("InnoDB: InnoDB: Page may be an index page where index
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
ALTER TABLE t1 ADD COLUMN c2 INT;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
index b3ebe1c4aa5..dbd04748143 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test
@@ -12,11 +12,6 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
--let SEARCH_RANGE = 10000000
@@ -34,11 +29,7 @@ EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
---disable_warnings
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
---enable_warnings
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
SHOW WARNINGS;
@@ -76,11 +67,6 @@ EOF
--source include/wait_until_connected_again.inc
--source include/restart_mysqld.inc
---disable_warnings
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
---enable_warnings
-
--error ER_GET_ERRMSG
ALTER TABLE t1 IMPORT TABLESPACE;
SHOW CREATE TABLE t1;
@@ -109,12 +95,6 @@ EOF
DROP TABLE t1;
# reset system
---disable_warnings
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
---enable_warnings
--remove_file $MYSQLTEST_VARDIR/keys1.txt
--remove_file $MYSQLTEST_VARDIR/keys2.txt
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
index 82da3bbcf70..0b1db40b866 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test
@@ -32,14 +32,6 @@ EOF
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
@@ -56,9 +48,6 @@ EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
--replace_regex /tablespace [0-9]*/tablespace #/
CHECK TABLE t1;
SHOW WARNINGS;
@@ -82,9 +71,3 @@ EOF
DROP TABLE t1;
--remove_file $MYSQLTEST_VARDIR/keys1.txt
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test b/mysql-test/suite/encryption/t/innodb-bad-key-change5.test
index c6c0c963818..5f63eebe034 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change5.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change5.test
@@ -32,14 +32,6 @@ EOF
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTION_KEY_ID=4;
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
@@ -56,9 +48,6 @@ EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
OPTIMIZE TABLE t1;
SHOW WARNINGS;
@@ -80,9 +69,3 @@ EOF
DROP TABLE t1;
--remove_file $MYSQLTEST_VARDIR/keys1.txt
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import-change.test b/mysql-test/suite/encryption/t/innodb-discard-import-change.test
index a278a8fba29..2cb6865ed95 100644
--- a/mysql-test/suite/encryption/t/innodb-discard-import-change.test
+++ b/mysql-test/suite/encryption/t/innodb-discard-import-change.test
@@ -6,17 +6,9 @@
call mtr.add_suppression("InnoDB: Table .* tablespace is set as discarded");
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $innodb_compression_algo = `SELECT @@innodb_compression_algorithm`;
---enable_query_log
---disable_warnings
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
---enable_warnings
create table t1(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=4;
create table t2(c1 bigint not null primary key auto_increment, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
@@ -121,11 +113,6 @@ SELECT COUNT(*) FROM t5;
DROP TABLE t1,t2,t3,t4,t5,t6;
# reset system
---disable_warnings
--disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algo;
--enable_query_log
---enable_warnings
-
diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.test b/mysql-test/suite/encryption/t/innodb-discard-import.test
index 9feaacc41e5..e105cf82b67 100644
--- a/mysql-test/suite/encryption/t/innodb-discard-import.test
+++ b/mysql-test/suite/encryption/t/innodb-discard-import.test
@@ -13,17 +13,8 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $innodb_compression_algo = `SELECT @@innodb_compression_algorithm`;
---enable_query_log
-
---disable_warnings
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_compression_algorithm = 1;
---enable_warnings
--let $MYSQLD_TMPDIR = `SELECT @@tmpdir`
--let $MYSQLD_DATADIR = `SELECT @@datadir`
@@ -126,10 +117,6 @@ DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1,t2,t3,t4;
# reset system
---disable_warnings
--disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algo;
--enable_query_log
---enable_warnings
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-alter.test b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
index 316ece1c16b..cb7d5a47975 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-alter.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-alter.test
@@ -5,15 +5,9 @@
# MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
#
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $encrypt_tables = `SELECT @@innodb_encrypt_tables`;
let $threads = `SELECT @@innodb_encryption_threads`;
---enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
@@ -91,8 +85,6 @@ drop table t1,t2;
# reset system
--disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables;
EVAL SET GLOBAL innodb_encryption_threads = $threads;
--enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
index e8e2ba02402..8a8b451f5b1 100644
--- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test
+++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test
@@ -6,14 +6,6 @@
-- source include/not_crashrep.inc
-- source filekeys_plugin_exists.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
#
# MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
#
@@ -93,9 +85,4 @@ select * from t5;
drop table t1;
drop table t5;
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
-
--remove_file $MYSQLTEST_VARDIR/encryption-disable-keys1.txt
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test
index 325f0a86521..29d821d1fc1 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption-32k.test
@@ -7,18 +7,12 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
---disable_query_log
-# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
+--error ER_CANT_CREATE_TABLE
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=3;
+show warnings;
+create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4;
show create table innodb_compact;
@@ -88,9 +82,3 @@ drop table innodb_normal;
drop table innodb_compact;
drop table innodb_dynamic;
drop table innodb_redundant;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption.test b/mysql-test/suite/encryption/t/innodb-page_encryption.test
index 463df756933..df2d1d52aaa 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption.test
@@ -1,14 +1,6 @@
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
@@ -85,9 +77,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
@@ -124,9 +113,6 @@ show create table innodb_redundant;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
show create table innodb_compact;
show create table innodb_compressed;
show create table innodb_dynamic;
@@ -161,9 +147,3 @@ drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
drop table innodb_defkey;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
index eb293e97693..2fe29e0cb5c 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption_compression.test
@@ -5,15 +5,9 @@
# Test heavy not tested on valgrind
-- source include/not_valgrind.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $encryption = `SELECT @@innodb_encrypt_tables`;
---enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
@@ -67,8 +61,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
@@ -97,9 +89,6 @@ show create table innodb_dynamic;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
show create table innodb_normal;
show create table innodb_compact;
show create table innodb_dynamic;
@@ -128,7 +117,5 @@ drop table innodb_dynamic;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_encrypt_tables = $encryption;
--enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
index b6fe0d10b65..f7eab67154d 100644
--- a/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb-page_encryption_log_encryption.test
@@ -2,18 +2,10 @@
-- source include/not_embedded.inc
-- source include/have_file_key_management_plugin.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
call mtr.add_suppression("KeyID 0 not found or with error. Check the key and the log*");
call mtr.add_suppression("Disabling redo log encryp*");
call mtr.add_suppression("InnoDB: Redo log crypto: Can't initialize to key version*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
@@ -77,9 +69,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;
@@ -112,9 +101,6 @@ show create table innodb_redundant;
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
show create table innodb_compact;
show create table innodb_compressed;
show create table innodb_dynamic;
@@ -160,9 +146,3 @@ INSERT INTO t1 VALUES (1),(2);
SELECT * FROM t1;
DROP TABLE t1;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
index c2c7bd96d3e..606662e44e6 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test
@@ -4,16 +4,10 @@
# embedded does not support restart
-- source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`;
let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`;
---enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encryption_threads = 4;
SET GLOBAL innodb_encrypt_tables = on;
@@ -161,9 +155,6 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_encrypt_tables = $innodb_encrypt_tables_orig;
EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig;
--enable_query_log
-
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
index 32ba5d306f4..075cb1cf77e 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_discard_import.test
@@ -15,16 +15,6 @@ let $MYSQLD_DATADIR = `SELECT @@datadir`;
--let t2_IBD = $MYSQLD_DATADIR/test/t2.ibd
--let t3_IBD = $MYSQLD_DATADIR/test/t3.ibd
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
---disable_warnings
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
---enable_warnings
-
CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB encrypted=yes;
CREATE TABLE t2 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB;
CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
@@ -154,11 +144,3 @@ SELECT COUNT(1) FROM t3;
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3;
-
-# reset system
---disable_warnings
---disable_query_log
-eval SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-eval SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
---enable_warnings
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
index 8f0986071f1..47d546ae698 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test
@@ -5,15 +5,9 @@
call mtr.add_suppression("trying to do an operation on a dropped tablespace .*");
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
let $encrypt_tables = `SELECT @@innodb_encrypt_tables`;
let $threads = `SELECT @@innodb_encryption_threads`;
---enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = OFF;
SET GLOBAL innodb_encryption_threads = 4;
@@ -133,8 +127,6 @@ SELECT COUNT(1) FROM t5;
# reset system
--disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables;
EVAL SET GLOBAL innodb_encryption_threads = $threads;
--enable_query_log
@@ -142,4 +134,3 @@ EVAL SET GLOBAL innodb_encryption_threads = $threads;
drop table t1,t2,t3,t4, t5;
set GLOBAL innodb_default_encryption_key_id=1;
-
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_is.test b/mysql-test/suite/encryption/t/innodb_encryption_is.test
index 333bb84c634..52574aa2b9d 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_is.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_is.test
@@ -1,14 +1,6 @@
-- source include/have_innodb.inc
-- source include/have_file_key_management_plugin.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
CREATE TABLE t1 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
CREATE TABLE t2 (c VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=2;
INSERT INTO t1 VALUES ('foobar');
@@ -23,9 +15,3 @@ FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
WHERE NAME LIKE '%t1' OR NAME LIKE '%t2';
DROP TABLE t1, t2;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
index 0a28c1690a2..d6319164c35 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_row_compressed.test
@@ -2,14 +2,6 @@
-- source include/have_file_key_management_plugin.inc
-- source include/not_embedded.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_compressed1(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed encrypted=yes;
create table innodb_compressed2(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=1 encrypted=yes;
create table innodb_compressed3(c1 bigint not null primary key, d int, a varchar(20), b char(200)) engine=innodb row_format=compressed key_block_size=2 encrypted=yes;
@@ -52,9 +44,6 @@ insert into innodb_compressed4 select * from innodb_compressed1;
-- let SEARCH_FILE=$t4_IBD
-- source include/search_pattern_in_file.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
select * from innodb_compressed1 where d = 20;
select * from innodb_compressed1 where d = 30;
select * from innodb_compressed2 where d = 20;
@@ -117,9 +106,3 @@ drop table innodb_compressed1;
drop table innodb_compressed2;
drop table innodb_compressed3;
drop table innodb_compressed4;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_encryption_tables.test b/mysql-test/suite/encryption/t/innodb_encryption_tables.test
index f806b776800..bc762faf12e 100644
--- a/mysql-test/suite/encryption/t/innodb_encryption_tables.test
+++ b/mysql-test/suite/encryption/t/innodb_encryption_tables.test
@@ -2,14 +2,6 @@
-- source include/have_example_key_management_plugin.inc
-- source include/not_embedded.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
@@ -73,9 +65,6 @@ SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_
--source include/restart_mysqld.inc
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
update innodb_normal set c1 = c1 + 1;
update innodb_compact set c1 = c1 + 1;
update innodb_dynamic set c1 = c1 + 1;
@@ -106,9 +95,3 @@ drop table innodb_compact;
drop table innodb_dynamic;
drop table innodb_compressed;
drop table innodb_redundant;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
index 40beb10bcdb..eb90c446a81 100644
--- a/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
+++ b/mysql-test/suite/encryption/t/innodb_onlinealter_encryption.test
@@ -4,14 +4,6 @@
-- source include/not_embedded.inc
-- source include/not_windows.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
--let $MYSQLD_DATADIR=`select @@datadir`
--let SEARCH_RANGE = 10000000
--let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd
@@ -183,9 +175,3 @@ select count(1) from t7;
DROP PROCEDURE innodb_insert_proc;
DROP TABLE t1, t2, t3, t4, t5, t6, t7;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
index 7cbf005ed32..1babf577473 100644
--- a/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
+++ b/mysql-test/suite/encryption/t/innodb_page_encryption_key_change.test
@@ -7,14 +7,6 @@
-- let $restart_parameters=--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
-- source include/restart_mysqld.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
show warnings;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=2;
@@ -65,9 +57,6 @@ select * from innodb_redundant;
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
alter table innodb_compact engine=innodb encryption_key_id = 2;
alter table innodb_compressed engine=innodb encryption_key_id = 3;
alter table innodb_dynamic engine=innodb encryption_key_id = 4;
@@ -88,9 +77,3 @@ drop table innodb_compact;
drop table innodb_compressed;
drop table innodb_dynamic;
drop table innodb_redundant;
-
-# reset system
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/encryption/t/innodb_scrub.opt b/mysql-test/suite/encryption/t/innodb_scrub.opt
index 3adb645c589..ef43b2a20a8 100644
--- a/mysql-test/suite/encryption/t/innodb_scrub.opt
+++ b/mysql-test/suite/encryption/t/innodb_scrub.opt
@@ -2,8 +2,6 @@
--innodb-background-scrub-data-uncompressed=OFF
--innodb-encrypt-tables=OFF
--innodb-encryption-threads=0
---innodb-file-format=Barracuda
---innodb-file-per-table=1
--innodb-immediate-scrub-data-uncompressed=ON
--loose-innodb-debug-force-scrubbing=ON
--innodb-tablespaces-scrubbing
diff --git a/mysql-test/suite/encryption/t/innodb_scrub_background.opt b/mysql-test/suite/encryption/t/innodb_scrub_background.opt
index 1cc525b2402..04987f4a3ad 100644
--- a/mysql-test/suite/encryption/t/innodb_scrub_background.opt
+++ b/mysql-test/suite/encryption/t/innodb_scrub_background.opt
@@ -1,5 +1,3 @@
---innodb-file-per-table=1
---innodb-file-format=Barracuda
--innodb-immediate-scrub-data-uncompressed=OFF
--innodb-background-scrub-data-uncompressed=ON
--innodb-background-scrub-data-compressed=ON
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index f2e4077016a..a738e97271b 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -41,3 +41,6 @@ galera_sst_xtrabackup-v2-options : TODO: Fix test case
galera_sst_xtrabackup-v2 : MDEV-11208
galera_sst_xtrabackup-v2_encrypt_with_key : MDEV-11208
mysql-wsrep#33 : TODO: investigate
+galera_var_innodb_disallow_writes : MDEV-10949
+galera_many_tables_pk : MDEV-11927
+galera_many_tables_nopk : MDEV-11927
diff --git a/mysql-test/suite/galera/r/create.result b/mysql-test/suite/galera/r/create.result
index 4d6488d324b..a445b32e8bf 100644
--- a/mysql-test/suite/galera/r/create.result
+++ b/mysql-test/suite/galera/r/create.result
@@ -7,6 +7,8 @@ SHOW VARIABLES LIKE '%log%bin%';
Variable_name Value
log_bin OFF
log_bin_basename
+log_bin_compress OFF
+log_bin_compress_min_len 256
log_bin_index
log_bin_trust_function_creators ON
sql_log_bin ON
diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
index 86789a1b8e9..e5bd486eadc 100644
--- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result
+++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
@@ -2,12 +2,12 @@ connection node_1;
RESET MASTER;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
INSERT INTO t1 VALUES (2);
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info
diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
index bf4b056a6e4..90349f493bd 100644
--- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
+++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
@@ -11,7 +11,7 @@ SET SESSION wsrep_sync_wait=0;
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
COUNT(*) = 1
1
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table level lock%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
COUNT(*) = 1
1
SELECT COUNT(*) = 0 FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
index 336f46fcd7e..dd30f5af384 100644
--- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
+++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result
@@ -19,7 +19,8 @@ COUNT(*) = 30000
SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
COUNT(DISTINCT f1) = 30000
1
-SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
+USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
COUNT(*) = 5
1
connection default;
diff --git a/mysql-test/suite/galera/r/galera_sbr.result b/mysql-test/suite/galera/r/galera_sbr.result
index 61a58c9cb89..0bdaeef5b8a 100644
--- a/mysql-test/suite/galera/r/galera_sbr.result
+++ b/mysql-test/suite/galera/r/galera_sbr.result
@@ -1,12 +1,12 @@
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
INSERT INTO t1 VALUES (2);
connection node_2;
SELECT COUNT(*) = 2 FROM t1;
diff --git a/mysql-test/suite/galera/r/galera_sbr_binlog.result b/mysql-test/suite/galera/r/galera_sbr_binlog.result
index 61a58c9cb89..0bdaeef5b8a 100644
--- a/mysql-test/suite/galera/r/galera_sbr_binlog.result
+++ b/mysql-test/suite/galera/r/galera_sbr_binlog.result
@@ -1,12 +1,12 @@
connection node_1;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
INSERT INTO t1 VALUES (2);
connection node_2;
SELECT COUNT(*) = 2 FROM t1;
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 facc083544c..0ad0e3820e0 100644
--- a/mysql-test/suite/galera/r/galera_var_slave_threads.result
+++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result
@@ -12,7 +12,8 @@ SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
SET GLOBAL wsrep_slave_threads = 1;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
COUNT(*) = 2
1
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
@@ -25,7 +26,8 @@ connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
-SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
COUNT(*) = @@wsrep_slave_threads + 1
1
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
@@ -101,7 +103,8 @@ connection node_2;
SELECT COUNT(*) = 64 FROM t2;
COUNT(*) = 64
1
-SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
COUNT(*) = @@wsrep_slave_threads + 1
1
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index e14a8b9af23..71a46114970 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -7,7 +7,7 @@
--connection node_1
---let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1`
+--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND NOT STATE <=> 'wsrep aborter idle' AND NOT STATE <=> 'InnoDB background thread' LIMIT 1`
--disable_query_log
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
diff --git a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
index febb91a9725..08ed3fac67e 100644
--- a/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
+++ b/mysql-test/suite/galera/t/galera_parallel_apply_lock_table.test
@@ -33,7 +33,7 @@ INSERT INTO t2 VALUES (1);
--sleep 1
SET SESSION wsrep_sync_wait=0;
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%applied write set%';
-SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE '%Waiting for table level lock%';
+SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock';
SELECT COUNT(*) = 0 FROM t1;
SELECT COUNT(*) = 0 FROM t2;
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 f280e49d206..ea853f8ea01 100644
--- a/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
+++ b/mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
@@ -39,7 +39,8 @@ SET GLOBAL wsrep_slave_threads = 4;
--reap
SELECT COUNT(*) = 30000 FROM t1;
SELECT COUNT(DISTINCT f1) = 30000 FROM t1;
-SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = 5 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE
+ USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
--disable_query_log
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
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 50e22fbef66..23608ad32a9 100644
--- a/mysql-test/suite/galera/t/galera_var_slave_threads.test
+++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test
@@ -22,7 +22,8 @@ SELECT @@wsrep_slave_threads = 1;
SET GLOBAL wsrep_slave_threads = 1;
# There is a separate wsrep_aborter thread at all times
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
@@ -38,7 +39,8 @@ INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
-SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
@@ -60,7 +62,8 @@ while ($count)
--connection node_2
SELECT COUNT(*) = 64 FROM t2;
-SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
+SELECT COUNT(*) = @@wsrep_slave_threads + 1 FROM INFORMATION_SCHEMA.PROCESSLIST
+ WHERE USER = 'system user' AND NOT STATE <=> 'InnoDB background thread';
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_basic.result b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
index 06a307fc761..f55085ce2f8 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_basic.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
@@ -209,7 +209,7 @@ CREATE TABLE t1(a INT);
CREATE INDEX idx ON t1(a);
CREATE TABLE t3(a INT, b INT , INDEX(b), CONSTRAINT x FOREIGN KEY(b) REFERENCES t1(a));
CREATE TABLE t2(a INT, b INT generated always as (a+1) virtual, INDEX(b), CONSTRAINT x FOREIGN KEY(b) REFERENCES t1(a));
-ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+ERROR HY000: Can't create table `test`.`t2` (errno: 121 "Duplicate key on write or update")
CREATE TABLE t2(a INT, b INT generated always as (a+1) virtual, INDEX(b));
DROP TABLE t3;
DROP TABLE t2;
diff --git a/mysql-test/suite/innodb/include/dml_ops.inc b/mysql-test/suite/innodb/include/dml_ops.inc
new file mode 100644
index 00000000000..4908dfb6bee
--- /dev/null
+++ b/mysql-test/suite/innodb/include/dml_ops.inc
@@ -0,0 +1,82 @@
+delimiter |;
+create procedure populate_t1()
+begin
+ declare i int default 1;
+ while (i <= 200) do
+ insert into t1 values (i, 'a', 'b');
+ set i = i + 1;
+ end while;
+end|
+create procedure populate_t1_small()
+begin
+ declare i int default 1;
+ while (i <= 20) do
+ insert into t1 values (i, 'c', 'd');
+ set i = i + 1;
+ end while;
+end|
+create procedure populate_t1_small2()
+begin
+ declare i int default 30;
+ while (i <= 50) do
+ insert into t1 values (i, 'e', 'f');
+ set i = i + 1;
+ end while;
+end|
+delimiter ;|
+#
+begin;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+select * from t1 limit 10;
+rollback;
+select count(*) from t1;
+#
+begin;
+call populate_t1();
+select count(*) from t1;
+commit;
+select count(*) from t1;
+#
+truncate table t1;
+select count(*) from t1;
+#
+call populate_t1_small();
+select count(*) from t1;
+rollback;
+select count(*) from t1;
+truncate table t1;
+#
+call populate_t1();
+select count(*) from t1;
+delete from t1 where keyc <= 60;
+select count(*) from t1;
+call populate_t1_small();
+select count(*) from t1;
+select * from t1 limit 10;
+begin;
+call populate_t1_small2();
+select count(*) from t1;
+select * from t1 where keyc > 30 limit 10;
+rollback;
+select count(*) from t1;
+select * from t1 where keyc > 30 limit 10;
+#
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+rollback;
+begin;
+update t1 set keyc = keyc + 2000;
+select * from t1 limit 10;
+rollback;
+select * from t1 limit 10;
+commit;
+select * from t1 limit 10;
+#
+insert into t2 select * from t1 where keyc < 2101;
+select count(*) from t2;
+#
+drop procedure populate_t1;
+drop procedure populate_t1_small;
+drop procedure populate_t1_small2;
diff --git a/mysql-test/suite/innodb/include/have_innodb_punchhole.inc b/mysql-test/suite/innodb/include/have_innodb_punchhole.inc
new file mode 100644
index 00000000000..74cd5c4e0f2
--- /dev/null
+++ b/mysql-test/suite/innodb/include/have_innodb_punchhole.inc
@@ -0,0 +1,4 @@
+if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_have_punch_hole' AND variable_value = 'ON'`)
+{
+ --skip Test requires InnoDB compiled with fallocate(FALLOC_PUNCH_HOLE| FALLOC_KEEP_SIZE)
+}
diff --git a/mysql-test/suite/innodb/include/ibd_convert.pl b/mysql-test/suite/innodb/include/ibd_convert.pl
new file mode 100644
index 00000000000..32eef96fd23
--- /dev/null
+++ b/mysql-test/suite/innodb/include/ibd_convert.pl
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+# Convert tablespace flags to the format understood by MariaDB 10.1.0..10.1.20,
+# with the assumption that the flags were correct.
+
+sub convert_to_mariadb_101
+{
+ my ($file, $page_size) = @_;
+ open(FILE, "+<", $file) or die "Unable to open $file\n";
+ sysread(FILE, $_, $page_size)==$page_size||die "Unable to read $file\n";
+ sysseek(FILE, 0, 0)||die "Unable to seek $file\n";
+
+ # FIL_PAGE_DATA + FSP_SPACE_FLAGS = 38 + 16 = 54 bytes from the start
+ my($flags) = unpack "x[54]N", $_;
+ my $badflags = ($flags & 0x3f);
+ my $compression_level=6;
+ $badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16);
+ $badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE
+
+ substr ($_, 54, 4) = pack("N", $badflags);
+ # Replace the innodb_checksum_algorithm=none checksum
+ substr ($_, 0, 4) = pack("N", 0xdeadbeef);
+ substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef);
+ syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n";
+ close(FILE);
+}
diff --git a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
index 75cab775528..d9c0294faf5 100644
--- a/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
+++ b/mysql-test/suite/innodb/include/innodb_simulate_comp_failures.inc
@@ -5,19 +5,10 @@
--source include/not_embedded.inc
--source include/have_innodb.inc
---disable_query_log
-# record the file format in order to restore in the end.
---let $file_format_save = `SELECT @@innodb_file_format`
---let $file_format_max_save = `SELECT @@innodb_file_format_max`
--let $simulate_comp_failures_save = `SELECT @@innodb_simulate_comp_failures`
---disable_warnings
-DROP TABLE IF EXISTS t1;
-SET GLOBAL INNODB_FILE_FORMAT='Barracuda';
---enable_warnings
-
-# since this test generates lot of errors in log, suppress checking errors
-call mtr.add_suppression(".*");
+--disable_query_log
+call mtr.add_suppression("InnoDB: Simulating a compression failure for table `test`\\.`t1`");
--enable_query_log
# create the table with compressed pages of size 8K.
@@ -156,9 +147,6 @@ COMMIT;
# final cleanup
DROP TABLE t1;
-# restore innodb_file_format and innodb_file_format_max
-eval SET GLOBAL innodb_file_format = \"$file_format_save\";
-eval SET GLOBAL innodb_file_format_max = \"$file_format_max_save\";
eval SET GLOBAL innodb_simulate_comp_failures = $simulate_comp_failures_save;
--enable_query_log
diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
index 047be4dba34..93eca7ec060 100644
--- a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
+++ b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc
@@ -37,7 +37,6 @@ call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
-let $format = `select @@innodb_file_format`;
eval set global innodb_file_per_table = on;
let $WL6501_TMP_DIR = `select @@tmpdir`;
@@ -51,7 +50,6 @@ let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
--echo "1. Hit crash point while writing redo log."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -82,7 +80,6 @@ drop table t;
--echo "2. Hit crash point on completion of redo log write."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -115,7 +112,6 @@ drop table t;
--echo "3. Hit crash point while dropping indexes."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -144,7 +140,6 @@ drop table t;
#
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -174,7 +169,6 @@ drop table t;
#
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -209,7 +203,6 @@ drop table t;
--echo " of index is commenced."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -242,7 +235,6 @@ drop table t;
--echo "5. Hit crash point while creating indexes."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -271,7 +263,6 @@ drop table t;
#
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -300,7 +291,6 @@ drop table t;
#
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -334,7 +324,6 @@ drop table t;
--echo " in-memory dict."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -367,7 +356,6 @@ drop table t;
--echo "7. Hit crash point before/after log checkpoint is done."
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -395,7 +383,6 @@ drop table t;
#
use test;
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
SET innodb_strict_mode=OFF;
--disable_warnings
eval create $wl6501_temp table t (
@@ -426,5 +413,4 @@ drop table t;
#
# remove test-bed
#
-eval set global innodb_file_format = $format;
eval set global innodb_file_per_table = $per_table;
diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
index 76b7b5d59b5..edec93b875c 100644
--- a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
+++ b/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc
@@ -30,7 +30,6 @@ call mtr.add_suppression("does not exist in the InnoDB internal");
# create test-bed
#
let $per_table = `select @@innodb_file_per_table`;
-let $format = `select @@innodb_file_format`;
eval set global innodb_file_per_table = on;
let $WL6501_TMP_DIR = `select @@tmpdir`;
@@ -45,7 +44,6 @@ let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
--echo "1. Hit crash point on completing drop of all indexes before creation"
--echo " of index is commenced."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
set innodb_strict_mode=off;
--disable_warnings
eval create $wl6501_temp table t (
@@ -73,7 +71,6 @@ check table t;
--echo "2. Hit crash point after data is updated to system-table and"
--echo " in-memory dict."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
set innodb_strict_mode=off;
--disable_warnings
eval create $wl6501_temp table t (
@@ -98,5 +95,4 @@ check table t;
#
# remove test-bed
#
-eval set global innodb_file_format = $format;
eval set global innodb_file_per_table = $per_table;
diff --git a/mysql-test/suite/innodb/include/log_file_cleanup.inc b/mysql-test/suite/innodb/include/log_file_cleanup.inc
new file mode 100644
index 00000000000..ef57d58b788
--- /dev/null
+++ b/mysql-test/suite/innodb/include/log_file_cleanup.inc
@@ -0,0 +1,16 @@
+# Remove ibtmp* which are re-generated after each mysqld invocation
+# skip auto generated auto.cnf from list_files
+--remove_files_wildcard $bugdir ibtmp*
+--remove_files_wildcard $bugdir auto.cnf
+--list_files $bugdir
+--remove_files_wildcard $bugdir ibdata*
+--remove_files_wildcard $bugdir ib_logfile*
+--remove_files_wildcard $bugdir undo00*
+--copy_file $bugdir/bak_ibdata1 $bugdir/ibdata1
+--copy_file $bugdir/bak_ibdata2 $bugdir/ibdata2
+--copy_file $bugdir/bak_ib_logfile0 $bugdir/ib_logfile0
+--copy_file $bugdir/bak_ib_logfile1 $bugdir/ib_logfile1
+--copy_file $bugdir/bak_ib_logfile2 $bugdir/ib_logfile2
+--copy_file $bugdir/bak_undo001 $bugdir/undo001
+--copy_file $bugdir/bak_undo002 $bugdir/undo002
+--copy_file $bugdir/bak_undo003 $bugdir/undo003
diff --git a/mysql-test/suite/innodb/r/101_compatibility.result b/mysql-test/suite/innodb/r/101_compatibility.result
new file mode 100644
index 00000000000..bc4d37916df
--- /dev/null
+++ b/mysql-test/suite/innodb/r/101_compatibility.result
@@ -0,0 +1,47 @@
+#
+# MDEV-11623 MariaDB 10.1 fails to start datadir created with
+# MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K
+#
+CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT;
+CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+SET INNODB_STRICT_MODE=OFF;
+CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET INNODB_STRICT_MODE=ON;
+CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='MYSQL_TMP_DIR';
+CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1;
+CREATE TABLE ti(a INT) ENGINE=InnoDB;
+FLUSH TABLES ti FOR EXPORT;
+backup: ti
+UNLOCK TABLES;
+ALTER TABLE ti DISCARD TABLESPACE;
+restore: ti .ibd and .cfg files
+ALTER TABLE ti IMPORT TABLESPACE;
+BEGIN;
+INSERT INTO tr VALUES(1);
+INSERT INTO tc VALUES(1);
+INSERT INTO td VALUES(1);
+INSERT INTO tz VALUES(1);
+INSERT INTO tdd VALUES(1);
+INSERT INTO tp VALUES(1);
+INSERT INTO ti VALUES(1);
+# Kill the server
+CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
+Table Op Msg_type Msg_text
+test.tr check status OK
+test.tc check status OK
+test.td check status OK
+test.tz check status OK
+test.tdd check status OK
+test.tp check status OK
+test.ti check status OK
+CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
+Table Op Msg_type Msg_text
+test.tr check status OK
+test.tc check status OK
+test.td check status OK
+test.tz check status OK
+test.tdd check status OK
+test.tp check status OK
+test.ti check status OK
+DROP TABLE tr,tc,td,tz,tdd,tp,ti;
diff --git a/mysql-test/suite/innodb/r/alter_missing_tablespace.result b/mysql-test/suite/innodb/r/alter_missing_tablespace.result
new file mode 100644
index 00000000000..1517afd1a39
--- /dev/null
+++ b/mysql-test/suite/innodb/r/alter_missing_tablespace.result
@@ -0,0 +1,34 @@
+#
+# Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
+# OR DISCARDED TABLESPACES
+#
+SET GLOBAL innodb_file_per_table=1;
+CREATE TABLE t(a INT)ENGINE=InnoDB;
+CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+SELECT * FROM t;
+ERROR 42S02: Table 'test.t' doesn't exist in engine
+ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
+ERROR 42S02: Table 'test.t' doesn't exist in engine
+SHOW WARNINGS;
+Level Code Message
+Warning 1812 Tablespace is missing for table 'test/t'
+Error 1932 Table 'test.t' doesn't exist in engine
+ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
+ERROR 42S02: Table 'test.t1' doesn't exist
+SHOW WARNINGS;
+Level Code Message
+Error 1146 Table 'test.t1' doesn't exist
+ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1
+ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1
+ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DISCARD TABLESPACE' at line 1
+ALTER TABLE t DISCARD TABLESPACE;
+Warnings:
+Warning 1812 Tablespace is missing for table 'test/t'
+Warning 1812 Tablespace is missing for table 'test/t'
+DROP TABLE t;
+SELECT * FROM `x..d`;
+ERROR 42S02: Table 'test.x..d' doesn't exist in engine
+DROP TABLE `x..d`;
diff --git a/mysql-test/suite/innodb/r/doublewrite.result b/mysql-test/suite/innodb/r/doublewrite.result
index aa96a5f2d93..6b913f49972 100644
--- a/mysql-test/suite/innodb/r/doublewrite.result
+++ b/mysql-test/suite/innodb/r/doublewrite.result
@@ -39,6 +39,8 @@ set global innodb_buf_flush_list_now = 1;
# Kill the server
# Make the first page (page_no=0) of the user tablespace
# full of zeroes.
+#
+# MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer.
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/innodb/r/group_commit_crash.result b/mysql-test/suite/innodb/r/group_commit_crash.result
index 80a780ba2c5..f07df897453 100644
--- a/mysql-test/suite/innodb/r/group_commit_crash.result
+++ b/mysql-test/suite/innodb/r/group_commit_crash.result
@@ -1,4 +1,3 @@
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
c CHAR(255),
diff --git a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
index 06fdeaef6a7..2cd9f01d7ed 100644
--- a/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
+++ b/mysql-test/suite/innodb/r/group_commit_crash_no_optimize_thread.result
@@ -1,4 +1,3 @@
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
c CHAR(255),
diff --git a/mysql-test/suite/innodb/r/innodb-16k.result b/mysql-test/suite/innodb/r/innodb-16k.result
index 63637c6428f..206abe45887 100644
--- a/mysql-test/suite/innodb/r/innodb-16k.result
+++ b/mysql-test/suite/innodb/r/innodb-16k.result
@@ -1,8 +1,4 @@
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_large_prefix = OFF;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
@@ -229,9 +225,6 @@ FROM information_schema.tables WHERE table_name = 't1';
table_name row_format create_options
t1 Compressed row_format=COMPRESSED
DROP TABLE t1;
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8;
CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb;
INSERT INTO t3 VALUES (22),(44),(33),(55),(66);
@@ -422,10 +415,6 @@ t1 CREATE TABLE `t1` (
KEY `t1t` (`t`(767))
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
DROP TABLE t1;
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
Test an assertion failure on purge.
CREATE TABLE t1_purge (
A int,
@@ -466,10 +455,6 @@ DELETE FROM t1_purge;
DELETE FROM t2_purge;
DELETE FROM t3_purge;
DELETE FROM t4_purge;
-SET GLOBAL innodb_file_per_table=on;
-SET GLOBAL innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
v1 varchar(500), v2 varchar(500), v3 varchar(500),
@@ -984,6 +969,4 @@ COL197 TEXT)
row_format=compact,ENGINE=INNODB;
ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-32k-crash.result b/mysql-test/suite/innodb/r/innodb-32k-crash.result
index c9b21bf414a..1fd5cd9b521 100644
--- a/mysql-test/suite/innodb/r/innodb-32k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-32k-crash.result
@@ -1,6 +1,4 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
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,
@@ -161,58 +159,58 @@ COMMIT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` blob,
- `b` blob,
- `c` blob,
- `d` blob,
- `e` blob,
- `f` blob,
- `g` blob,
- `h` blob,
- `i` blob,
- `j` blob,
- `k` blob,
- `l` blob,
- `m` blob,
- `n` blob,
- `o` blob,
- `p` blob,
- `q` blob,
- `r` blob,
- `s` blob,
- `t` blob,
- `u` blob,
- `v` blob,
- `w` blob,
- `x` blob,
- `y` blob,
- `z` blob,
- `aa` blob,
- `ba` blob,
- `ca` blob,
- `da` blob,
- `ea` blob,
- `fa` blob,
- `ga` blob,
- `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,
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` blob DEFAULT NULL,
+ `f` blob DEFAULT NULL,
+ `g` blob DEFAULT NULL,
+ `h` blob DEFAULT NULL,
+ `i` blob DEFAULT NULL,
+ `j` blob DEFAULT NULL,
+ `k` blob DEFAULT NULL,
+ `l` blob DEFAULT NULL,
+ `m` blob DEFAULT NULL,
+ `n` blob DEFAULT NULL,
+ `o` blob DEFAULT NULL,
+ `p` blob DEFAULT NULL,
+ `q` blob DEFAULT NULL,
+ `r` blob DEFAULT NULL,
+ `s` blob DEFAULT NULL,
+ `t` blob DEFAULT NULL,
+ `u` blob DEFAULT NULL,
+ `v` blob DEFAULT NULL,
+ `w` blob DEFAULT NULL,
+ `x` blob DEFAULT NULL,
+ `y` blob DEFAULT NULL,
+ `z` blob DEFAULT NULL,
+ `aa` blob DEFAULT NULL,
+ `ba` blob DEFAULT NULL,
+ `ca` blob DEFAULT NULL,
+ `da` blob DEFAULT NULL,
+ `ea` blob DEFAULT NULL,
+ `fa` blob DEFAULT NULL,
+ `ga` blob DEFAULT NULL,
+ `ha` blob DEFAULT NULL,
+ `ia` blob DEFAULT NULL,
+ `ja` blob DEFAULT NULL,
+ `ka` blob DEFAULT NULL,
+ `la` blob DEFAULT NULL,
+ `ma` blob DEFAULT NULL,
+ `na` blob DEFAULT NULL,
+ `oa` blob DEFAULT NULL,
+ `pa` blob DEFAULT NULL,
+ `qa` blob DEFAULT NULL,
+ `ra` blob DEFAULT NULL,
+ `sa` blob DEFAULT NULL,
+ `ta` blob DEFAULT NULL,
+ `ua` blob DEFAULT NULL,
+ `va` blob DEFAULT NULL,
+ `wa` blob DEFAULT NULL,
+ `xa` blob DEFAULT NULL,
+ `ya` blob DEFAULT NULL,
+ `za` blob DEFAULT NULL,
KEY `t1a` (`a`(767)),
KEY `t1b` (`b`(767)),
KEY `t1c` (`c`(767)),
@@ -227,58 +225,58 @@ t1 CREATE TABLE `t1` (
show create table t2;
Table Create Table
t2 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,
- `v` blob,
- `w` blob,
- `x` blob,
- `y` blob,
- `z` blob,
- `aa` blob,
- `ba` blob,
- `ca` blob,
- `da` blob,
- `ea` blob,
- `fa` blob,
- `ga` blob,
- `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,
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` blob DEFAULT NULL,
+ `f` blob DEFAULT NULL,
+ `g` blob DEFAULT NULL,
+ `h` blob DEFAULT NULL,
+ `i` blob DEFAULT NULL,
+ `j` blob DEFAULT NULL,
+ `k` blob DEFAULT NULL,
+ `l` blob DEFAULT NULL,
+ `m` blob DEFAULT NULL,
+ `n` blob DEFAULT NULL,
+ `o` blob DEFAULT NULL,
+ `p` blob DEFAULT NULL,
+ `q` blob DEFAULT NULL,
+ `r` blob DEFAULT NULL,
+ `s` blob DEFAULT NULL,
+ `t` blob DEFAULT NULL,
+ `u` blob DEFAULT NULL,
+ `v` blob DEFAULT NULL,
+ `w` blob DEFAULT NULL,
+ `x` blob DEFAULT NULL,
+ `y` blob DEFAULT NULL,
+ `z` blob DEFAULT NULL,
+ `aa` blob DEFAULT NULL,
+ `ba` blob DEFAULT NULL,
+ `ca` blob DEFAULT NULL,
+ `da` blob DEFAULT NULL,
+ `ea` blob DEFAULT NULL,
+ `fa` blob DEFAULT NULL,
+ `ga` blob DEFAULT NULL,
+ `ha` blob DEFAULT NULL,
+ `ia` blob DEFAULT NULL,
+ `ja` blob DEFAULT NULL,
+ `ka` blob DEFAULT NULL,
+ `la` blob DEFAULT NULL,
+ `ma` blob DEFAULT NULL,
+ `na` blob DEFAULT NULL,
+ `oa` blob DEFAULT NULL,
+ `pa` blob DEFAULT NULL,
+ `qa` blob DEFAULT NULL,
+ `ra` blob DEFAULT NULL,
+ `sa` blob DEFAULT NULL,
+ `ta` blob DEFAULT NULL,
+ `ua` blob DEFAULT NULL,
+ `va` blob DEFAULT NULL,
+ `wa` blob DEFAULT NULL,
+ `xa` blob DEFAULT NULL,
+ `ya` blob DEFAULT NULL,
+ `za` blob DEFAULT NULL,
KEY `t1a` (`a`(767)),
KEY `t1b` (`b`(767)),
KEY `t1c` (`c`(767)),
diff --git a/mysql-test/suite/innodb/r/innodb-32k.result b/mysql-test/suite/innodb/r/innodb-32k.result
index 2253ba5588f..29374689a3b 100644
--- a/mysql-test/suite/innodb/r/innodb-32k.result
+++ b/mysql-test/suite/innodb/r/innodb-32k.result
@@ -1,9 +1,8 @@
-call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
-call mtr.add_suppression("InnoDB: Resizing redo log from *");
-call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files.");
-call mtr.add_suppression("InnoDB: New log files created, LSN=*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
+call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value ");
+call mtr.add_suppression("InnoDB: Resizing redo log from ");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created, LSN=");
+call mtr.add_suppression("Innodb: Cannot add field.*row size is");
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
@@ -234,7 +233,7 @@ v=@d,w=@d,x=@d,y=@d,z=@d,
aa=@d,ba=@d,ca=@d,da=@d,ea=@d,fa=@d,ga=@d,ha=@d,ia=@d,ja=@d,
ka=@d,la=@d,ma=@d,na=@d,oa=@d,pa=@d,qa=@d,ra=@d,sa=@d,ta=@d,ua=@d,
va=@d,wa=@d,xa=@d,ya=@d,za=@d;
-ERROR HY000: Undo log record is too big.
+ERROR HY000: Undo log record is too big
BEGIN;
UPDATE t1 SET a=@d,b=@d,c=@d,d=@d,e=@d;
UPDATE t1 SET f=@d,g=@d,h=@d,i=@d,j=@d;
@@ -278,7 +277,6 @@ CREATE INDEX tn1f9 ON t1 (oa(767));
CREATE INDEX to1f11 ON t1 (pa(767));
UPDATE t1 SET t=@e;
CREATE INDEX t1f6 ON t1 (l(767));
-ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 16318. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
drop table t1;
Test an assertion failure on purge.
CREATE TABLE t1_purge (
@@ -320,8 +318,6 @@ DELETE FROM t1_purge;
DELETE FROM t2_purge;
DELETE FROM t3_purge;
DELETE FROM t4_purge;
-SET GLOBAL innodb_file_per_table=on;
-SET GLOBAL innodb_file_format='Barracuda';
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
v1 varchar(500), v2 varchar(500), v3 varchar(500),
@@ -366,22 +362,22 @@ CREATE INDEX ndx_p ON tlong2 (p(500));
SHOW CREATE TABLE tlong2;
Table Create Table
tlong2 CREATE TABLE `tlong2` (
- `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,
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` blob DEFAULT NULL,
+ `f` blob DEFAULT NULL,
+ `g` blob DEFAULT NULL,
+ `h` blob DEFAULT NULL,
+ `i` blob DEFAULT NULL,
+ `j` blob DEFAULT NULL,
+ `k` blob DEFAULT NULL,
+ `l` blob DEFAULT NULL,
+ `m` blob DEFAULT NULL,
+ `n` blob DEFAULT NULL,
+ `o` blob DEFAULT NULL,
+ `p` blob DEFAULT NULL,
KEY `ndx_c` (`c`(500)),
KEY `ndx_d` (`d`(500)),
KEY `ndx_e` (`e`(500)),
@@ -665,203 +661,203 @@ set @b = repeat('zyxwvutsrqponmlkjihgfedcba', 2000);
show create table t2;
Table Create Table
t2 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
+ `COL1` text DEFAULT NULL,
+ `COL2` text DEFAULT NULL,
+ `COL3` text DEFAULT NULL,
+ `COL4` text DEFAULT NULL,
+ `COL5` text DEFAULT NULL,
+ `COL6` text DEFAULT NULL,
+ `COL7` text DEFAULT NULL,
+ `COL8` text DEFAULT NULL,
+ `COL9` text DEFAULT NULL,
+ `COL10` text DEFAULT NULL,
+ `COL11` text DEFAULT NULL,
+ `COL12` text DEFAULT NULL,
+ `COL13` text DEFAULT NULL,
+ `COL14` text DEFAULT NULL,
+ `COL15` text DEFAULT NULL,
+ `COL16` text DEFAULT NULL,
+ `COL17` text DEFAULT NULL,
+ `COL18` text DEFAULT NULL,
+ `COL19` text DEFAULT NULL,
+ `COL20` text DEFAULT NULL,
+ `COL21` text DEFAULT NULL,
+ `COL22` text DEFAULT NULL,
+ `COL23` text DEFAULT NULL,
+ `COL24` text DEFAULT NULL,
+ `COL25` text DEFAULT NULL,
+ `COL26` text DEFAULT NULL,
+ `COL27` text DEFAULT NULL,
+ `COL28` text DEFAULT NULL,
+ `COL29` text DEFAULT NULL,
+ `COL30` text DEFAULT NULL,
+ `COL31` text DEFAULT NULL,
+ `COL32` text DEFAULT NULL,
+ `COL33` text DEFAULT NULL,
+ `COL34` text DEFAULT NULL,
+ `COL35` text DEFAULT NULL,
+ `COL36` text DEFAULT NULL,
+ `COL37` text DEFAULT NULL,
+ `COL38` text DEFAULT NULL,
+ `COL39` text DEFAULT NULL,
+ `COL40` text DEFAULT NULL,
+ `COL41` text DEFAULT NULL,
+ `COL42` text DEFAULT NULL,
+ `COL43` text DEFAULT NULL,
+ `COL44` text DEFAULT NULL,
+ `COL45` text DEFAULT NULL,
+ `COL46` text DEFAULT NULL,
+ `COL47` text DEFAULT NULL,
+ `COL48` text DEFAULT NULL,
+ `COL49` text DEFAULT NULL,
+ `COL50` text DEFAULT NULL,
+ `COL51` text DEFAULT NULL,
+ `COL52` text DEFAULT NULL,
+ `COL53` text DEFAULT NULL,
+ `COL54` text DEFAULT NULL,
+ `COL55` text DEFAULT NULL,
+ `COL56` text DEFAULT NULL,
+ `COL57` text DEFAULT NULL,
+ `COL58` text DEFAULT NULL,
+ `COL59` text DEFAULT NULL,
+ `COL60` text DEFAULT NULL,
+ `COL61` text DEFAULT NULL,
+ `COL62` text DEFAULT NULL,
+ `COL63` text DEFAULT NULL,
+ `COL64` text DEFAULT NULL,
+ `COL65` text DEFAULT NULL,
+ `COL66` text DEFAULT NULL,
+ `COL67` text DEFAULT NULL,
+ `COL68` text DEFAULT NULL,
+ `COL69` text DEFAULT NULL,
+ `COL70` text DEFAULT NULL,
+ `COL71` text DEFAULT NULL,
+ `COL72` text DEFAULT NULL,
+ `COL73` text DEFAULT NULL,
+ `COL74` text DEFAULT NULL,
+ `COL75` text DEFAULT NULL,
+ `COL76` text DEFAULT NULL,
+ `COL77` text DEFAULT NULL,
+ `COL78` text DEFAULT NULL,
+ `COL79` text DEFAULT NULL,
+ `COL80` text DEFAULT NULL,
+ `COL81` text DEFAULT NULL,
+ `COL82` text DEFAULT NULL,
+ `COL83` text DEFAULT NULL,
+ `COL84` text DEFAULT NULL,
+ `COL85` text DEFAULT NULL,
+ `COL86` text DEFAULT NULL,
+ `COL87` text DEFAULT NULL,
+ `COL88` text DEFAULT NULL,
+ `COL89` text DEFAULT NULL,
+ `COL90` text DEFAULT NULL,
+ `COL91` text DEFAULT NULL,
+ `COL92` text DEFAULT NULL,
+ `COL93` text DEFAULT NULL,
+ `COL94` text DEFAULT NULL,
+ `COL95` text DEFAULT NULL,
+ `COL96` text DEFAULT NULL,
+ `COL97` text DEFAULT NULL,
+ `COL98` text DEFAULT NULL,
+ `COL99` text DEFAULT NULL,
+ `COL100` text DEFAULT NULL,
+ `COL101` text DEFAULT NULL,
+ `COL102` text DEFAULT NULL,
+ `COL103` text DEFAULT NULL,
+ `COL104` text DEFAULT NULL,
+ `COL105` text DEFAULT NULL,
+ `COL106` text DEFAULT NULL,
+ `COL107` text DEFAULT NULL,
+ `COL108` text DEFAULT NULL,
+ `COL109` text DEFAULT NULL,
+ `COL110` text DEFAULT NULL,
+ `COL111` text DEFAULT NULL,
+ `COL112` text DEFAULT NULL,
+ `COL113` text DEFAULT NULL,
+ `COL114` text DEFAULT NULL,
+ `COL115` text DEFAULT NULL,
+ `COL116` text DEFAULT NULL,
+ `COL117` text DEFAULT NULL,
+ `COL118` text DEFAULT NULL,
+ `COL119` text DEFAULT NULL,
+ `COL120` text DEFAULT NULL,
+ `COL121` text DEFAULT NULL,
+ `COL122` text DEFAULT NULL,
+ `COL123` text DEFAULT NULL,
+ `COL124` text DEFAULT NULL,
+ `COL125` text DEFAULT NULL,
+ `COL126` text DEFAULT NULL,
+ `COL127` text DEFAULT NULL,
+ `COL128` text DEFAULT NULL,
+ `COL129` text DEFAULT NULL,
+ `COL130` text DEFAULT NULL,
+ `COL131` text DEFAULT NULL,
+ `COL132` text DEFAULT NULL,
+ `COL133` text DEFAULT NULL,
+ `COL134` text DEFAULT NULL,
+ `COL135` text DEFAULT NULL,
+ `COL136` text DEFAULT NULL,
+ `COL137` text DEFAULT NULL,
+ `COL138` text DEFAULT NULL,
+ `COL139` text DEFAULT NULL,
+ `COL140` text DEFAULT NULL,
+ `COL141` text DEFAULT NULL,
+ `COL142` text DEFAULT NULL,
+ `COL143` text DEFAULT NULL,
+ `COL144` text DEFAULT NULL,
+ `COL145` text DEFAULT NULL,
+ `COL146` text DEFAULT NULL,
+ `COL147` text DEFAULT NULL,
+ `COL148` text DEFAULT NULL,
+ `COL149` text DEFAULT NULL,
+ `COL150` text DEFAULT NULL,
+ `COL151` text DEFAULT NULL,
+ `COL152` text DEFAULT NULL,
+ `COL153` text DEFAULT NULL,
+ `COL154` text DEFAULT NULL,
+ `COL155` text DEFAULT NULL,
+ `COL156` text DEFAULT NULL,
+ `COL157` text DEFAULT NULL,
+ `COL158` text DEFAULT NULL,
+ `COL159` text DEFAULT NULL,
+ `COL160` text DEFAULT NULL,
+ `COL161` text DEFAULT NULL,
+ `COL162` text DEFAULT NULL,
+ `COL163` text DEFAULT NULL,
+ `COL164` text DEFAULT NULL,
+ `COL165` text DEFAULT NULL,
+ `COL166` text DEFAULT NULL,
+ `COL167` text DEFAULT NULL,
+ `COL168` text DEFAULT NULL,
+ `COL169` text DEFAULT NULL,
+ `COL170` text DEFAULT NULL,
+ `COL171` text DEFAULT NULL,
+ `COL172` text DEFAULT NULL,
+ `COL173` text DEFAULT NULL,
+ `COL174` text DEFAULT NULL,
+ `COL175` text DEFAULT NULL,
+ `COL176` text DEFAULT NULL,
+ `COL177` text DEFAULT NULL,
+ `COL178` text DEFAULT NULL,
+ `COL179` text DEFAULT NULL,
+ `COL180` text DEFAULT NULL,
+ `COL181` text DEFAULT NULL,
+ `COL182` text DEFAULT NULL,
+ `COL183` text DEFAULT NULL,
+ `COL184` text DEFAULT NULL,
+ `COL185` text DEFAULT NULL,
+ `COL186` text DEFAULT NULL,
+ `COL187` text DEFAULT NULL,
+ `COL188` text DEFAULT NULL,
+ `COL189` text DEFAULT NULL,
+ `COL190` text DEFAULT NULL,
+ `COL191` text DEFAULT NULL,
+ `COL192` text DEFAULT NULL,
+ `COL193` text DEFAULT NULL,
+ `COL194` text DEFAULT NULL,
+ `COL195` text DEFAULT NULL,
+ `COL196` text DEFAULT NULL,
+ `COL197` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
update t2 set col150=@a;
update t2 set col145=@b;
diff --git a/mysql-test/suite/innodb/r/innodb-64k-crash.result b/mysql-test/suite/innodb/r/innodb-64k-crash.result
index 9371c4a09e5..7e2941b8e3b 100644
--- a/mysql-test/suite/innodb/r/innodb-64k-crash.result
+++ b/mysql-test/suite/innodb/r/innodb-64k-crash.result
@@ -1,6 +1,4 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
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,
@@ -347,110 +345,110 @@ COMMIT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` blob,
- `b` blob,
- `c` blob,
- `d` blob,
- `e` blob,
- `f` blob,
- `g` blob,
- `h` blob,
- `i` blob,
- `j` blob,
- `k` blob,
- `l` blob,
- `m` blob,
- `n` blob,
- `o` blob,
- `p` blob,
- `q` blob,
- `r` blob,
- `s` blob,
- `t` blob,
- `u` blob,
- `v` blob,
- `w` blob,
- `x` blob,
- `y` blob,
- `z` blob,
- `aa` blob,
- `ba` blob,
- `ca` blob,
- `da` blob,
- `ea` blob,
- `fa` blob,
- `ga` blob,
- `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,
- `ab` blob,
- `bb` blob,
- `cb` blob,
- `db` blob,
- `eb` blob,
- `fb` blob,
- `gb` blob,
- `hb` blob,
- `ib` blob,
- `jb` blob,
- `kb` blob,
- `lb` blob,
- `mb` blob,
- `nb` blob,
- `ob` blob,
- `pb` blob,
- `qb` blob,
- `rb` blob,
- `sb` blob,
- `tb` blob,
- `ub` blob,
- `vb` blob,
- `wb` blob,
- `xb` blob,
- `yb` blob,
- `zb` blob,
- `ac` blob,
- `bc` blob,
- `cc` blob,
- `dc` blob,
- `ec` blob,
- `fc` blob,
- `gc` blob,
- `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,
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` blob DEFAULT NULL,
+ `f` blob DEFAULT NULL,
+ `g` blob DEFAULT NULL,
+ `h` blob DEFAULT NULL,
+ `i` blob DEFAULT NULL,
+ `j` blob DEFAULT NULL,
+ `k` blob DEFAULT NULL,
+ `l` blob DEFAULT NULL,
+ `m` blob DEFAULT NULL,
+ `n` blob DEFAULT NULL,
+ `o` blob DEFAULT NULL,
+ `p` blob DEFAULT NULL,
+ `q` blob DEFAULT NULL,
+ `r` blob DEFAULT NULL,
+ `s` blob DEFAULT NULL,
+ `t` blob DEFAULT NULL,
+ `u` blob DEFAULT NULL,
+ `v` blob DEFAULT NULL,
+ `w` blob DEFAULT NULL,
+ `x` blob DEFAULT NULL,
+ `y` blob DEFAULT NULL,
+ `z` blob DEFAULT NULL,
+ `aa` blob DEFAULT NULL,
+ `ba` blob DEFAULT NULL,
+ `ca` blob DEFAULT NULL,
+ `da` blob DEFAULT NULL,
+ `ea` blob DEFAULT NULL,
+ `fa` blob DEFAULT NULL,
+ `ga` blob DEFAULT NULL,
+ `ha` blob DEFAULT NULL,
+ `ia` blob DEFAULT NULL,
+ `ja` blob DEFAULT NULL,
+ `ka` blob DEFAULT NULL,
+ `la` blob DEFAULT NULL,
+ `ma` blob DEFAULT NULL,
+ `na` blob DEFAULT NULL,
+ `oa` blob DEFAULT NULL,
+ `pa` blob DEFAULT NULL,
+ `qa` blob DEFAULT NULL,
+ `ra` blob DEFAULT NULL,
+ `sa` blob DEFAULT NULL,
+ `ta` blob DEFAULT NULL,
+ `ua` blob DEFAULT NULL,
+ `va` blob DEFAULT NULL,
+ `wa` blob DEFAULT NULL,
+ `xa` blob DEFAULT NULL,
+ `ya` blob DEFAULT NULL,
+ `za` blob DEFAULT NULL,
+ `ab` blob DEFAULT NULL,
+ `bb` blob DEFAULT NULL,
+ `cb` blob DEFAULT NULL,
+ `db` blob DEFAULT NULL,
+ `eb` blob DEFAULT NULL,
+ `fb` blob DEFAULT NULL,
+ `gb` blob DEFAULT NULL,
+ `hb` blob DEFAULT NULL,
+ `ib` blob DEFAULT NULL,
+ `jb` blob DEFAULT NULL,
+ `kb` blob DEFAULT NULL,
+ `lb` blob DEFAULT NULL,
+ `mb` blob DEFAULT NULL,
+ `nb` blob DEFAULT NULL,
+ `ob` blob DEFAULT NULL,
+ `pb` blob DEFAULT NULL,
+ `qb` blob DEFAULT NULL,
+ `rb` blob DEFAULT NULL,
+ `sb` blob DEFAULT NULL,
+ `tb` blob DEFAULT NULL,
+ `ub` blob DEFAULT NULL,
+ `vb` blob DEFAULT NULL,
+ `wb` blob DEFAULT NULL,
+ `xb` blob DEFAULT NULL,
+ `yb` blob DEFAULT NULL,
+ `zb` blob DEFAULT NULL,
+ `ac` blob DEFAULT NULL,
+ `bc` blob DEFAULT NULL,
+ `cc` blob DEFAULT NULL,
+ `dc` blob DEFAULT NULL,
+ `ec` blob DEFAULT NULL,
+ `fc` blob DEFAULT NULL,
+ `gc` blob DEFAULT NULL,
+ `hc` blob DEFAULT NULL,
+ `ic` blob DEFAULT NULL,
+ `jc` blob DEFAULT NULL,
+ `kc` blob DEFAULT NULL,
+ `lc` blob DEFAULT NULL,
+ `mc` blob DEFAULT NULL,
+ `nc` blob DEFAULT NULL,
+ `oc` blob DEFAULT NULL,
+ `pc` blob DEFAULT NULL,
+ `qc` blob DEFAULT NULL,
+ `rc` blob DEFAULT NULL,
+ `sc` blob DEFAULT NULL,
+ `tc` blob DEFAULT NULL,
+ `uc` blob DEFAULT NULL,
+ `vc` blob DEFAULT NULL,
+ `wc` blob DEFAULT NULL,
+ `xc` blob DEFAULT NULL,
+ `yc` blob DEFAULT NULL,
+ `zc` blob DEFAULT NULL,
KEY `t1a` (`a`(767),`b`(767)),
KEY `t1c` (`c`(767),`d`(767)),
KEY `t1e` (`e`(767),`f`(767)),
@@ -470,110 +468,110 @@ t1 CREATE TABLE `t1` (
show create table t2;
Table Create Table
t2 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,
- `v` blob,
- `w` blob,
- `x` blob,
- `y` blob,
- `z` blob,
- `aa` blob,
- `ba` blob,
- `ca` blob,
- `da` blob,
- `ea` blob,
- `fa` blob,
- `ga` blob,
- `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,
- `ab` blob,
- `bb` blob,
- `cb` blob,
- `db` blob,
- `eb` blob,
- `fb` blob,
- `gb` blob,
- `hb` blob,
- `ib` blob,
- `jb` blob,
- `kb` blob,
- `lb` blob,
- `mb` blob,
- `nb` blob,
- `ob` blob,
- `pb` blob,
- `qb` blob,
- `rb` blob,
- `sb` blob,
- `tb` blob,
- `ub` blob,
- `vb` blob,
- `wb` blob,
- `xb` blob,
- `yb` blob,
- `zb` blob,
- `ac` blob,
- `bc` blob,
- `cc` blob,
- `dc` blob,
- `ec` blob,
- `fc` blob,
- `gc` blob,
- `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,
+ `a` blob DEFAULT NULL,
+ `b` blob DEFAULT NULL,
+ `c` blob DEFAULT NULL,
+ `d` blob DEFAULT NULL,
+ `e` blob DEFAULT NULL,
+ `f` blob DEFAULT NULL,
+ `g` blob DEFAULT NULL,
+ `h` blob DEFAULT NULL,
+ `i` blob DEFAULT NULL,
+ `j` blob DEFAULT NULL,
+ `k` blob DEFAULT NULL,
+ `l` blob DEFAULT NULL,
+ `m` blob DEFAULT NULL,
+ `n` blob DEFAULT NULL,
+ `o` blob DEFAULT NULL,
+ `p` blob DEFAULT NULL,
+ `q` blob DEFAULT NULL,
+ `r` blob DEFAULT NULL,
+ `s` blob DEFAULT NULL,
+ `t` blob DEFAULT NULL,
+ `u` blob DEFAULT NULL,
+ `v` blob DEFAULT NULL,
+ `w` blob DEFAULT NULL,
+ `x` blob DEFAULT NULL,
+ `y` blob DEFAULT NULL,
+ `z` blob DEFAULT NULL,
+ `aa` blob DEFAULT NULL,
+ `ba` blob DEFAULT NULL,
+ `ca` blob DEFAULT NULL,
+ `da` blob DEFAULT NULL,
+ `ea` blob DEFAULT NULL,
+ `fa` blob DEFAULT NULL,
+ `ga` blob DEFAULT NULL,
+ `ha` blob DEFAULT NULL,
+ `ia` blob DEFAULT NULL,
+ `ja` blob DEFAULT NULL,
+ `ka` blob DEFAULT NULL,
+ `la` blob DEFAULT NULL,
+ `ma` blob DEFAULT NULL,
+ `na` blob DEFAULT NULL,
+ `oa` blob DEFAULT NULL,
+ `pa` blob DEFAULT NULL,
+ `qa` blob DEFAULT NULL,
+ `ra` blob DEFAULT NULL,
+ `sa` blob DEFAULT NULL,
+ `ta` blob DEFAULT NULL,
+ `ua` blob DEFAULT NULL,
+ `va` blob DEFAULT NULL,
+ `wa` blob DEFAULT NULL,
+ `xa` blob DEFAULT NULL,
+ `ya` blob DEFAULT NULL,
+ `za` blob DEFAULT NULL,
+ `ab` blob DEFAULT NULL,
+ `bb` blob DEFAULT NULL,
+ `cb` blob DEFAULT NULL,
+ `db` blob DEFAULT NULL,
+ `eb` blob DEFAULT NULL,
+ `fb` blob DEFAULT NULL,
+ `gb` blob DEFAULT NULL,
+ `hb` blob DEFAULT NULL,
+ `ib` blob DEFAULT NULL,
+ `jb` blob DEFAULT NULL,
+ `kb` blob DEFAULT NULL,
+ `lb` blob DEFAULT NULL,
+ `mb` blob DEFAULT NULL,
+ `nb` blob DEFAULT NULL,
+ `ob` blob DEFAULT NULL,
+ `pb` blob DEFAULT NULL,
+ `qb` blob DEFAULT NULL,
+ `rb` blob DEFAULT NULL,
+ `sb` blob DEFAULT NULL,
+ `tb` blob DEFAULT NULL,
+ `ub` blob DEFAULT NULL,
+ `vb` blob DEFAULT NULL,
+ `wb` blob DEFAULT NULL,
+ `xb` blob DEFAULT NULL,
+ `yb` blob DEFAULT NULL,
+ `zb` blob DEFAULT NULL,
+ `ac` blob DEFAULT NULL,
+ `bc` blob DEFAULT NULL,
+ `cc` blob DEFAULT NULL,
+ `dc` blob DEFAULT NULL,
+ `ec` blob DEFAULT NULL,
+ `fc` blob DEFAULT NULL,
+ `gc` blob DEFAULT NULL,
+ `hc` blob DEFAULT NULL,
+ `ic` blob DEFAULT NULL,
+ `jc` blob DEFAULT NULL,
+ `kc` blob DEFAULT NULL,
+ `lc` blob DEFAULT NULL,
+ `mc` blob DEFAULT NULL,
+ `nc` blob DEFAULT NULL,
+ `oc` blob DEFAULT NULL,
+ `pc` blob DEFAULT NULL,
+ `qc` blob DEFAULT NULL,
+ `rc` blob DEFAULT NULL,
+ `sc` blob DEFAULT NULL,
+ `tc` blob DEFAULT NULL,
+ `uc` blob DEFAULT NULL,
+ `vc` blob DEFAULT NULL,
+ `wc` blob DEFAULT NULL,
+ `xc` blob DEFAULT NULL,
+ `yc` blob DEFAULT NULL,
+ `zc` blob DEFAULT NULL,
KEY `t2a` (`a`(767),`b`(767)),
KEY `t2c` (`c`(767),`d`(767)),
KEY `t2e` (`e`(767),`f`(767)),
diff --git a/mysql-test/suite/innodb/r/innodb-64k.result b/mysql-test/suite/innodb/r/innodb-64k.result
index c84ad8caf88..9271ad70fb4 100644
--- a/mysql-test/suite/innodb/r/innodb-64k.result
+++ b/mysql-test/suite/innodb/r/innodb-64k.result
@@ -2,8 +2,6 @@ call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed fro
call mtr.add_suppression("InnoDB: Resizing redo log from *");
call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files.");
call mtr.add_suppression("InnoDB: New log files created, LSN=*");
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
diff --git a/mysql-test/suite/innodb/r/innodb-alter-discard.result b/mysql-test/suite/innodb/r/innodb-alter-discard.result
deleted file mode 100644
index b05b905bc34..00000000000
--- a/mysql-test/suite/innodb/r/innodb-alter-discard.result
+++ /dev/null
@@ -1,28 +0,0 @@
-call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
-SET GLOBAL innodb_file_per_table=1;
-CREATE TABLE t(a INT)ENGINE=InnoDB;
-call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
-call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
-call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
-call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
-call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
-call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
-call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
-call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
-call mtr.add_suppression("InnoDB: Table 'test/t'$");
-call mtr.add_suppression("Could not find a valid tablespace file for");
-call mtr.add_suppression("InnoDB: Tablespace open failed for '\"test\"\.\"t\"', ignored");
-call mtr.add_suppression("InnoDB: Failed to find tablespace for table '\"test\"\.\"t\"' in the cache");
-call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
-call mtr.add_suppression("Table .*t in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
-SELECT * FROM t;
-ERROR 42S02: Table 'test.t' doesn't exist in engine
-ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
-ERROR 42S02: Table 'test.t' doesn't exist in engine
-ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
-ERROR 42S02: Table 'test.t1' doesn't exist
-ALTER TABLE t DISCARD TABLESPACE;
-Warnings:
-Warning 1812 Tablespace is missing for table 'test/t'
-Warning 1812 Tablespace is missing for table 'test/t'
-DROP TABLE t;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
index 3cc973ca3a3..ce13ad0978b 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
@@ -4,10 +4,6 @@
# Temporary tablename will be unique. This makes sure that future
# in-place ALTERs of the same table will not be blocked due to
# temporary tablename.
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed
-");
-call mtr.add_suppression("InnoDB: file read of space .* page .*");
-call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer.");
# Crash the server in ha_innobase::commit_inplace_alter_table()
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug='d,innodb_alter_commit_crash_before_commit';
diff --git a/mysql-test/suite/innodb/r/innodb-bug-14068765.result b/mysql-test/suite/innodb/r/innodb-bug-14068765.result
index f6d37b23114..f7a2644cbf9 100644
--- a/mysql-test/suite/innodb/r/innodb-bug-14068765.result
+++ b/mysql-test/suite/innodb/r/innodb-bug-14068765.result
@@ -1,8 +1,3 @@
-DROP TABLE IF EXISTS t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
CREATE DATABASE testdb_wl5522;
CREATE TABLE testdb_wl5522.t1(col1 bit(1) , col2 boolean,col3 tinyint , col4 smallint , col5 mediumint ,col6 int , col7 bigint , col8 float (14,3) ,col9 double (14,3), col10 VARCHAR(20) CHARACTER SET utf8 , col11 TEXT CHARACTER SET binary , col12 ENUM('a','b','c') CHARACTER SET binary ,col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,col14 CHAR(20) , col15 VARBINARY (400) , col16 BINARY(40), col17 BLOB (400) , col18 int not null primary key,col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,col22 TIME , col23 YEAR ) ENGINE = Innodb;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
@@ -38,7 +33,3 @@ COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-bug-14084530.result b/mysql-test/suite/innodb/r/innodb-bug-14084530.result
index 3ba8e0e8440..b8e0e3a579d 100644
--- a/mysql-test/suite/innodb/r/innodb-bug-14084530.result
+++ b/mysql-test/suite/innodb/r/innodb-bug-14084530.result
@@ -1,8 +1,3 @@
-DROP TABLE IF EXISTS t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
SET AUTOCOMMIT = 0;
CREATE DATABASE testdb_wl5522;
CREATE TABLE testdb_wl5522.t1 (c1 int ) engine = Innodb;
@@ -24,10 +19,4 @@ Table Op Msg_type Msg_text
testdb_wl5522.t1 check status OK
SELECT c1 FROM testdb_wl5522.t1;
c1
-SET AUTOCOMMIT = 1;
-DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-fk-virtual.result b/mysql-test/suite/innodb/r/innodb-fk-virtual.result
new file mode 100644
index 00000000000..a79cd133aa3
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-fk-virtual.result
@@ -0,0 +1,86 @@
+create or replace table a (
+cola int(10) primary key,
+v_cola int(10) as (cola mod 10) virtual,
+p_cola int(10) as (cola mod 10) persistent
+) engine=innodb;
+create index v_cola on a (v_cola);
+create index p_cola on a (p_cola);
+create or replace table b(
+cola int(10),
+v_cola int(10),
+p_cola int(10),
+c_cola int(10) as (cola + 2) virtual
+) engine=innodb;
+alter table b add constraint `p_cola_fk`
+foreign key (p_cola) references a (p_cola)
+on delete restrict
+on update restrict;
+show warnings;
+Level Code Message
+show create table b;
+Table Create Table
+b CREATE TABLE `b` (
+ `cola` int(10) DEFAULT NULL,
+ `v_cola` int(10) DEFAULT NULL,
+ `p_cola` int(10) DEFAULT NULL,
+ `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL,
+ KEY `p_cola_fk` (`p_cola`),
+ CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table b add constraint `v_cola_fk`
+foreign key (v_cola) references a (v_cola)
+on delete restrict
+on update restrict;
+show warnings;
+Level Code Message
+show create table b;
+Table Create Table
+b CREATE TABLE `b` (
+ `cola` int(10) DEFAULT NULL,
+ `v_cola` int(10) DEFAULT NULL,
+ `p_cola` int(10) DEFAULT NULL,
+ `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL,
+ KEY `p_cola_fk` (`p_cola`),
+ KEY `v_cola_fk` (`v_cola`),
+ CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`),
+ CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+alter table b add constraint `c_cola_fk`
+foreign key (c_cola) references a (cola)
+on delete restrict
+on update restrict;
+show warnings;
+Level Code Message
+show create table b;
+Table Create Table
+b CREATE TABLE `b` (
+ `cola` int(10) DEFAULT NULL,
+ `v_cola` int(10) DEFAULT NULL,
+ `p_cola` int(10) DEFAULT NULL,
+ `c_cola` int(10) GENERATED ALWAYS AS (`cola` + 2) VIRTUAL,
+ KEY `p_cola_fk` (`p_cola`),
+ KEY `v_cola_fk` (`v_cola`),
+ KEY `c_cola_fk` (`c_cola`),
+ CONSTRAINT `c_cola_fk` FOREIGN KEY (`c_cola`) REFERENCES `a` (`cola`),
+ CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`),
+ CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into a(cola) values (12);
+select * from a;
+cola v_cola p_cola
+12 2 2
+insert into b(cola, v_cola, p_cola) values (10,2,2);
+select * from b;
+cola v_cola p_cola c_cola
+10 2 2 12
+insert into b(cola, v_cola, p_cola) values (10,1,1);
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `p_cola_fk` FOREIGN KEY (`p_cola`) REFERENCES `a` (`p_cola`))
+delete from a;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `c_cola_fk` FOREIGN KEY (`c_cola`) REFERENCES `a` (`cola`))
+select * from a;
+cola v_cola p_cola
+12 2 2
+select * from b;
+cola v_cola p_cola c_cola
+10 2 2 12
+drop table b, a;
diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result
index 2b5e7bf214d..1b7f44fa8c4 100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@ -1,7 +1,3 @@
-set global innodb_file_per_table=on;
-set global innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
create table t1(a varchar(2) primary key) engine=innodb;
insert into t1 values('');
@@ -858,13 +854,6 @@ explain select * from t1 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 2 Using index
drop table t1;
-set global innodb_file_per_table=1;
-set global innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_format_max=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
@@ -1195,7 +1184,3 @@ t2c CREATE TABLE `t2c` (
KEY `t2a` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t2c,t2i;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-Warnings:
-Warning 131 Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
index a566c94bd3b..61507ddbe5c 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_bzip2.result
@@ -1,7 +1,3 @@
-set global innodb_file_format = `barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 5;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
@@ -437,5 +433,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
index 76cd5b16f28..6cef1978ca0 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lz4.result
@@ -1,7 +1,3 @@
-set global innodb_file_format = `barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 2;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
@@ -438,5 +434,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
index cceff820ee0..c7ab859e102 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzma.result
@@ -1,7 +1,3 @@
-set global innodb_file_format = `barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 4;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
@@ -437,5 +433,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
index 1a9235fab62..379abcc9968 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_lzo.result
@@ -1,7 +1,3 @@
-set global innodb_file_format = `barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = on;
set global innodb_compression_algorithm = 3;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
@@ -351,5 +347,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
index e1d46b04a7f..442885755fd 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result
@@ -1,102 +1,98 @@
-call mtr.add_suppression("Compression failed for space*");
-set global innodb_file_format = `barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = on;
+call mtr.add_suppression("InnoDB: Compression failed for space.*");
set global innodb_compression_algorithm = 6;
-create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
+create table innodb_compressed(c1 int, b char(200)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
Level Code Message
-create table innodb_normal (c1 int, b char(20)) engine=innodb;
+create table innodb_normal (c1 int, b char(200)) engine=innodb;
show warnings;
Level Code Message
-create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1;
+create table innodb_page_compressed1 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=1;
show warnings;
Level Code Message
show create table innodb_page_compressed1;
Table Create Table
innodb_page_compressed1 CREATE TABLE `innodb_page_compressed1` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=1
-create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2;
+create table innodb_page_compressed2 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=2;
show warnings;
Level Code Message
show create table innodb_page_compressed2;
Table Create Table
innodb_page_compressed2 CREATE TABLE `innodb_page_compressed2` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=2
-create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3;
+create table innodb_page_compressed3 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=3;
show warnings;
Level Code Message
show create table innodb_page_compressed3;
Table Create Table
innodb_page_compressed3 CREATE TABLE `innodb_page_compressed3` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=3
-create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4;
+create table innodb_page_compressed4 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=4;
show warnings;
Level Code Message
show create table innodb_page_compressed4;
Table Create Table
innodb_page_compressed4 CREATE TABLE `innodb_page_compressed4` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=4
-create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5;
+create table innodb_page_compressed5 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=5;
show warnings;
Level Code Message
show create table innodb_page_compressed5;
Table Create Table
innodb_page_compressed5 CREATE TABLE `innodb_page_compressed5` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=5
-create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6;
+create table innodb_page_compressed6 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=6;
show warnings;
Level Code Message
show create table innodb_page_compressed6;
Table Create Table
innodb_page_compressed6 CREATE TABLE `innodb_page_compressed6` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=6
-create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7;
+create table innodb_page_compressed7 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=7;
show warnings;
Level Code Message
show create table innodb_page_compressed7;
Table Create Table
innodb_page_compressed7 CREATE TABLE `innodb_page_compressed7` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=7
-create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8;
+create table innodb_page_compressed8 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=8;
show warnings;
Level Code Message
show create table innodb_page_compressed8;
Table Create Table
innodb_page_compressed8 CREATE TABLE `innodb_page_compressed8` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8
-create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9;
+create table innodb_page_compressed9 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=9;
show warnings;
Level Code Message
show create table innodb_page_compressed9;
Table Create Table
innodb_page_compressed9 CREATE TABLE `innodb_page_compressed9` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=9
create procedure innodb_insert_proc (repeat_count int)
begin
declare current_num int;
set current_num = 0;
while current_num < repeat_count do
-insert into innodb_normal values(current_num,'testing..');
+insert into innodb_normal values(current_num,'aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc');
set current_num = current_num + 1;
end while;
end//
@@ -159,7 +155,7 @@ show create table innodb_normal;
Table Create Table
innodb_normal CREATE TABLE `innodb_normal` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8
alter table innodb_compressed row_format=default page_compressed=1 page_compression_level=8 key_block_size=0;
show warnings;
@@ -168,7 +164,7 @@ show create table innodb_compressed;
Table Create Table
innodb_compressed CREATE TABLE `innodb_compressed` (
`c1` int(11) DEFAULT NULL,
- `b` char(20) DEFAULT NULL
+ `b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_compressed`=1 `page_compression_level`=8
update innodb_page_compressed1 set c1 = c1 + 1;
update innodb_page_compressed2 set c1 = c1 + 1;
@@ -438,5 +434,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
index 7d825e73aa4..94420e5397d 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_tables.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_compressed=1;
@@ -92,10 +88,6 @@ count(*)
select count(*) from innodb_dynamic where c1 < 1500000;
count(*)
5000
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 0;
alter table innodb_compact engine=innodb page_compressed=DEFAULT;
alter table innodb_dynamic engine=innodb page_compressed=DEFAULT;
@@ -149,5 +141,3 @@ DROP TABLE no_compression;
DROP TABLE default_compression;
DROP TABLE explicit_no_compression;
SET SESSION innodb_compression_default = 0;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
index a8078c02e13..bb9ceb29e17 100644
--- a/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
+++ b/mysql-test/suite/innodb/r/innodb-page_compression_zip.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
set global innodb_compression_algorithm = 1;
create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
@@ -351,5 +347,3 @@ drop table innodb_page_compressed6;
drop table innodb_page_compressed7;
drop table innodb_page_compressed8;
drop table innodb_page_compressed9;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb-trim.result b/mysql-test/suite/innodb/r/innodb-trim.result
new file mode 100644
index 00000000000..40eac2f8b40
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-trim.result
@@ -0,0 +1,20 @@
+set global innodb_compression_algorithm = 1;
+create table innodb_page_compressed (c1 int not null primary key auto_increment, b char(200), c char(200), d char(200)) engine=innodb page_compressed=1 page_compression_level=9;
+show warnings;
+Level Code Message
+create procedure innodb_insert_proc (repeat_count int)
+begin
+declare current_num int;
+set current_num = 0;
+while current_num < repeat_count do
+insert into innodb_page_compressed values (NULL,repeat('A',150),repeat('AB',75),repeat('B', 175));
+set current_num = current_num + 1;
+end while;
+end//
+commit;
+set autocommit=0;
+call innodb_insert_proc(16000);
+commit;
+set autocommit=1;
+DROP PROCEDURE innodb_insert_proc;
+DROP TABLE innodb_page_compressed;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-1.result b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
index 0660ee1fae2..b2a5f49a9ad 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-1.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-1.result
@@ -1,18 +1,4 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
-DROP TABLE IF EXISTS t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
-DROP DATABASE IF EXISTS testdb_wl5522;
-Warnings:
-Note 1008 Can't drop database 'testdb_wl5522'; database doesn't exist
CREATE DATABASE testdb_wl5522;
CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb;
INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331);
@@ -44,37 +30,37 @@ CREATE TABLE testdb_wl5522.t1 (
col1 BIT(1),
col2 BOOLEAN,
col3 TINYINT,
-col4 SMALLINT,
+col4 SMALLINT,
col5 MEDIUMINT,
col6 INT,
-col7 BIGINT,
+col7 BIGINT,
col8 FLOAT (14,3) ,
-col9 DOUBLE (14,3),
-col10 VARCHAR(20),
+col9 DOUBLE (14,3),
+col10 VARCHAR(20),
col11 TEXT ,
col12 ENUM('a','b','c'),
col13 TEXT,
-col14 CHAR(20) ,
-col15 VARBINARY (400) ,
-col16 BINARY(40),
-col17 BLOB (400) ,
+col14 CHAR(20),
+col15 VARBINARY (400),
+col16 BINARY(40),
+col17 BLOB (400),
col18 INT NOT NULL PRIMARY KEY,
-col19 DATE ,
-col20 DATETIME ,
-col21 TIMESTAMP ,
-col22 TIME ,
+col19 DATE,
+col20 DATETIME,
+col21 TIMESTAMP,
+col22 TIME,
col23 YEAR ) ENGINE = Innodb;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10));
CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12);
CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8);
-INSERT INTO testdb_wl5522.t1 VALUES
+INSERT INTO testdb_wl5522.t1 VALUES
(1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222,
-92233720368.222,'aaa', + 'aaaaaaaaaa','b','bbbbb','ccccc',
REPEAT('d',40),REPEAT('d',40),REPEAT('d',40),1,'1000-01-01',
'3000-12-31 23:59:59.99','1990-01-01 00:00:01.00',
'01:59:59.00','1901');
-INSERT INTO testdb_wl5522.t1 VALUES
+INSERT INTO testdb_wl5522.t1 VALUES
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL);
INSERT INTO testdb_wl5522.t1 VALUES (NULL,NULL,NULL,NULL,NULL,NULL,NULL,
@@ -112,7 +98,7 @@ col18 INT NOT NULL PRIMARY KEY,
col19 DATE ,
col20 DATETIME ,
col21 TIMESTAMP ,
-col22 TIME ,
+col22 TIME,
col23 YEAR ) ENGINE = Innodb;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10));
@@ -128,9 +114,6 @@ SELECT COUNT(*) FROM testdb_wl5522.t1;
COUNT(*)
2
DROP TABLE testdb_wl5522.t1;
-SET GLOBAL innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
CREATE TABLE testdb_wl5522.t1 (
col_1_varbinary VARBINARY (4000) ,
col_2_varchar VARCHAR (4000),
@@ -143,13 +126,13 @@ col_7_binary BINARY (255)
INSERT INTO testdb_wl5522.t1 VALUES(
REPEAT('a', 4000),REPEAT('o', 4000),REPEAT('a', 4000), REPEAT('o', 4000),
REPEAT('a', 4000),REPEAT('a', 4000),REPEAT('a', 255));
-SELECT col_1_varbinary = REPEAT("a", 4000) ,
+SELECT col_1_varbinary = REPEAT("a", 4000),
col_2_varchar = REPEAT("o", 4000) ,
col_3_text = REPEAT("a", 4000) ,
col_4_blob = REPEAT("o", 4000) ,
col_5_text = REPEAT("a", 4000) ,
col_6_varchar = REPEAT("a", 4000) ,
-col_7_binary = REPEAT("a", 255)
+col_7_binary = REPEAT("a", 255)
FROM testdb_wl5522.t1;
col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) col_3_text = REPEAT("a", 4000) col_4_blob = REPEAT("o", 4000) col_5_text = REPEAT("a", 4000) col_6_varchar = REPEAT("a", 4000) col_7_binary = REPEAT("a", 255)
1 1 1 1 1 1 1
@@ -175,14 +158,14 @@ col_3_text = REPEAT("a", 4000) ,
col_4_blob = REPEAT("o", 4000) ,
col_5_text = REPEAT("a", 4000) ,
col_6_varchar = REPEAT("a", 4000) ,
-col_7_binary = REPEAT("a", 255)
+col_7_binary = REPEAT("a", 255)
FROM testdb_wl5522.t1;
col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) col_3_text = REPEAT("a", 4000) col_4_blob = REPEAT("o", 4000) col_5_text = REPEAT("a", 4000) col_6_varchar = REPEAT("a", 4000) col_7_binary = REPEAT("a", 255)
1 1 1 1 1 1 1
DROP TABLE testdb_wl5522.t1;
CREATE TABLE testdb_wl5522.t1 (
col_1_int INT AUTO_INCREMENT,
-col_2_varchar VARCHAR (20),
+col_2_varchar VARCHAR (20),
PRIMARY KEY (col_1_int)) ENGINE = Innodb;
INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3');
INSERT INTO testdb_wl5522.t1 (col_2_varchar) VALUES ('a4'),('a5'),('a6');
@@ -245,7 +228,7 @@ col_1_int INT,col_2_varchar VARCHAR (20),
PRIMARY KEY (col_2_varchar)) ENGINE = Innodb;
CREATE TABLE testdb_wl5522.t1_fk (
col_1_int INT,col_2_varchar VARCHAR (20),
-PRIMARY KEY (col_1_int),
+PRIMARY KEY (col_1_int),
FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar)
) ENGINE = Innodb;
INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3'),(4,'a4'),(5,'a5');
@@ -702,19 +685,19 @@ DROP TABLE testdb_wl5522.t1;
SET AUTOCOMMIT = 1;
CREATE TABLE testdb_wl5522.t1(col1 bit(1) ,
col2 boolean,col3 tinyint , col4 smallint ,
-col5 mediumint ,col6 int , col7 bigint ,
+col5 mediumint ,col6 int , col7 bigint ,
col8 float (14,3) ,col9 double (14,3),
col10 VARCHAR(20) CHARACTER SET utf8 ,
col11 TEXT CHARACTER SET binary ,
col12 ENUM('a','b','c') CHARACTER SET binary,
col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,
col14 CHAR(20) , col15 VARBINARY (400),
-col16 BINARY(40), col17 BLOB (400),
+col16 BINARY(40), col17 BLOB (400),
col18 int not null primary key,
col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,
col22 TIME , col23 YEAR ) ENGINE = Innodb;
CREATE TABLE testdb_wl5522.trigger_table ( i int ) ENGINE = Innodb;
-CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1
+CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1
FOR EACH ROW INSERT INTO testdb_wl5522.trigger_table VALUES(NEW.col18);
CREATE OR REPLACE VIEW testdb_wl5522.VW1 AS SELECT * FROM testdb_wl5522.t1;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
@@ -812,7 +795,3 @@ DROP DATABASE testdb_wl5522;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
index cb19c66914e..cb01e5d2465 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
@@ -1,27 +1,10 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
-call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted in file: .* ");
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
-call mtr.add_suppression("InnoDB: Page for tablespace .* ");
-flush tables;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
+call mtr.add_suppression("InnoDB: Page for tablespace ");
+call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x");
+FLUSH TABLES;
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
-@@SESSION.innodb_strict_mode
-1
-DROP DATABASE IF EXISTS test_wl5522;
-Warnings:
-Note 1008 Can't drop database 'test_wl5522'; database doesn't exist
CREATE DATABASE test_wl5522;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
ROW_FORMAT=COMPRESSED;
@@ -53,20 +36,7 @@ unlink: t1.cfg
# Restart and reconnect to the server
SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
DROP TABLE test_wl5522.t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
-@@SESSION.innodb_strict_mode
-1
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
ROW_FORMAT=COMPRESSED;
ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
@@ -575,7 +545,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Unsupported
+ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
@@ -587,8 +557,3 @@ set global innodb_monitor_enable = default;
set global innodb_monitor_disable = default;
set global innodb_monitor_reset = default;
set global innodb_monitor_reset_all = default;
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET SESSION innodb_strict_mode=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 8327ef36909..698950e0d1d 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -2,13 +2,13 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
-call mtr.add_suppression("InnoDB: Tablespace flags: .*");
call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened.");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*");
-call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
-call mtr.add_suppression("InnoDB: Page for tablespace .* ");
-flush tables;
+call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
+call mtr.add_suppression("InnoDB: Page for tablespace ");
+call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
+FLUSH TABLES;
SET GLOBAL innodb_file_per_table = 1;
SELECT @@innodb_file_per_table;
@@innodb_file_per_table
@@ -921,7 +921,7 @@ ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
-ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Unsupported
+ERROR HY000: Internal error: Cannot reset LSNs in table `test_wl5522`.`t1` : Data structure corruption
SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
DROP TABLE test_wl5522.t1;
unlink: t1.ibd
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
index 42b2b6a527b..54f4bcc8c1f 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
@@ -1,19 +1,5 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
-DROP TABLE IF EXISTS t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
-@@SESSION.innodb_strict_mode
-1
CREATE TABLE t1
(a INT AUTO_INCREMENT PRIMARY KEY,
b char(22),
@@ -107,20 +93,7 @@ a b c
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
DROP TABLE t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
-@@SESSION.innodb_strict_mode
-1
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
@@ -213,7 +186,7 @@ COUNT(*)
DROP TABLE t1;
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
-c2 INT, INDEX(c2)) ENGINE=InnoDB
+c2 INT, INDEX(c2)) ENGINE=InnoDB
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
INSERT INTO t1(c2) VALUES(1);
INSERT INTO t1(c2) SELECT c2 FROM t1;
@@ -500,8 +473,3 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
-SET SESSION innodb_strict_mode=1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522.result b/mysql-test/suite/innodb/r/innodb-wl5522.result
index 2f8f56e9550..2ae994e8f3d 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522.result
@@ -1,15 +1,5 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
-DROP TABLE IF EXISTS t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
+FLUSH TABLES;
CREATE TABLE t1
(a INT AUTO_INCREMENT PRIMARY KEY,
b char(22),
@@ -103,16 +93,6 @@ a b c
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
DROP TABLE t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-@@innodb_file_per_table
-1
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SELECT @@innodb_file_format;
-@@innodb_file_format
-Barracuda
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
c2 INT) ENGINE=InnoDB;
@@ -1034,7 +1014,4 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
-SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL INNODB_FILE_PER_TABLE=1;
+FLUSH TABLES;
diff --git a/mysql-test/suite/innodb/r/innodb_blob_truncate.result b/mysql-test/suite/innodb/r/innodb_blob_truncate.result
index a71dd7678c0..b10d4a94eb7 100644
--- a/mysql-test/suite/innodb/r/innodb_blob_truncate.result
+++ b/mysql-test/suite/innodb/r/innodb_blob_truncate.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format = `Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table = ON;
create table t1(a blob) engine=innodb key_block_size=8;
create function generate_blob()
returns varchar(20000)
@@ -19,5 +15,3 @@ truncate t1;
insert into t1 select generate_blob();
drop table t1;
drop function generate_blob;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_bug59641.result b/mysql-test/suite/innodb/r/innodb_bug59641.result
index f22d39654de..2c042585745 100644
--- a/mysql-test/suite/innodb/r/innodb_bug59641.result
+++ b/mysql-test/suite/innodb/r/innodb_bug59641.result
@@ -1,5 +1,3 @@
-call mtr.add_suppression("Found 3 prepared XA transactions");
-flush tables;
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
COMMIT;
@@ -8,20 +6,18 @@ INSERT INTO t VALUES(1,1);
XA END '123';
XA PREPARE '123';
CONNECT con1,localhost,root,,;
-connection con1;
XA START '456';
INSERT INTO t VALUES(3,47),(5,67);
UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
XA END '456';
XA PREPARE '456';
CONNECT con2,localhost,root,,;
-connection con2;
XA START '789';
UPDATE t SET b=4*a WHERE a=32;
XA END '789';
XA PREPARE '789';
CONNECT con3,localhost,root,,;
-connection con3;
+# Kill and restart
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
a b
diff --git a/mysql-test/suite/innodb/r/innodb_monitor.result b/mysql-test/suite/innodb/r/innodb_monitor.result
index 0a163193b58..263da6070b2 100644
--- a/mysql-test/suite/innodb/r/innodb_monitor.result
+++ b/mysql-test/suite/innodb/r/innodb_monitor.result
@@ -181,16 +181,8 @@ compress_pages_decompressed disabled
compression_pad_increments disabled
compression_pad_decrements disabled
compress_saved disabled
-compress_trim_sect512 disabled
-compress_trim_sect1024 disabled
-compress_trim_sect2048 disabled
-compress_trim_sect4096 disabled
-compress_trim_sect8192 disabled
-compress_trim_sect16384 disabled
-compress_trim_sect32768 disabled
compress_pages_page_compressed disabled
compress_page_compressed_trim_op disabled
-compress_page_compressed_trim_op_saved disabled
compress_pages_page_decompressed disabled
compress_pages_page_compression_error disabled
compress_pages_encrypted disabled
diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
index 5ae138477b9..a3ac78aadce 100644
--- a/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
+++ b/mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
@@ -1,11 +1,6 @@
-set global innodb_file_format="Barracuda";
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-DROP TABLE IF EXISTS worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
PRIMARY KEY (col_1_text(3072))
@@ -92,10 +87,6 @@ worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
DROP TABLE worklog5743;
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
index 4875dfaeb2a..f515cb047f1 100644
--- a/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
+++ b/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result
@@ -216,16 +216,8 @@ compress_pages_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL N
compression_pad_increments compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is incremented to avoid compression failures
compression_pad_decrements compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of times padding is decremented due to good compressibility
compress_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of bytes saved by page compression
-compress_trim_sect512 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-512 TRIMed by page compression
-compress_trim_sect1024 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-1024 TRIMed by page compression
-compress_trim_sect2048 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-2048 TRIMed by page compression
-compress_trim_sect4096 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-4K TRIMed by page compression
-compress_trim_sect8192 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-8K TRIMed by page compression
-compress_trim_sect16384 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-16K TRIMed by page compression
-compress_trim_sect32768 compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of sect-32K TRIMed by page compression
compress_pages_page_compressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages compressed by page compression
compress_page_compressed_trim_op compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of TRIM operation performed by page compression
-compress_page_compressed_trim_op_saved compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of TRIM operation saved by page compression
compress_pages_page_decompressed compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages decompressed by page compression
compress_pages_page_compression_error compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of page compression errors
compress_pages_encrypted compression 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of pages encrypted
diff --git a/mysql-test/suite/innodb/r/log_alter_table.result b/mysql-test/suite/innodb/r/log_alter_table.result
new file mode 100644
index 00000000000..f1ee61e7572
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_alter_table.result
@@ -0,0 +1,16 @@
+#
+# Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
+# FILES ARE CREATED
+#
+# Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN
+# REDO LOGGING IS SKIPPED
+#
+CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,2);
+ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+ALTER TABLE t1 DROP INDEX b, ADD INDEX (b);
+# Kill the server
+CHECK TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_corruption.result b/mysql-test/suite/innodb/r/log_corruption.result
new file mode 100644
index 00000000000..64a8824189f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_corruption.result
@@ -0,0 +1,19 @@
+# redo log from before MySQL 5.7.9
+# redo log from before MySQL 5.7.9, with corrupted log checkpoint
+# redo log from before MySQL 5.7.9, with corrupted log block
+# redo log from "after" MySQL 5.7.9, but with invalid header checksum
+# distant future redo log format, with valid header checksum
+# valid header, but old-format checkpoint blocks
+# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
+# --innodb-force-recovery=6 (skip the entire redo log)
+# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
+# --innodb-force-recovery=6 (skip the entire redo log)
+# Test a corrupted MLOG_FILE_NAME record.
+# valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
+# Test a corrupted MLOG_FILE_NAME record.
+# valid header, invalid checkpoint 1, valid checkpoint 2
+ib_logfile0
+ib_logfile1
+ibdata1
+my.cnf
+my_restart.err
diff --git a/mysql-test/suite/innodb/r/log_file.result b/mysql-test/suite/innodb/r/log_file.result
new file mode 100644
index 00000000000..a1ebdf037fa
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_file.result
@@ -0,0 +1,344 @@
+# Testcase for the following bugs
+# Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
+# Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
+# Write tmp/log_file/my.cnf
+# Start mysqld without the possibility to create innodb_undo_tablespaces
+# Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
+my.cnf
+my_restart.err
+# Start mysqld with non existent innodb_log_group_home_dir
+# Remove ibdata1 & ibdata2
+my.cnf
+my_restart.err
+# Start mysqld to create tablespaces according to my.cnf
+# Backup tmp/logfile/*
+# 1. With ibdata2, Without ibdata1
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# 2. With ibdata1, without ibdata2
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# 3. Without ibdata1 & ibdata2
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# 4. Without ibdata*, ib_logfile* and with undo00*
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# 5. Without ibdata*,ib_logfile* files & Without undo002
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo001
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo001
+undo003
+# 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+my.cnf
+my_restart.err
+undo003
+# 7. With ibdata files & Without undo002
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo003
+# 8. With ibdata files & Without undo001, undo002
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo003
+# 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile2
+my.cnf
+my_restart.err
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile2
+my.cnf
+my_restart.err
+# 11. With ibdata*, without ib_logfile1
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# 12. With ibdata*, without ib_logfile2
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
+# Cleanup
+bak_ib_logfile0
+bak_ib_logfile1
+bak_ib_logfile2
+bak_ibdata1
+bak_ibdata2
+bak_undo001
+bak_undo002
+bak_undo003
+ib_buffer_pool
+ib_logfile0
+ib_logfile1
+ib_logfile2
+ibdata1
+ibdata2
+my.cnf
+my_restart.err
+undo001
+undo002
+undo003
diff --git a/mysql-test/suite/innodb/r/log_file_name.result b/mysql-test/suite/innodb/r/log_file_name.result
new file mode 100644
index 00000000000..84107403cf2
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_file_name.result
@@ -0,0 +1,77 @@
+SET GLOBAL innodb_file_per_table=ON;
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t3(a INT PRIMARY KEY) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t3 VALUES (33101),(347);
+INSERT INTO t1 VALUES (42),(9),(101);
+RENAME TABLE t1 TO t2;
+UPDATE t2 SET a=347 where a=42;
+COMMIT;
+# Kill the server
+# Fault 0 (no real fault): Orphan file with duplicate space_id.
+# Fault 1: Two dirty files with the same space_id.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# Fault 2: Wrong space_id in a dirty file, and a missing file.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# Fault 3: Wrong space_id in a dirty file, and no missing file.
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# Fault 4: Missing data file
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# Fault 5: Wrong type of data file
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+SELECT * FROM t2;
+a
+9
+101
+347
+SELECT * FROM t3;
+a
+347
+33101
+SHOW TABLES;
+Tables_in_test
+t2
+t3
+DROP TABLE t2,t3;
+CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB;
+ERROR HY000: Tablespace for table '`test`.`t0`' exists. Please DISCARD the tablespace before IMPORT
+CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB;
+DROP TABLE t0;
+CREATE TABLE u1(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u2(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u3(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u4(a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO u4 VALUES(1);
+RENAME TABLE u4 TO u5;
+RENAME TABLE u5 TO u6;
+INSERT INTO u6 VALUES(2);
+# Kill the server
+# Fault 6: All-zero data file and innodb_force_recovery
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+# Fault 7: Missing or wrong data file and innodb_force_recovery
+SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+DROP TABLE u1,u2,u3,u6;
+# List of files:
+SHOW TABLES;
+Tables_in_test
diff --git a/mysql-test/suite/innodb/r/log_file_name_debug.result b/mysql-test/suite/innodb/r/log_file_name_debug.result
new file mode 100644
index 00000000000..e82feef870c
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_file_name_debug.result
@@ -0,0 +1,8 @@
+#
+# Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME
+# IF THERE ARE NO OPERATIONS TO APPLY
+#
+SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+# Kill the server
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_file_size.result b/mysql-test/suite/innodb/r/log_file_size.result
new file mode 100644
index 00000000000..b73862af7c4
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_file_size.result
@@ -0,0 +1,54 @@
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES (42);
+# Kill and restart: --innodb-log-file-size=6M
+SELECT * FROM t1;
+a
+INSERT INTO t1 VALUES (42);
+BEGIN;
+DELETE FROM t1;
+# Kill and restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M
+SELECT * FROM t1;
+a
+42
+INSERT INTO t1 VALUES (123);
+BEGIN;
+DELETE FROM t1;
+# Kill the server
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+ERROR 42000: Unknown storage engine 'InnoDB'
+SELECT * FROM t1;
+a
+42
+123
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/log_file_size_checkpoint.result b/mysql-test/suite/innodb/r/log_file_size_checkpoint.result
new file mode 100644
index 00000000000..068b1368e1e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/log_file_size_checkpoint.result
@@ -0,0 +1,4 @@
+CREATE DATABASE logtest;
+USE logtest;
+# Kill and restart: --innodb-log-files-in-group=2 --innodb-log-file-size=4M --innodb-buffer-pool-size=50M
+DROP DATABASE logtest;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_1.result b/mysql-test/suite/innodb/r/temp_table.result
index ea1866d69eb..e90da0d5e77 100644
--- a/mysql-test/suite/innodb_zip/r/wl6470_1.result
+++ b/mysql-test/suite/innodb/r/temp_table.result
@@ -194,18 +194,22 @@ count(*)
drop procedure populate_t1;
drop procedure populate_t1_small;
drop procedure populate_t1_small2;
-drop table t1;
-drop table t2;
+drop temporary table t1,t2;
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 4;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc), index sec_index(c1)
+) engine = innodb;
set innodb_strict_mode=off;
create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 8;
-set innodb_strict_mode=default;
+set innodb_strict_mode=on;
create procedure populate_t1()
begin
declare i int default 1;
@@ -394,9 +398,7 @@ count(*)
drop procedure populate_t1;
drop procedure populate_t1_small;
drop procedure populate_t1_small2;
-drop table t1;
-drop table t2;
-set global innodb_file_per_table = 0;
+drop temporary table t1, t2;
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
@@ -593,6 +595,3 @@ count(*)
drop procedure populate_t1;
drop procedure populate_t1_small;
drop procedure populate_t1_small2;
-drop table t1;
-drop table t2;
-set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6470_2.result b/mysql-test/suite/innodb/r/temp_table_savepoint.result
index b001cd73882..d61eef404da 100644
--- a/mysql-test/suite/innodb_zip/r/wl6470_2.result
+++ b/mysql-test/suite/innodb/r/temp_table_savepoint.result
@@ -2,8 +2,6 @@ create procedure populate_tables()
begin
declare n int default 20;
declare inner_loop int default 100;
-set global innodb_file_per_table=on;
-drop table if exists t1,t2,t3,t4;
create temporary table t1(c1 int not null,
c2 int not null,
c3 char(255) not null,
@@ -14,7 +12,7 @@ c7 varchar(2000) not null,
c8 datetime,
c9 decimal(6,3),
primary key (c1),
-index (c3,c4(50),c5(50)),
+index (c3,c4(50),c5(50)),
index (c2))
engine=innodb row_format=redundant;
create temporary table t2(c1 int not null,
@@ -30,19 +28,6 @@ primary key (c1),
index (c3,c4(50),c5(50)),
index (c2))
engine=innodb row_format=compact;
-create temporary table t3(c1 int not null,
-c2 int not null,
-c3 char(255) not null,
-c4 text(6000) not null,
-c5 blob(6000) not null,
-c6 varchar(2000) not null,
-c7 varchar(2000) not null,
-c8 datetime,
-c9 decimal(6,3),
-primary key (c1),
-index (c3,c4(50),c5(50)),
-index (c2))
-engine=innodb row_format=compressed key_block_size=4;
create temporary table t4(c1 int not null,
c2 int not null,
c3 char(255) not null,
@@ -74,16 +59,12 @@ insert into t6 values (50),(100),(150),(190);
while (n > 0) do
start transaction;
insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
-repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
+repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
now(),(100.55+n));
insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
-repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
-now(),(100.55+n));
-insert into t3 values(n,n,repeat(concat(' tc3_',n),30),
-repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
-repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
+repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
now(),(100.55+n));
insert into t4 values(n,n,repeat(concat(' tc3_',n),30),
repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
@@ -95,33 +76,27 @@ repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
now(),(100.55+n));
if (n > 10) then
commit;
-else
+else
delete from t1 where c1 > 10 ;
delete from t2 where c1 > 10 ;
-delete from t3 where c1 > 10 ;
delete from t4 where c1 > 10 ;
delete from t5 where c1 > 10 ;
rollback;
start transaction;
update t1 set c1 = c1 + 1000 where c1 > 10;
update t2 set c1 = c1 + 1000 where c1 > 10;
-update t3 set c1 = c1 + 1000 where c1 > 10;
update t4 set c1 = c1 + 1000 where c1 > 10;
update t5 set c1 = c1 + 1000 where c1 > 10;
rollback;
-end if;
+end if;
start transaction;
insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
-insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -133,26 +108,20 @@ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245
now(),(100.55+n+inner_loop));
delete from t1 where c1 between 100 and 110;
delete from t2 where c1 between 100 and 110;
-delete from t3 where c1 between 100 and 110;
delete from t4 where c1 between 100 and 110;
delete from t5 where c1 between 100 and 110;
-update t1 set c1 = c1+1 where c1>110;
-update t2 set c1 = c1+1 where c1>110;
-update t3 set c1 = c1+1 where c1>110;
-update t4 set c1 = c1+1 where c1>110;
-update t5 set c1 = c1+1 where c1>110;
+update t1 set c1 = c1+1 where c1>110;
+update t2 set c1 = c1+1 where c1>110;
+update t4 set c1 = c1+1 where c1>110;
+update t5 set c1 = c1+1 where c1>110;
savepoint a;
insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
-insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -164,16 +133,12 @@ repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245
now(),(100.55+n+inner_loop));
savepoint b;
insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
-now(),(100.55+n+inner_loop));
-insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
-repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
-repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -189,16 +154,13 @@ rollback to a;
commit;
commit;
rollback;
-set n = n - 1;
+set n = n - 1;
end while;
end|
connect con1,localhost,root,,;
+call populate_tables();;
connect con2,localhost,root,,;
-#---client 1 : dml operation ---"
-connection con1;
-#---client 2 : dml operation ---"
-connection con2;
-# In connection 1
+call populate_tables();;
connection con1;
select count(*) from t1;
count(*)
@@ -206,9 +168,6 @@ count(*)
select count(*) from t2;
count(*)
20
-select count(*) from t3;
-count(*)
-20
select count(*) from t4;
count(*)
20
@@ -259,28 +218,6 @@ c1
136
138
140
-select c1 from t3;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
select c1 from t4;
c1
11
@@ -325,7 +262,6 @@ c1
136
138
140
-# In connection 2
connection con2;
select count(*) from t1;
count(*)
@@ -333,9 +269,6 @@ count(*)
select count(*) from t2;
count(*)
20
-select count(*) from t3;
-count(*)
-20
select count(*) from t4;
count(*)
20
@@ -386,28 +319,6 @@ c1
136
138
140
-select c1 from t3;
-c1
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
select c1 from t4;
c1
11
@@ -452,7 +363,6 @@ c1
136
138
140
-# In connection 1
connection con1;
set autocommit = 0;
insert into t1 values (20,1,'a','a','a','a','a',now(),100.55);
@@ -465,11 +375,6 @@ ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
Warnings:
Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-insert into t3 values (20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
@@ -486,9 +391,6 @@ ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert into t3 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
@@ -502,9 +404,6 @@ c1 c2
select c1,c2 from t2 where c1 in (20,1);
c1 c2
20 20
-select c1,c2 from t3 where c1 in (20,1);
-c1 c2
-20 20
select c1,c2 from t4 where c1 in (20,1);
c1 c2
20 20
@@ -513,7 +412,6 @@ c1 c2
20 20
replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t3 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
@@ -522,9 +420,6 @@ c1 c2 c3 c4 c5 c6 c7 c9
select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
c1 c2 c3 c4 c5 c6 c7 c9
20 1 a a a a a 100.550
-select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
c1 c2 c3 c4 c5 c6 c7 c9
20 1 a a a a a 100.550
@@ -533,7 +428,6 @@ c1 c2 c3 c4 c5 c6 c7 c9
20 1 a a a a a 100.550
update ignore t1 set c1 = 20 where c1 = 140 ;
update ignore t2 set c1 = 20 where c1 = 140 ;
-update ignore t3 set c1 = 20 where c1 = 140 ;
update ignore t4 set c1 = 20 where c1 = 140 ;
update ignore t5 set c1 = 20 where c1 = 140 ;
select count(*) from t1 where c1 = 140;
@@ -542,25 +436,22 @@ count(*)
select count(*) from t2 where c1 = 140;
count(*)
1
-select count(*) from t3 where c1 = 140;
-count(*)
-1
select count(*) from t4 where c1 = 140;
count(*)
1
select count(*) from t5 where c1 = 140;
count(*)
1
-"running select * into outfile <file> from t1 ;
+select * into outfile "VARDIR/tmp/t1.outfile" from t1;
create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
select count(*) from temp_1;
count(*)
0
-"running load data infile <file> into temp_1 ;
+load data infile 'VARDIR/tmp/t1.outfile' into table temp_1;
select count(*) from temp_1;
count(*)
20
-alter table temp_1 add column c10 int default 99 ,
+alter table temp_1 add column c10 int default 99 ,
add column c11 varchar(100) default 'test';
alter table temp_1 add primary key (c1);
insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55);
@@ -570,15 +461,12 @@ c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
select count(*) from temp_1 where c10 = 99 and c11 like 'test';
count(*)
21
-insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
on duplicate key update c1=-2,c2=-2;
select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
-2 -2 a a a a a 100.550 99 test
-drop table t1 ,t2 ,t3,t4,t5,t6,temp_1;
disconnect con1;
-connection con2;
-drop table t1 ,t2 ,t3,t4,t5,t6;
disconnect con2;
connection default;
drop procedure populate_tables;
@@ -664,4 +552,3 @@ count(*)
drop prepare stm;
drop prepare stm_1;
drop prepare stm_2;
-drop table prep_1;
diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result
new file mode 100644
index 00000000000..1fb73f4e775
--- /dev/null
+++ b/mysql-test/suite/innodb/r/temporary_table.result
@@ -0,0 +1,639 @@
+# files in MYSQL_DATA_DIR
+ibtmp1
+create temporary table t1 (i int, f float, c char(100)) engine=innodb;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+select * from t1 where i = 98;
+i f c
+98 1.3 jaipur
+select * from t1 where i < 100;
+i f c
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where f > 1.29999;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL sec_index NULL NULL NULL 5 Using where
+select * from t1 where f > 1.29999;
+i f c
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+explain select * from t1 where i = 100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 Using where
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const pri_index pri_index 5 const 1
+select * from t1 where i = 100;
+i f c
+100 1.1 pune
+delete from t1 where i < 97;
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 kolkata
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.44 delhi
+96 1.5 kolkata
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+i f c
+100 1.1 pune
+99 1.2 mumbai
+98 1.3 jaipur
+97 1.4 delhi
+96 1.5 ahmedabad
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+alter table t1 import tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop temporary table t1;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+while (i <= 20000) DO
+insert into t1 values (i, 'a', 'b');
+SET i = i + 1;
+END WHILE;
+END|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+20000
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+set autocommit=1;
+truncate table t1;
+select * from t1;
+keyc c1 c2
+# test condition of full-temp-tablespace
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+begin;
+call populate_t1();
+ERROR HY000: The table 't1' is full
+drop procedure populate_t1;
+# test read-only mode
+# files in MYSQL_DATA_DIR
+ibtmp1
+select * from t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+show tables;
+Tables_in_test
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+ERROR HY000: Can't create table `test`.`t1` (errno: 165 "Table is read only")
+# test various bad start-up parameters
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+set innodb_strict_mode = off;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed key_block_size = 8;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+show warnings;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+set innodb_strict_mode = default;
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compressed;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+#files in MYSQL_TMP_DIR, expecting only default temporary tablespace file
+ibtmp1
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic;
+show warnings;
+Level Code Message
+drop table t;
+set innodb_strict_mode = off;
+create temporary table t (
+i int)
+engine = innodb row_format = dynamic key_block_size = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+show warnings;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+drop table t;
+create temporary table t (
+i int)
+engine = innodb row_format = compact;
+show warnings;
+Level Code Message
+drop table t;
+create temporary table t (
+i int)
+engine = innodb key_block_size = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+show warnings;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+drop table t;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPACT;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=4
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED;
+Warnings:
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 8;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=8
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+Warnings:
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4 ROW_FORMAT = COMPRESSED;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4
+DROP TABLE t1;
+set innodb_strict_mode = ON;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4, ROW_FORMAT = COMPACT;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 7;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY,
+c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC;
+SHOW WARNINGS;
+Level Code Message
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `c` char(10) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+DROP TABLE t1;
+CREATE TEMPORARY TABLE t1 (
+i INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+set innodb_strict_mode = OFF;
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+Warnings:
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+set innodb_strict_mode = ON;
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+set innodb_strict_mode = OFF;
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+Warnings:
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+ALTER TABLE t1 KEY_BLOCK_SIZE = 8;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+set innodb_strict_mode = ON;
+ALTER TABLE t1 ADD COLUMN j INT;
+ERROR HY000: CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+SHOW WARNINGS;
+Level Code Message
+Error 4047 CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
+Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
+set innodb_strict_mode = OFF;
+ALTER TABLE t1 KEY_BLOCK_SIZE = 0;
+Warnings:
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ PRIMARY KEY (`i`) KEY_BLOCK_SIZE=8
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+set innodb_strict_mode = ON;
+ALTER TABLE t1 ADD COLUMN j INT;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `i` int(11) NOT NULL,
+ `j` int(11) DEFAULT NULL,
+ PRIMARY KEY (`i`) KEY_BLOCK_SIZE=8
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
diff --git a/mysql-test/suite/innodb/r/temporary_table_optimization.result b/mysql-test/suite/innodb/r/temporary_table_optimization.result
new file mode 100644
index 00000000000..63c4f388bf7
--- /dev/null
+++ b/mysql-test/suite/innodb/r/temporary_table_optimization.result
@@ -0,0 +1,266 @@
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+i
+1
+2
+3
+4
+select * from t1 where i = 4;
+i
+4
+drop table t1;
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+i
+1
+2
+3
+4
+select * from t1 where i = 4;
+i
+4
+drop table t1;
+create temporary table t2 (i int) engine = innodb;
+insert into t2 values (1), (2), (3), (4);
+select * from t2;
+i
+1
+2
+3
+4
+select * from t2 where i = 4;
+i
+4
+drop table t2;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc)) engine = innodb;
+create procedure populate_t1()
+begin
+declare i int default 1;
+while (i <= 200) DO
+insert into t1 values (i, 'a', 'b');
+set i = i + 1;
+end while;
+end|
+set autocommit=0;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+select * from t1 limit 10;
+keyc c1 c2
+1 a b
+2 a b
+3 a b
+4 a b
+5 a b
+6 a b
+7 a b
+8 a b
+9 a b
+10 a b
+set autocommit=1;
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+drop table t1;
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+i
+1
+2
+3
+4
+select * from t1 where i = 4;
+i
+4
+drop table t1;
+create temporary table t1
+(keyc int, c1 char(100), c2 char(100),
+primary key(keyc))
+engine = innodb;
+begin;
+select count(*) from t1;
+count(*)
+0
+call populate_t1();
+select count(*) from t1;
+count(*)
+200
+rollback;
+select count(*) from t1;
+count(*)
+0
+begin;
+call populate_t1();
+commit;
+select count(*) from t1;
+count(*)
+200
+truncate table t1;
+select count(*) from t1;
+count(*)
+0
+drop table t1;
+drop procedure populate_t1;
+create temporary table t1 (t1_i int, t1_f float) engine = innodb;
+insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4);
+explain select * from t1 where t1_i = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where
+alter table t1 add unique index pri_index(t1_i);
+explain select * from t1 where t1_i = 1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 const pri_index pri_index 5 const 1
+select * from t1 where t1_i = 1;
+t1_i t1_f
+1 1.1
+alter table t1 add unique index sec_index(t1_f);
+ERROR 23000: Duplicate entry '2.2' for key 'sec_index'
+alter table t1 add index sec_index(t1_f);
+explain select * from t1 where t1_f > 2.2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL sec_index NULL NULL NULL 4 Using where
+select * from t1 where t1_f > 2.2;
+t1_i t1_f
+2 2.2
+3 2.2
+4 4.4
+alter table t1 add column (t1_c char(10));
+select * from t1;
+t1_i t1_f t1_c
+1 1.1 NULL
+2 2.2 NULL
+3 2.2 NULL
+4 4.4 NULL
+insert into t1 values (5, 5.5, 'krunal');
+alter table t1 drop column t1_f;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `t1_i` int(11) DEFAULT NULL,
+ `t1_c` char(10) DEFAULT NULL,
+ UNIQUE KEY `pri_index` (`t1_i`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+select * from t1 where t1_f > 2.2;
+ERROR 42S22: Unknown column 't1_f' in 'where clause'
+alter table t1 add index sec_index2(t1_c), algorithm=inplace;
+ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+drop table t1;
+create temporary table t1 (i int, f float) engine = innodb;
+insert into t1 values (10, 1.1), (20, 2.2);
+select * from t1;
+i f
+10 1.1
+20 2.2
+alter table t1 discard tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+alter table t1 import tablespace;
+ERROR HY000: Cannot DISCARD/IMPORT tablespace associated with temporary table
+drop table t1;
+create temporary table t1 (i int) engine=innodb;
+insert into t1 values (1), (2), (3);
+select * from t1;
+i
+1
+2
+3
+alter table t1 rename t2;
+select * from t1;
+ERROR 42S02: Table 'test.t1' doesn't exist
+select * from t2;
+i
+1
+2
+3
+insert into t2 values (1), (2), (6), (7);
+select * from t2;
+i
+1
+2
+3
+1
+2
+6
+7
+drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = dynamic engine=innodb;
+drop table t;
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = dynamic engine=innodb;
+drop table t;
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = dynamic engine=innodb;
+drop table t;
+SET innodb_strict_mode=OFF;
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = compact engine=innodb;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = dynamic engine=innodb;
+drop table t;
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = compressed engine=innodb;
+drop table t;
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = compact engine=innodb;
+ERROR HY000: Index column size too large. The maximum column size is 767 bytes
+create temporary table t (
+a int not null,
+b blob not null,
+index sk (b(3021))
+) row_format = dynamic engine=innodb;
+drop table t;
+CREATE TABLE t1 ( i INT ) ENGINE = Innodb;
+CREATE TEMPORARY TABLE t2 ( i INT ) ENGINE = Innodb;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+COUNT(*)
+0
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
+COUNT(*)
+1
+CREATE TEMPORARY table t3 ( i INT ) ENGINE = Innodb;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+COUNT(*)
+0
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
+COUNT(*)
+1
+DROP TABLE t1,t2,t3;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+COUNT(*)
+0
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
+COUNT(*)
+0
diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result
index 666a65f8ee1..7a9448ad9f0 100644
--- a/mysql-test/suite/innodb/r/xa_recovery.result
+++ b/mysql-test/suite/innodb/r/xa_recovery.result
@@ -1,4 +1,3 @@
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connect con1,localhost,root;
@@ -7,7 +6,7 @@ UPDATE t1 set a=2;
XA END 'x';
XA PREPARE 'x';
connection default;
-call mtr.add_suppression("Found 1 prepared XA transactions");
+# Kill and restart
disconnect con1;
connect con1,localhost,root;
SELECT * FROM t1 LOCK IN SHARE MODE;
diff --git a/mysql-test/suite/innodb/std_data/log_corruption.zip b/mysql-test/suite/innodb/std_data/log_corruption.zip
new file mode 100644
index 00000000000..6f126c2edf0
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption0.zip b/mysql-test/suite/innodb/std_data/log_corruption0.zip
new file mode 100644
index 00000000000..c003a18a1b2
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption0.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption1.zip b/mysql-test/suite/innodb/std_data/log_corruption1.zip
new file mode 100644
index 00000000000..35a02adaa6d
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption1.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption2.zip b/mysql-test/suite/innodb/std_data/log_corruption2.zip
new file mode 100644
index 00000000000..4e4180ac4a3
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption2.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption3.zip b/mysql-test/suite/innodb/std_data/log_corruption3.zip
new file mode 100644
index 00000000000..2337c81a80b
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption3.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption4.zip b/mysql-test/suite/innodb/std_data/log_corruption4.zip
new file mode 100644
index 00000000000..86002d7d42a
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption4.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption4a.zip b/mysql-test/suite/innodb/std_data/log_corruption4a.zip
new file mode 100644
index 00000000000..6d072f3029f
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption4a.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption5.zip b/mysql-test/suite/innodb/std_data/log_corruption5.zip
new file mode 100644
index 00000000000..bbf0238efc9
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption5.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/std_data/log_corruption6.zip b/mysql-test/suite/innodb/std_data/log_corruption6.zip
new file mode 100644
index 00000000000..04dd687e7c9
--- /dev/null
+++ b/mysql-test/suite/innodb/std_data/log_corruption6.zip
Binary files differ
diff --git a/mysql-test/suite/innodb/t/101_compatibility.test b/mysql-test/suite/innodb/t/101_compatibility.test
new file mode 100644
index 00000000000..83ab7914a69
--- /dev/null
+++ b/mysql-test/suite/innodb/t/101_compatibility.test
@@ -0,0 +1,105 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+-- echo #
+-- echo # MDEV-11623 MariaDB 10.1 fails to start datadir created with
+-- echo # MariaDB 10.0/MySQL 5.6 using innodb-page-size!=16K
+-- echo #
+
+# This is actually testing the opposite: starting the fixed 10.1 with
+# buggy 10.1 files (by manually converting the flags in the files).
+
+--disable_query_log
+call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of tablespace");
+FLUSH TABLES;
+--enable_query_log
+let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
+let MYSQLD_DATADIR=`select @@datadir`;
+
+CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
+CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT;
+CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
+--disable_warnings
+# ROW_FORMAT=COMPRESSED is not available with innodb_page_size>16k
+SET INNODB_STRICT_MODE=OFF;
+CREATE TABLE tz(a INT)ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET INNODB_STRICT_MODE=ON;
+--enable_warnings
+
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+EVAL CREATE TABLE tdd(a INT) ENGINE=InnoDB, DATA DIRECTORY='$MYSQL_TMP_DIR';
+
+CREATE TABLE tp(a INT) ENGINE=InnoDB page_compressed=1;
+CREATE TABLE ti(a INT) ENGINE=InnoDB;
+FLUSH TABLES ti FOR EXPORT;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_backup_tablespaces("test", "ti");
+EOF
+UNLOCK TABLES;
+ALTER TABLE ti DISCARD TABLESPACE;
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
+ib_discard_tablespaces("test", "ti");
+ib_restore_tablespaces("test", "ti");
+do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
+my $ps = $ENV{INNODB_PAGE_SIZE};
+my $dd = $ENV{MYSQLD_DATADIR};
+convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
+EOF
+
+ALTER TABLE ti IMPORT TABLESPACE;
+
+BEGIN;
+INSERT INTO tr VALUES(1);
+INSERT INTO tc VALUES(1);
+INSERT INTO td VALUES(1);
+INSERT INTO tz VALUES(1);
+INSERT INTO tdd VALUES(1);
+INSERT INTO tp VALUES(1);
+INSERT INTO ti VALUES(1);
+
+--source include/kill_mysqld.inc
+
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
+my $ps = $ENV{INNODB_PAGE_SIZE};
+my $dd = $ENV{MYSQLD_DATADIR};
+
+convert_to_mariadb_101("$dd/ibdata1", $ps);
+convert_to_mariadb_101("$dd/test/tr.ibd", $ps);
+convert_to_mariadb_101("$dd/test/tc.ibd", $ps);
+convert_to_mariadb_101("$dd/test/td.ibd", $ps);
+convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768;
+convert_to_mariadb_101("$dd/test/tp.ibd", $ps);
+convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
+convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps);
+EOF
+
+--source include/start_mysqld.inc
+CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
+--source include/shutdown_mysqld.inc
+
+perl;
+do "$ENV{MTR_SUITE_DIR}/include/ibd_convert.pl";
+my $ps = $ENV{INNODB_PAGE_SIZE};
+my $dd = $ENV{MYSQLD_DATADIR};
+
+convert_to_mariadb_101("$dd/ibdata1", $ps);
+convert_to_mariadb_101("$dd/test/tr.ibd", $ps);
+convert_to_mariadb_101("$dd/test/tc.ibd", $ps);
+convert_to_mariadb_101("$dd/test/td.ibd", $ps);
+convert_to_mariadb_101("$dd/test/tz.ibd", 1024) if $ps<32768;
+convert_to_mariadb_101("$dd/test/tp.ibd", $ps);
+convert_to_mariadb_101("$dd/test/ti.ibd", $ps);
+convert_to_mariadb_101("$ENV{MYSQL_TMP_DIR}/test/tdd.ibd", $ps);
+EOF
+
+--let $restart_parameters=--innodb-read-only
+--source include/start_mysqld.inc
+CHECK TABLE tr,tc,td,tz,tdd,tp,ti;
+--source include/shutdown_mysqld.inc
+
+--let $restart_parameters=
+--source include/start_mysqld.inc
+DROP TABLE tr,tc,td,tz,tdd,tp,ti;
diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test
new file mode 100644
index 00000000000..643b7a4833d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test
@@ -0,0 +1,58 @@
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING
+--echo # OR DISCARDED TABLESPACES
+--echo #
+
+--disable_query_log
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: ");
+call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
+call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
+call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`\(t\|x\.\.d\)` because it could not be opened");
+call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing");
+call mtr.add_suppression("Could not find a valid tablespace file for");
+call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\.`\(t\|x\.\.d\)` in the cache");
+call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
+call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
+--enable_query_log
+
+let $MYSQLD_DATADIR=`select @@datadir`;
+SET GLOBAL innodb_file_per_table=1;
+CREATE TABLE t(a INT)ENGINE=InnoDB;
+CREATE TABLE `x..d` (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
+
+--source include/shutdown_mysqld.inc
+
+# Remove the tablespace files.
+--remove_file $MYSQLD_DATADIR/test/t.ibd
+--remove_file $MYSQLD_DATADIR/test/x@002e@002ed.ibd
+
+--source include/start_mysqld.inc
+
+# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
+# The table does exist, only the tablespace does not exist.
+--error ER_NO_SUCH_TABLE_IN_ENGINE
+SELECT * FROM t;
+
+--error ER_NO_SUCH_TABLE_IN_ENGINE
+ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
+SHOW WARNINGS;
+
+--error ER_NO_SUCH_TABLE
+ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
+SHOW WARNINGS;
+
+--error ER_PARSE_ERROR
+ALTER TABLE t ALGORITHM=INPLACE, DISCARD TABLESPACE;
+--error ER_PARSE_ERROR
+ALTER TABLE t ALGORITHM=COPY, DISCARD TABLESPACE;
+--error ER_PARSE_ERROR
+ALTER TABLE t ALGORITHM=DEFAULT, DISCARD TABLESPACE;
+ALTER TABLE t DISCARD TABLESPACE;
+DROP TABLE t;
+--error ER_NO_SUCH_TABLE_IN_ENGINE
+SELECT * FROM `x..d`;
+DROP TABLE `x..d`;
diff --git a/mysql-test/suite/innodb/t/doublewrite.test b/mysql-test/suite/innodb/t/doublewrite.test
index e1984319cb7..a153ad66b19 100644
--- a/mysql-test/suite/innodb/t/doublewrite.test
+++ b/mysql-test/suite/innodb/t/doublewrite.test
@@ -10,15 +10,13 @@
# Slow shutdown and restart to make sure ibuf merge is finished
SET GLOBAL innodb_fast_shutdown = 0;
---source include/restart_mysqld.inc
-
--disable_query_log
-call mtr.add_suppression("InnoDB: Database page [0-9]+:1 contained only zeroes.");
call mtr.add_suppression("Header page consists of zero bytes");
call mtr.add_suppression("Checksum mismatch in datafile");
call mtr.add_suppression("but the innodb_page_size start-up parameter is");
-call mtr.add_suppression("Database page corruption");
+call mtr.add_suppression("adjusting FSP_SPACE_FLAGS");
--enable_query_log
+--source include/restart_mysqld.inc
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
let MYSQLD_DATADIR=`select @@datadir`;
@@ -65,14 +63,48 @@ set global innodb_buf_flush_list_now = 1;
--echo # Make the first page (page_no=0) of the user tablespace
--echo # full of zeroes.
+--echo #
+--echo # MDEV-11623: Use old FSP_SPACE_FLAGS in the doublewrite buffer.
+
perl;
use IO::Handle;
my $fname= "$ENV{'MYSQLD_DATADIR'}test/t1.ibd";
+my $page_size = $ENV{INNODB_PAGE_SIZE};
+my $page;
open(FILE, "+<", $fname) or die;
-FILE->autoflush(1);
-binmode FILE;
-print FILE chr(0) x ($ENV{'INNODB_PAGE_SIZE'});
+sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
+sysseek(FILE, 0, 0)||die "Unable to seek $fname\n";
+die unless syswrite(FILE, chr(0) x $page_size, $page_size) == $page_size;
close FILE;
+
+open(FILE, "+<", "$ENV{MYSQLD_DATADIR}ibdata1")||die "cannot open ibdata1\n";
+sysseek(FILE, 6 * $page_size - 190, 0)||die "Unable to seek ibdata1\n";
+sysread(FILE, $_, 12) == 12||die "Unable to read TRX_SYS\n";
+my($magic,$d1,$d2)=unpack "NNN", $_;
+die "magic=$magic, $d1, $d2\n" unless $magic == 536853855 && $d2 >= $d1 + 64;
+sysseek(FILE, $d1 * $page_size, 0)||die "Unable to seek ibdata1\n";
+# Find the page in the doublewrite buffer
+for (my $d = $d1; $d < $d2 + 64; $d++)
+{
+ sysread(FILE, $_, $page_size)==$page_size||die "Cannot read doublewrite\n";
+ next unless $_ eq $page;
+ sysseek(FILE, $d * $page_size, 0)||die "Unable to seek ibdata1\n";
+ # Write buggy MariaDB 10.1.x FSP_SPACE_FLAGS to the doublewrite buffer
+ my($flags) = unpack "x[54]N", $_;
+ my $badflags = ($flags & 0x3f);
+ my $compression_level=6;
+ $badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16);
+ $badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE
+
+ substr ($_, 54, 4) = pack("N", $badflags);
+ # Replace the innodb_checksum_algorithm=none checksum
+ substr ($_, 0, 4) = pack("N", 0xdeadbeef);
+ substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef);
+ syswrite(FILE, $_, $page_size)==$page_size||die;
+ close(FILE);
+ exit 0;
+}
+die "Did not find the page in the doublewrite buffer ($d1,$d2)\n";
EOF
--source include/start_mysqld.inc
diff --git a/mysql-test/suite/innodb/t/group_commit_crash.test b/mysql-test/suite/innodb/t/group_commit_crash.test
index cad349819bd..7ad0d9d1e74 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash.test
@@ -9,8 +9,6 @@
--source include/have_debug.inc
--source include/have_log_bin.inc
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-
let $file_format_max=`SELECT @@innodb_file_format_max`;
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
diff --git a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
index 8d1f460b64b..9dc2557e687 100644
--- a/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
+++ b/mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test
@@ -9,8 +9,6 @@
--source include/have_debug.inc
--source include/have_log_bin.inc
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-
let $file_format_max=`SELECT @@innodb_file_format_max`;
CREATE TABLE t1(a CHAR(255),
b CHAR(255),
diff --git a/mysql-test/suite/innodb/t/innochecksum.opt b/mysql-test/suite/innodb/t/innochecksum.opt
deleted file mode 100644
index cc738d97434..00000000000
--- a/mysql-test/suite/innodb/t/innochecksum.opt
+++ /dev/null
@@ -1,2 +0,0 @@
---innodb_file_per_table=1
---innodb_file_format=Barracuda
diff --git a/mysql-test/suite/innodb/t/innodb-16k.test b/mysql-test/suite/innodb/t/innodb-16k.test
index ad09666442d..a771fac27ed 100644
--- a/mysql-test/suite/innodb/t/innodb-16k.test
+++ b/mysql-test/suite/innodb/t/innodb-16k.test
@@ -8,17 +8,11 @@ call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
-let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
let $innodb_large_prefix_orig = `SELECT @@innodb_large_prefix`;
--enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_large_prefix = OFF;
-
--echo # Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
WHERE LOWER(variable_name) = 'innodb_page_size';
@@ -263,8 +257,6 @@ SELECT table_name, row_format, create_options
DROP TABLE t1;
-SET GLOBAL innodb_file_format = `Barracuda`;
-
CREATE TABLE t2(d varchar(17) PRIMARY KEY) ENGINE=innodb DEFAULT CHARSET=utf8;
CREATE TABLE t3(a int PRIMARY KEY) ENGINE=innodb;
INSERT INTO t3 VALUES (22),(44),(33),(55),(66);
@@ -381,9 +373,6 @@ UPDATE t1 SET t=@e;
SHOW CREATE TABLE t1;
DROP TABLE t1;
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
--echo Test an assertion failure on purge.
# This test is not in innodb_8k or innodb_4k since the bug is not about
@@ -440,8 +429,6 @@ DELETE FROM t3_purge;
DELETE FROM t4_purge;
# A secondary index tuple is found to be too long to fit into a page.
-SET GLOBAL innodb_file_per_table=on;
-SET GLOBAL innodb_file_format='Barracuda';
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
@@ -961,8 +948,5 @@ row_format=compact,ENGINE=INNODB;
#
--disable_query_log
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
EVAL SET GLOBAL innodb_large_prefix = $innodb_large_prefix_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-32k-crash.test b/mysql-test/suite/innodb/t/innodb-32k-crash.test
index 8f2e7d6c1e2..b9d96fd92c8 100644
--- a/mysql-test/suite/innodb/t/innodb-32k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-32k-crash.test
@@ -10,16 +10,7 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
---disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
-# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
-let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
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,
@@ -210,13 +201,3 @@ COMMIT;
show create table t1;
show create table t2;
drop table t1,t2;
-
-#
-# restore environment to the state it was before this test execution
-#
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-32k.test b/mysql-test/suite/innodb/t/innodb-32k.test
index 65c1d4bbc76..53a2d3a7442 100644
--- a/mysql-test/suite/innodb/t/innodb-32k.test
+++ b/mysql-test/suite/innodb/t/innodb-32k.test
@@ -3,21 +3,13 @@
--source include/have_innodb.inc
--source include/have_innodb_32k.inc
-call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
-call mtr.add_suppression("InnoDB: Resizing redo log from *");
-call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files.");
-call mtr.add_suppression("InnoDB: New log files created, LSN=*");
+call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value ");
+call mtr.add_suppression("InnoDB: Resizing redo log from ");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created, LSN=");
+call mtr.add_suppression("Innodb: Cannot add field.*row size is");
---disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
-# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
-let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
--echo # Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
@@ -347,9 +339,9 @@ CREATE INDEX tn1f9 ON t1 (oa(767));
CREATE INDEX to1f11 ON t1 (pa(767));
UPDATE t1 SET t=@e;
-# One more index and row size is too big
---replace_regex /> [0-9]*/> max_row_size/
---error ER_TOO_BIG_ROWSIZE
+# One more index and row size is too big (not any more!)
+#--replace_regex /> [0-9]*/> max_row_size/
+#--error ER_TOO_BIG_ROWSIZE
CREATE INDEX t1f6 ON t1 (l(767));
drop table t1;
@@ -410,8 +402,6 @@ DELETE FROM t3_purge;
DELETE FROM t4_purge;
# A secondary index tuple is found to be too long to fit into a page.
-SET GLOBAL innodb_file_per_table=on;
-SET GLOBAL innodb_file_format='Barracuda';
SET @r=REPEAT('a',500);
CREATE TABLE tlong(a int,
@@ -758,12 +748,3 @@ show create table t2;
update t2 set col150=@a;
update t2 set col145=@b;
drop table t2;
-#
-# restore environment to the state it was before this test execution
-#
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-64k-crash.test b/mysql-test/suite/innodb/t/innodb-64k-crash.test
index 9d2d0d66415..b61396bf22c 100644
--- a/mysql-test/suite/innodb/t/innodb-64k-crash.test
+++ b/mysql-test/suite/innodb/t/innodb-64k-crash.test
@@ -10,16 +10,7 @@
call mtr.add_suppression("InnoDB: Warning: innodb_page_size has been changed from default value *");
---disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
-# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
-let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
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,
@@ -400,13 +391,3 @@ COMMIT;
show create table t1;
show create table t2;
drop table t1,t2;
-
-#
-# restore environment to the state it was before this test execution
-#
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-64k.test b/mysql-test/suite/innodb/t/innodb-64k.test
index bd0da6b66ad..c611b6cb2e2 100644
--- a/mysql-test/suite/innodb/t/innodb-64k.test
+++ b/mysql-test/suite/innodb/t/innodb-64k.test
@@ -1,5 +1,5 @@
--source include/no_valgrind_without_big.inc
-# Tests for setting innodb-page-size=64k;
+# Tests for setting innodb-page-size=64k;
--source include/have_innodb.inc
--source include/have_innodb_64k.inc
@@ -8,16 +8,7 @@ call mtr.add_suppression("InnoDB: Resizing redo log from *");
call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files.");
call mtr.add_suppression("InnoDB: New log files created, LSN=*");
---disable_query_log
let $MYSQLD_DATADIR= `select @@datadir`;
-# These values can change during the test
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
-let $innodb_strict_mode_orig = `SELECT @@session.innodb_strict_mode`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
--echo # Test 1) Show the page size from Information Schema
SELECT variable_value FROM information_schema.global_status
@@ -29,6 +20,7 @@ SET SESSION innodb_strict_mode = ON;
# Redundant table; 32698 bytes
+# MDEV-11828 FIXME: The length must be less!
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),
@@ -432,9 +424,9 @@ CREATE INDEX xtc1c5 ON t1 (cc(767),dc(767));
CREATE INDEX xte1e5 ON t1 (ec(767),fc(767));
UPDATE t1 SET t=@e;
-# One more index and row size is too big
---replace_regex /> [0-9]*/> max_row_size/
---error ER_TOO_BIG_ROWSIZE
+# One more index and row size is too big (not any more!)
+#--replace_regex /> [0-9]*/> max_row_size/
+#--error ER_TOO_BIG_ROWSIZE
CREATE INDEX xt5k1f6 ON t1 (lc(767),mc(767));
SHOW CREATE TABLE t1;
SHOW WARNINGS;
@@ -712,12 +704,3 @@ COMMIT;
drop table t2;
DROP TABLE t1;
-#
-# restore environment to the state it was before this test execution
-#
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode = $innodb_strict_mode_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test
deleted file mode 100644
index 19ba7c3a3ca..00000000000
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test
+++ /dev/null
@@ -1,54 +0,0 @@
-#Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES
-
---source include/not_embedded.inc
---source include/have_innodb.inc
-
-call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
-
-let $MYSQLD_DATADIR=`select @@datadir`;
-SET GLOBAL innodb_file_per_table=1;
-CREATE TABLE t(a INT)ENGINE=InnoDB;
-
-# Shut down the server
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server
--- source include/wait_until_disconnected.inc
-
-# Remove the tablespace file.
-let IBD=$MYSQLD_DATADIR/test/t.ibd;
-perl;
-unlink "$ENV{IBD}" || die "Unable to unlink $ENV{IBD}\n";
-EOF
-
-# Restart the server.
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
-
-call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation.");
-call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
-call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
-call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: './test/t.ibd' OS error: .*");
-call mtr.add_suppression("InnoDB: Ignoring tablespace `test/t` because it could not be opened.");
-call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .*");
-call mtr.add_suppression("InnoDB: Error: trying to open a table, but could not$");
-call mtr.add_suppression("MySQL is trying to open a table handle but the \.ibd file for$");
-call mtr.add_suppression("InnoDB: Table 'test/t'$");
-call mtr.add_suppression("Could not find a valid tablespace file for");
-call mtr.add_suppression("InnoDB: Tablespace open failed for '\"test\"\.\"t\"', ignored");
-call mtr.add_suppression("InnoDB: Failed to find tablespace for table '\"test\"\.\"t\"' in the cache");
-call mtr.add_suppression("InnoDB: Cannot delete tablespace [0-9]+.*not found");
-call mtr.add_suppression("Table .*t in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
-
-# The ER_NO_SUCH_TABLE is being thrown by ha_innobase::open().
-# The table does exist, only the tablespace does not exist.
---error ER_NO_SUCH_TABLE_IN_ENGINE
-SELECT * FROM t;
-
---error ER_NO_SUCH_TABLE_IN_ENGINE
-ALTER TABLE t ADD INDEX (a), ALGORITHM=INPLACE;
---error ER_NO_SUCH_TABLE
-ALTER TABLE t1 ADD INDEX (a), ALGORITHM=COPY;
-
-ALTER TABLE t DISCARD TABLESPACE;
-DROP TABLE t;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
index e1e736fc678..ec1ea35f1cf 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
@@ -20,13 +20,6 @@
--echo # in-place ALTERs of the same table will not be blocked due to
--echo # temporary tablename.
-# As we intentionally crash below, there could be partially written
-# pages that are then recovered from the doublewrite buffer
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed
-");
-call mtr.add_suppression("InnoDB: file read of space .* page .*");
-call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer.");
-
let datadir= `select @@datadir`;
--let $_server_id= `SELECT @@server_id`
diff --git a/mysql-test/suite/innodb/t/innodb-bug-14068765.test b/mysql-test/suite/innodb/t/innodb-bug-14068765.test
index 185e8849e21..c2446e0fecf 100644
--- a/mysql-test/suite/innodb/t/innodb-bug-14068765.test
+++ b/mysql-test/suite/innodb/t/innodb-bug-14068765.test
@@ -1,17 +1,6 @@
-- source include/have_innodb.inc
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
let MYSQLD_DATADIR =`SELECT @@datadir`;
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-#SET GLOBAL innodb_file_format = `Barracuda`;
-#SELECT @@innodb_file_format;
# Export/import on the same instance, with --innodb-file-per-table=1
CREATE DATABASE testdb_wl5522;
@@ -68,6 +57,3 @@ SELECT COUNT(*) FROM testdb_wl5522.t1;
DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/t/innodb-bug-14084530.test b/mysql-test/suite/innodb/t/innodb-bug-14084530.test
index 94a2d6b2252..f27fbbe31d7 100644
--- a/mysql-test/suite/innodb/t/innodb-bug-14084530.test
+++ b/mysql-test/suite/innodb/t/innodb-bug-14084530.test
@@ -1,15 +1,6 @@
-- source include/have_innodb.inc
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
let MYSQLD_DATADIR =`SELECT @@datadir`;
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
SET AUTOCOMMIT = 0;
@@ -45,8 +36,4 @@ ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
CHECK TABLE testdb_wl5522.t1;
SELECT c1 FROM testdb_wl5522.t1;
-SET AUTOCOMMIT = 1;
-DROP TABLE testdb_wl5522.t1;
DROP DATABASE testdb_wl5522;
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/t/innodb-fk-virtual.test b/mysql-test/suite/innodb/t/innodb-fk-virtual.test
new file mode 100644
index 00000000000..094fda35abb
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-fk-virtual.test
@@ -0,0 +1,61 @@
+--source include/have_innodb.inc
+
+#
+# MDEV-11850: Can't create foreign key referencing a virtual column
+#
+
+create or replace table a (
+ cola int(10) primary key,
+ v_cola int(10) as (cola mod 10) virtual,
+ p_cola int(10) as (cola mod 10) persistent
+) engine=innodb;
+
+create index v_cola on a (v_cola);
+create index p_cola on a (p_cola);
+
+create or replace table b(
+cola int(10),
+v_cola int(10),
+p_cola int(10),
+c_cola int(10) as (cola + 2) virtual
+) engine=innodb;
+
+alter table b add constraint `p_cola_fk`
+foreign key (p_cola) references a (p_cola)
+on delete restrict
+on update restrict;
+
+show warnings;
+show create table b;
+
+alter table b add constraint `v_cola_fk`
+foreign key (v_cola) references a (v_cola)
+on delete restrict
+on update restrict;
+
+show warnings;
+show create table b;
+
+alter table b add constraint `c_cola_fk`
+foreign key (c_cola) references a (cola)
+on delete restrict
+on update restrict;
+
+show warnings;
+show create table b;
+
+#
+# Test that fk really works
+#
+
+insert into a(cola) values (12);
+select * from a;
+insert into b(cola, v_cola, p_cola) values (10,2,2);
+select * from b;
+--error 1452
+insert into b(cola, v_cola, p_cola) values (10,1,1);
+--error 1451
+delete from a;
+select * from a;
+select * from b;
+drop table b, a;
diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test
index 8598647de66..4549b3b6b47 100644
--- a/mysql-test/suite/innodb/t/innodb-index.test
+++ b/mysql-test/suite/innodb/t/innodb-index.test
@@ -1,15 +1,7 @@
-- source include/have_innodb.inc
-let $innodb_file_format_orig=`select @@innodb_file_format`;
-let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
-
let $MYSQLD_DATADIR= `select @@datadir`;
-let $per_table=`select @@innodb_file_per_table`;
-let $format=`select @@innodb_file_format`;
-set global innodb_file_per_table=on;
-set global innodb_file_format='Barracuda';
-
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
# Bug#13654923 BOGUS DEBUG ASSERTION IN INDEX CREATION FOR ZERO-LENGTH RECORD
@@ -336,10 +328,6 @@ explain select * from t1;
explain select * from t1 order by a;
drop table t1;
-eval set global innodb_file_per_table=$per_table;
-eval set global innodb_file_format=$format;
-eval set global innodb_file_format_max=$format;
-
#
# Test to check whether CREATE INDEX handles implicit foreign key
# constraint modifications (Issue #70, Bug #38786)
@@ -558,8 +546,3 @@ show create table t2c;
--disable_info
DROP TABLE t1,t2,t2c,t2i;
-
---disable_query_log
-eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
-eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test
index 51493266a60..69a632d6010 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_bzip2.test
@@ -2,14 +2,7 @@
-- source include/have_innodb_bzip2.inc
-- source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `select @@innodb_file_format`;
-let $innodb_file_per_table_orig = `select @@innodb_file_per_table`;
---enable_query_log
-
-set global innodb_file_format = `barracuda`;
-set global innodb_file_per_table = on;
# bzip2
set global innodb_compression_algorithm = 5;
@@ -247,6 +240,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test
index f36ea9684e9..1b1df674e3c 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_lz4.test
@@ -2,14 +2,7 @@
-- source include/have_innodb_lz4.inc
-- source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-set global innodb_file_format = `barracuda`;
-set global innodb_file_per_table = on;
# lz4
set global innodb_compression_algorithm = 2;
@@ -248,6 +241,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test
index 6ea686bca04..9cec3e7a947 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzma.test
@@ -2,14 +2,7 @@
-- source include/have_innodb_lzma.inc
-- source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-set global innodb_file_format = `barracuda`;
-set global innodb_file_per_table = on;
# lzma
set global innodb_compression_algorithm = 4;
@@ -247,6 +240,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test
index 96ba18f5112..65c7e5dd3d9 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_lzo.test
@@ -2,15 +2,7 @@
-- source include/have_innodb_lzo.inc
-- source include/not_embedded.inc
-
---disable_query_log
let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `select @@innodb_file_format`;
-let $innodb_file_per_table_orig = `select @@innodb_file_per_table`;
---enable_query_log
-
-set global innodb_file_format = `barracuda`;
-set global innodb_file_per_table = on;
# lzo
set global innodb_compression_algorithm = 3;
@@ -201,6 +193,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
eval set global innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-eval set global innodb_file_per_table = $innodb_file_per_table_orig;
-eval set global innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test
index 929f547b6ac..b90d15f1fa3 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test
@@ -1,49 +1,42 @@
-- source include/have_innodb.inc
-- source include/have_innodb_snappy.inc
-call mtr.add_suppression("Compression failed for space*");
+call mtr.add_suppression("InnoDB: Compression failed for space.*");
---disable_query_log
let $innodb_compression_algorithm_orig=`select @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `select @@innodb_file_format`;
-let $innodb_file_per_table_orig = `select @@innodb_file_per_table`;
---enable_query_log
-
-set global innodb_file_format = `barracuda`;
-set global innodb_file_per_table = on;
# snappy
set global innodb_compression_algorithm = 6;
-create table innodb_compressed(c1 int, b char(20)) engine=innodb row_format=compressed key_block_size=8;
+create table innodb_compressed(c1 int, b char(200)) engine=innodb row_format=compressed key_block_size=8;
show warnings;
-create table innodb_normal (c1 int, b char(20)) engine=innodb;
+create table innodb_normal (c1 int, b char(200)) engine=innodb;
show warnings;
-create table innodb_page_compressed1 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=1;
+create table innodb_page_compressed1 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=1;
show warnings;
show create table innodb_page_compressed1;
-create table innodb_page_compressed2 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=2;
+create table innodb_page_compressed2 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=2;
show warnings;
show create table innodb_page_compressed2;
-create table innodb_page_compressed3 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=3;
+create table innodb_page_compressed3 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=3;
show warnings;
show create table innodb_page_compressed3;
-create table innodb_page_compressed4 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=4;
+create table innodb_page_compressed4 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=4;
show warnings;
show create table innodb_page_compressed4;
-create table innodb_page_compressed5 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=5;
+create table innodb_page_compressed5 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=5;
show warnings;
show create table innodb_page_compressed5;
-create table innodb_page_compressed6 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=6;
+create table innodb_page_compressed6 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=6;
show warnings;
show create table innodb_page_compressed6;
-create table innodb_page_compressed7 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=7;
+create table innodb_page_compressed7 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=7;
show warnings;
show create table innodb_page_compressed7;
-create table innodb_page_compressed8 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=8;
+create table innodb_page_compressed8 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=8;
show warnings;
show create table innodb_page_compressed8;
-create table innodb_page_compressed9 (c1 int, b char(20)) engine=innodb page_compressed=1 page_compression_level=9;
+create table innodb_page_compressed9 (c1 int, b char(200)) engine=innodb page_compressed=1 page_compression_level=9;
show warnings;
show create table innodb_page_compressed9;
delimiter //;
@@ -52,7 +45,7 @@ begin
declare current_num int;
set current_num = 0;
while current_num < repeat_count do
- insert into innodb_normal values(current_num,'testing..');
+ insert into innodb_normal values(current_num,'aaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccc');
set current_num = current_num + 1;
end while;
end//
@@ -248,6 +241,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
index 3a241810bbc..be8300b39aa 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_tables.test
@@ -1,14 +1,8 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
@@ -75,8 +69,6 @@ update innodb_dynamic set c1 = c1 + 1;
select count(*) from innodb_compact where c1 < 1500000;
select count(*) from innodb_dynamic where c1 < 1500000;
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# none
set global innodb_compression_algorithm = 0;
@@ -112,6 +104,4 @@ SET SESSION innodb_compression_default = 0;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test
index 67fafdb9e83..0c843314eee 100644
--- a/mysql-test/suite/innodb/t/innodb-page_compression_zip.test
+++ b/mysql-test/suite/innodb/t/innodb-page_compression_zip.test
@@ -1,14 +1,7 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
---disable_query_log
let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
# zlib
set global innodb_compression_algorithm = 1;
@@ -198,6 +191,4 @@ drop table innodb_page_compressed9;
# reset system
--disable_query_log
EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-trim.opt b/mysql-test/suite/innodb/t/innodb-trim.opt
new file mode 100644
index 00000000000..c33d075b002
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-trim.opt
@@ -0,0 +1 @@
+--loose-innodb-use-trim=1
diff --git a/mysql-test/suite/innodb/t/innodb-trim.test b/mysql-test/suite/innodb/t/innodb-trim.test
new file mode 100644
index 00000000000..0f38ea5ba84
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb-trim.test
@@ -0,0 +1,54 @@
+--source include/have_innodb.inc
+--source include/have_innodb_punchhole.inc
+
+--disable_query_log
+--disable_warnings
+let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`;
+--enable_warnings
+--enable_query_log
+
+# zlib
+set global innodb_compression_algorithm = 1;
+
+create table innodb_page_compressed (c1 int not null primary key auto_increment, b char(200), c char(200), d char(200)) engine=innodb page_compressed=1 page_compression_level=9;
+show warnings;
+
+delimiter //;
+create procedure innodb_insert_proc (repeat_count int)
+begin
+ declare current_num int;
+ set current_num = 0;
+ while current_num < repeat_count do
+ insert into innodb_page_compressed values (NULL,repeat('A',150),repeat('AB',75),repeat('B', 175));
+ set current_num = current_num + 1;
+ end while;
+end//
+delimiter ;//
+commit;
+
+set autocommit=0;
+call innodb_insert_proc(16000);
+commit;
+set autocommit=1;
+
+
+let $success= `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'innodb_num_page_compressed_trim_op'`;
+
+if (!$success) {
+--disable_query_log
+--disable_result_log
+ DROP PROCEDURE innodb_insert_proc;
+ DROP TABLE innodb_page_compressed;
+--enable_query_log
+--enable_result_log
+ --skip "Test requires TRIM";
+}
+
+DROP PROCEDURE innodb_insert_proc;
+DROP TABLE innodb_page_compressed;
+
+--disable_query_log
+--disable_warnings
+EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig;
+--enable_warnings
+--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-1.test b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
index 6c2607effe8..0d59df11c44 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-1.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-1.test
@@ -5,30 +5,15 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
let MYSQLD_DATADIR =`SELECT @@datadir`;
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
-let $MYSQLD_DATADIR = `SELECT @@datadir`;
# Following testcases are created from JET cases (where import
# export instance are differnt server )
# Here test will be run on same import and export instance.
-DROP DATABASE IF EXISTS testdb_wl5522;
CREATE DATABASE testdb_wl5522;
-# case 1
+# case 1
CREATE TABLE testdb_wl5522.t1 (c1 INT ) ENGINE = Innodb;
INSERT INTO testdb_wl5522.t1 VALUES (1),(123),(331);
SELECT c1 FROM testdb_wl5522.t1;
@@ -57,43 +42,43 @@ ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE;
SELECT * FROM testdb_wl5522.t1 ORDER BY c1;
DROP TABLE testdb_wl5522.t1;
-# case 2
+# case 2
CREATE TABLE testdb_wl5522.t1 (
col1 BIT(1),
col2 BOOLEAN,
col3 TINYINT,
-col4 SMALLINT,
+col4 SMALLINT,
col5 MEDIUMINT,
col6 INT,
-col7 BIGINT,
+col7 BIGINT,
col8 FLOAT (14,3) ,
-col9 DOUBLE (14,3),
-col10 VARCHAR(20),
+col9 DOUBLE (14,3),
+col10 VARCHAR(20),
col11 TEXT ,
col12 ENUM('a','b','c'),
col13 TEXT,
-col14 CHAR(20) ,
-col15 VARBINARY (400) ,
-col16 BINARY(40),
-col17 BLOB (400) ,
+col14 CHAR(20),
+col15 VARBINARY (400),
+col16 BINARY(40),
+col17 BLOB (400),
col18 INT NOT NULL PRIMARY KEY,
-col19 DATE ,
-col20 DATETIME ,
-col21 TIMESTAMP ,
-col22 TIME ,
+col19 DATE,
+col20 DATETIME,
+col21 TIMESTAMP,
+col22 TIME,
col23 YEAR ) ENGINE = Innodb;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
CREATE INDEX prefix_idx ON testdb_wl5522.t1(col14 (10));
CREATE UNIQUE INDEX idx2 ON testdb_wl5522.t1(col12);
CREATE UNIQUE INDEX idx3 ON testdb_wl5522.t1(col8);
-INSERT INTO testdb_wl5522.t1 VALUES
+INSERT INTO testdb_wl5522.t1 VALUES
(1,1,-128,32767,-8388608,2147483647,-9223372036854775808, 92233720368.222,
-92233720368.222,'aaa', + 'aaaaaaaaaa','b','bbbbb','ccccc',
REPEAT('d',40),REPEAT('d',40),REPEAT('d',40),1,'1000-01-01',
'3000-12-31 23:59:59.99','1990-01-01 00:00:01.00',
'01:59:59.00','1901');
-INSERT INTO testdb_wl5522.t1 VALUES
+INSERT INTO testdb_wl5522.t1 VALUES
(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,NULL);
--error 1048
@@ -136,7 +121,7 @@ col18 INT NOT NULL PRIMARY KEY,
col19 DATE ,
col20 DATETIME ,
col21 TIMESTAMP ,
-col22 TIME ,
+col22 TIME,
col23 YEAR ) ENGINE = Innodb;
CREATE INDEX idx1 ON testdb_wl5522.t1(col18);
@@ -162,8 +147,6 @@ DROP TABLE testdb_wl5522.t1;
# case 3 - with blob objects
-SET GLOBAL innodb_file_format='Barracuda';
-
CREATE TABLE testdb_wl5522.t1 (
col_1_varbinary VARBINARY (4000) ,
col_2_varchar VARCHAR (4000),
@@ -178,13 +161,13 @@ INSERT INTO testdb_wl5522.t1 VALUES(
REPEAT('a', 4000),REPEAT('o', 4000),REPEAT('a', 4000), REPEAT('o', 4000),
REPEAT('a', 4000),REPEAT('a', 4000),REPEAT('a', 255));
-SELECT col_1_varbinary = REPEAT("a", 4000) ,
+SELECT col_1_varbinary = REPEAT("a", 4000),
col_2_varchar = REPEAT("o", 4000) ,
col_3_text = REPEAT("a", 4000) ,
col_4_blob = REPEAT("o", 4000) ,
col_5_text = REPEAT("a", 4000) ,
col_6_varchar = REPEAT("a", 4000) ,
-col_7_binary = REPEAT("a", 255)
+col_7_binary = REPEAT("a", 255)
FROM testdb_wl5522.t1;
FLUSH TABLES testdb_wl5522.t1 FOR EXPORT;
@@ -223,7 +206,7 @@ col_3_text = REPEAT("a", 4000) ,
col_4_blob = REPEAT("o", 4000) ,
col_5_text = REPEAT("a", 4000) ,
col_6_varchar = REPEAT("a", 4000) ,
-col_7_binary = REPEAT("a", 255)
+col_7_binary = REPEAT("a", 255)
FROM testdb_wl5522.t1;
DROP TABLE testdb_wl5522.t1;
@@ -231,7 +214,7 @@ DROP TABLE testdb_wl5522.t1;
# case 4 - trasportable tablesace with autoincrement
CREATE TABLE testdb_wl5522.t1 (
col_1_int INT AUTO_INCREMENT,
-col_2_varchar VARCHAR (20),
+col_2_varchar VARCHAR (20),
PRIMARY KEY (col_1_int)) ENGINE = Innodb;
INSERT INTO testdb_wl5522.t1 VALUES (1,'a1'),(2,'a2'),(3,'a3');
@@ -268,7 +251,7 @@ SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int;
# error on inserting duplicate value
--error 1062
INSERT INTO testdb_wl5522.t1 VALUES (1,'a1');
-# insert new values
+# insert new values
INSERT INTO testdb_wl5522.t1(col_2_varchar) VALUES ('a101'),('a102'),('a103');
SELECT * FROM testdb_wl5522.t1 ORDER BY col_1_int;
# check table can be altered
@@ -284,7 +267,7 @@ PRIMARY KEY (col_2_varchar)) ENGINE = Innodb;
CREATE TABLE testdb_wl5522.t1_fk (
col_1_int INT,col_2_varchar VARCHAR (20),
-PRIMARY KEY (col_1_int),
+PRIMARY KEY (col_1_int),
FOREIGN KEY (col_2_varchar) REFERENCES testdb_wl5522.t1(col_2_varchar)
) ENGINE = Innodb;
@@ -452,7 +435,7 @@ UNLOCK TABLES;
DROP TABLE testdb_wl5522.t1;
-# create table with incorrect schema
+# create table with incorrect schema
CREATE TABLE testdb_wl5522.t1 ( i bigint) ENGINE = Innodb;
ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE;
@@ -820,14 +803,14 @@ SET AUTOCOMMIT = 1;
CREATE TABLE testdb_wl5522.t1(col1 bit(1) ,
col2 boolean,col3 tinyint , col4 smallint ,
-col5 mediumint ,col6 int , col7 bigint ,
+col5 mediumint ,col6 int , col7 bigint ,
col8 float (14,3) ,col9 double (14,3),
col10 VARCHAR(20) CHARACTER SET utf8 ,
col11 TEXT CHARACTER SET binary ,
col12 ENUM('a','b','c') CHARACTER SET binary,
col13 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs ,
col14 CHAR(20) , col15 VARBINARY (400),
-col16 BINARY(40), col17 BLOB (400),
+col16 BINARY(40), col17 BLOB (400),
col18 int not null primary key,
col19 DATE ,col20 DATETIME , col21 TIMESTAMP ,
col22 TIME , col23 YEAR ) ENGINE = Innodb;
@@ -835,7 +818,7 @@ col22 TIME , col23 YEAR ) ENGINE = Innodb;
# table for trigger action
CREATE TABLE testdb_wl5522.trigger_table ( i int ) ENGINE = Innodb;
# define trigger
-CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1
+CREATE TRIGGER testdb_wl5522.tri AFTER INSERT ON testdb_wl5522.t1
FOR EACH ROW INSERT INTO testdb_wl5522.trigger_table VALUES(NEW.col18);
# define view
CREATE OR REPLACE VIEW testdb_wl5522.VW1 AS SELECT * FROM testdb_wl5522.t1;
@@ -917,7 +900,7 @@ SELECT COUNT(*) FROM testdb_wl5522.t1;
SELECT * FROM testdb_wl5522.trigger_table;
SELECT COUNT(*) FROM testdb_wl5522.VW1;
-# trigger table is not updated as trigger got dropped
+# trigger table is not updated as trigger got dropped
INSERT INTO testdb_wl5522.t1(col18) VALUES (5);
# validate data in table not updated
SELECT * FROM testdb_wl5522.trigger_table;
@@ -949,6 +932,3 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1_fk.ibd
-
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
index 1f15c81b90b..2858fa7c8e1 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
@@ -19,30 +19,16 @@
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
-call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
-call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted in file: .* ");
call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
-call mtr.add_suppression("InnoDB: Page for tablespace .* ");
-flush tables;
+call mtr.add_suppression("InnoDB: Page for tablespace ");
+call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=0x");
+FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
-
-
-DROP DATABASE IF EXISTS test_wl5522;
CREATE DATABASE test_wl5522;
# Create the table that we will use for crash recovery (during IMPORT)
@@ -140,14 +126,7 @@ SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
DROP TABLE test_wl5522.t1;
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
ROW_FORMAT=COMPRESSED;
@@ -755,7 +734,3 @@ call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl552
#cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
-
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index e537f5c0fc3..6a94c73e622 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -19,13 +19,13 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified.");
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: .*");
-call mtr.add_suppression("InnoDB: Tablespace flags: .*");
call mtr.add_suppression("InnoDB: Ignoring tablespace .* because it could not be opened.");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .*");
-call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file .*");
-call mtr.add_suppression("InnoDB: Page for tablespace .* ");
-flush tables;
+call mtr.add_suppression("InnoDB: Page 0 at offset 0 looks corrupted in file");
+call mtr.add_suppression("InnoDB: Page for tablespace ");
+call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
+FLUSH TABLES;
let MYSQLD_DATADIR =`SELECT @@datadir`;
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
index 395e4def85d..4181b52573c 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-zip.test
@@ -9,22 +9,7 @@
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
-
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
let $MYSQLD_DATADIR = `SELECT @@datadir`;
@@ -87,15 +72,8 @@ DROP TABLE t1;
--remove_file $MYSQLD_TMPDIR/t1.cfg
--remove_file $MYSQLD_TMPDIR/t1.ibd
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
# restore session variable
SET SESSION innodb_strict_mode=1;
-SELECT @@SESSION.innodb_strict_mode;
let MYSQLD_DATADIR =`SELECT @@datadir`;
@@ -218,7 +196,7 @@ DROP TABLE t1;
# table and restore, this time the table has a secondary index too.
CREATE TABLE t1(
c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- c2 INT, INDEX(c2)) ENGINE=InnoDB
+ c2 INT, INDEX(c2)) ENGINE=InnoDB
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
INSERT INTO t1(c2) VALUES(1);
@@ -540,7 +518,3 @@ call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tabl
# cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
-
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
-eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522.test b/mysql-test/suite/innodb/t/innodb-wl5522.test
index b04c726b74a..d2b6fca4d4a 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522.test
@@ -4,19 +4,7 @@
-- source include/have_innodb.inc
call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT.");
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
-let $innodb_file_format = `SELECT @@innodb_file_format`;
-
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
+FLUSH TABLES;
let $MYSQLD_TMPDIR = `SELECT @@tmpdir`;
let $MYSQLD_DATADIR = `SELECT @@datadir`;
@@ -80,12 +68,6 @@ DROP TABLE t1;
--remove_file $MYSQLD_TMPDIR/t1.cfg
--remove_file $MYSQLD_TMPDIR/t1.ibd
-SET GLOBAL innodb_file_per_table = 1;
-SELECT @@innodb_file_per_table;
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SELECT @@innodb_file_format;
-
let MYSQLD_DATADIR =`SELECT @@datadir`;
# Try importing when tablespace already exists
@@ -877,10 +859,8 @@ DROP TABLE t1;
call mtr.add_suppression("Got error -1 when reading table '.*'");
call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
+FLUSH TABLES;
# cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
-
-eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
-eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
diff --git a/mysql-test/suite/innodb/t/innodb_blob_truncate.test b/mysql-test/suite/innodb/t/innodb_blob_truncate.test
index 8a4248c795e..3e54ec80e2b 100644
--- a/mysql-test/suite/innodb/t/innodb_blob_truncate.test
+++ b/mysql-test/suite/innodb/t/innodb_blob_truncate.test
@@ -1,14 +1,6 @@
--source include/have_innodb.inc
--source include/have_innodb_16k.inc
---disable_query_log
-let $innodb_file_format_orig = `SELECT @@innodb_file_format`;
-let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SET GLOBAL innodb_file_format = `Barracuda`;
-SET GLOBAL innodb_file_per_table = ON;
-
create table t1(a blob) engine=innodb key_block_size=8;
delimiter //;
create function generate_blob()
@@ -38,8 +30,3 @@ if ($x) {
}
drop table t1;
drop function generate_blob;
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig;
-EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig;
---enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_bug59641.test b/mysql-test/suite/innodb/t/innodb_bug59641.test
index bca3f4a92c1..5f7528cf01a 100644
--- a/mysql-test/suite/innodb/t/innodb_bug59641.test
+++ b/mysql-test/suite/innodb/t/innodb_bug59641.test
@@ -2,11 +2,11 @@
# Bug #59641 Prepared XA transaction causes shutdown hang after a crash
-- source include/not_embedded.inc
-# The server would issue this warning on restart.
-call mtr.add_suppression("Found 3 prepared XA transactions");
-# Close tables used by other tests (to not get crashed myisam tables)
-flush tables;
+--disable_query_log
+call mtr.add_suppression("Found 3 prepared XA transactions");
+FLUSH TABLES;
+--enable_query_log
CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
@@ -17,7 +17,6 @@ XA END '123';
XA PREPARE '123';
CONNECT (con1,localhost,root,,);
-CONNECTION con1;
XA START '456';
INSERT INTO t VALUES(3,47),(5,67);
@@ -26,7 +25,6 @@ XA END '456';
XA PREPARE '456';
CONNECT (con2,localhost,root,,);
-CONNECTION con2;
XA START '789';
UPDATE t SET b=4*a WHERE a=32;
@@ -34,30 +32,13 @@ XA END '789';
XA PREPARE '789';
CONNECT (con3,localhost,root,,);
-CONNECTION con3;
-# Kill the server without sending a shutdown command
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server 0
--- source include/wait_until_disconnected.inc
-
-# Restart the server.
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
+--source include/kill_and_restart_mysqld.inc
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
COMMIT;
-# Shut down the server. This would hang because of the bug.
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server
--- source include/wait_until_disconnected.inc
-
-# Restart the server.
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
+--source include/restart_mysqld.inc
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t;
diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
index adae10df2ad..7fb4037e6bb 100644
--- a/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
+++ b/mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
@@ -16,20 +16,10 @@
# which is not there with embedded mode
--source include/not_embedded.inc
# Save innodb variables
-let $innodb_file_format_orig=`select @@innodb_file_format`;
-let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
-# Set Innodb file format as feature works for Barracuda file format
-set global innodb_file_format="Barracuda";
-set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
--- disable_warnings
-DROP TABLE IF EXISTS worklog5743;
--- enable_warnings
-
-
#------------------------------------------------------------------------------
# Stop the server in between when prefix index are created and see if state is
# correct when server is restarted.
@@ -111,6 +101,4 @@ DROP TABLE worklog5743;
#------------------------------------------------------------------------------
-eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
-eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
diff --git a/mysql-test/suite/innodb/t/log_alter_table.test b/mysql-test/suite/innodb/t/log_alter_table.test
new file mode 100644
index 00000000000..f479c6695aa
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_alter_table.test
@@ -0,0 +1,51 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+
+--echo #
+--echo # Bug#21801423 INNODB REDO LOG DOES NOT INDICATE WHEN
+--echo # FILES ARE CREATED
+--echo #
+--echo # Bug#21796691 INNODB REDO LOG DOES NOT INDICATE WHEN
+--echo # REDO LOGGING IS SKIPPED
+--echo #
+--source include/no_checkpoint_start.inc
+CREATE TABLE t1 (a INT NOT NULL, b INT UNIQUE) ENGINE=InnoDB;
+# MLOG_INDEX_LOAD will not be emitted for empty tables. Insert a row.
+INSERT INTO t1 VALUES (1,2);
+# We should get two MLOG_INDEX_LOAD for this.
+ALTER TABLE t1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
+# And one MLOG_INDEX_LOAD for this.
+ALTER TABLE t1 DROP INDEX b, ADD INDEX (b);
+
+--let CLEANUP_IF_CHECKPOINT=DROP TABLE t1;
+--source include/no_checkpoint_end.inc
+
+--let $restart_parameters= --debug=d,ib_log
+--source include/start_mysqld.inc
+
+let SEARCH_RANGE = -50000;
+let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_ABORT=NOT FOUND;
+# Look for at least one MLOG_FILE_CREATE2 in the error log.
+# Theoretically, it may have been written by this test or an earlier test.
+# FIXME: redirect the error log of the restart to a new file,
+# and ensure that we have exactly 2 records there.
+let SEARCH_PATTERN=scan .*: multi-log rec MLOG_FILE_CREATE2.*page .*:0;
+--source include/search_pattern_in_file.inc
+# Look for at least one MLOG_INDEX_LOAD in the error log.
+# Theoretically, it may have been written by this test or an earlier test.
+# FIXME: redirect the error log of the restart to a new file,
+# and ensure that we have exactly 3 records there.
+let SEARCH_PATTERN=scan .*: log rec MLOG_INDEX_LOAD;
+--source include/search_pattern_in_file.inc
+
+CHECK TABLE t1;
+
+# Remove the --debug=d,ib_log setting.
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/log_corruption.test b/mysql-test/suite/innodb/t/log_corruption.test
new file mode 100644
index 00000000000..664894f2c41
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_corruption.test
@@ -0,0 +1,149 @@
+--source include/have_unzip.inc
+--source include/have_innodb.inc
+--source include/have_innodb_16k.inc
+
+let bugdir= $MYSQLTEST_VARDIR/tmp/log_corruption;
+--mkdir $bugdir
+--let SEARCH_RANGE = -50000
+--let SEARCH_FILE = $bugdir/my_restart.err
+--let SEARCH_ABORT=NOT FOUND
+--let $args=--defaults-file=$bugdir/my.cnf --loose-console >> $SEARCH_FILE 2>&1
+
+perl;
+die unless open IN, "<", "$ENV{MYSQLTEST_VARDIR}/my.cnf";
+my $found;
+while (<IN>) { $found=$1 if /^(lc-messages-dir=.*)/ }
+close IN;
+
+die unless defined $found;
+die unless open OUT, ">", "$ENV{bugdir}/my.cnf";
+print OUT "[mysqld]
+$found
+innodb_data_home_dir = $ENV{bugdir}
+datadir = $ENV{bugdir}
+secure_file_priv=
+skip_aria
+core_file
+";
+EOF
+
+--echo # redo log from before MySQL 5.7.9
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9\\.;
+--source include/search_pattern_in_file.inc
+
+--echo # redo log from before MySQL 5.7.9, with corrupted log checkpoint
+--remove_file $bugdir/ib_logfile0
+--copy_file $bugdir/ib_logfile1 $bugdir/ib_logfile0
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9, and we did not find a valid checkpoint;
+--source include/search_pattern_in_file.inc
+
+--echo # redo log from before MySQL 5.7.9, with corrupted log block
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption0.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Upgrade after a crash is not supported. This redo log was created before MySQL 5\\.7\\.9, and it appears corrupted;
+--source include/search_pattern_in_file.inc
+
+--echo # redo log from "after" MySQL 5.7.9, but with invalid header checksum
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption1.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Invalid redo log header checksum;
+--source include/search_pattern_in_file.inc
+
+--echo # distant future redo log format, with valid header checksum
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption2.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Unsupported redo log format. The redo log was created with malicious intentions, or perhaps\. Please follow the instructions at http://dev.mysql.com/doc/refman/5.7/en/upgrading-downgrading.html;
+--source include/search_pattern_in_file.inc
+
+--echo # valid header, but old-format checkpoint blocks
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption3.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: No valid checkpoint found .corrupted redo log;
+--source include/search_pattern_in_file.inc
+
+--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block checksum
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption4.zip -d $bugdir > $SEARCH_FILE
+# Anything below innodb_force_recovery=6 must find a valid redo log.
+# Missing tablespace files are tolerated already with innodb_force_recovery=1.
+--error 1
+--exec $MYSQLD $args --innodb-force-recovery=5
+let SEARCH_PATTERN=InnoDB: Log block 2372 at lsn 1213952 has valid header, but checksum field contains 144444122, should be 3362026715;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed;
+--source include/search_pattern_in_file.inc
+--echo # --innodb-force-recovery=6 (skip the entire redo log)
+--error 1
+--exec $MYSQLD $args --innodb-force-recovery=6
+let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in read-only mode;
+--source include/search_pattern_in_file.inc
+
+--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2, invalid block number
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption4a.zip -d $bugdir > $SEARCH_FILE
+# Anything below innodb_force_recovery=6 must find a valid redo log.
+# Missing tablespace files are tolerated already with innodb_force_recovery=1.
+--error 1
+--exec $MYSQLD $args --innodb-force-recovery=5
+let SEARCH_PATTERN=InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 1213964 and the end 1213952\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=Plugin 'InnoDB' registration as a STORAGE ENGINE failed;
+--source include/search_pattern_in_file.inc
+--echo # --innodb-force-recovery=6 (skip the entire redo log)
+--error 1
+--exec $MYSQLD $args --innodb-force-recovery=6
+let SEARCH_PATTERN=InnoDB: Cannot create sys_virtual system tables. running in read-only mode;
+--source include/search_pattern_in_file.inc
+
+--echo # Test a corrupted MLOG_FILE_NAME record.
+--echo # valid header, valid checkpoint 1, all-zero (invalid) checkpoint 2
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption5.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: Log scan progressed past the checkpoint lsn 1213964;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: ############### CORRUPT LOG RECORD FOUND ##################;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus ;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error;
+--source include/search_pattern_in_file.inc
+
+--echo # Test a corrupted MLOG_FILE_NAME record.
+--echo # valid header, invalid checkpoint 1, valid checkpoint 2
+--remove_file $bugdir/ib_logfile0
+--exec unzip $MTR_SUITE_DIR/std_data/log_corruption6.zip -d $bugdir > $SEARCH_FILE
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=InnoDB: ############### CORRUPT LOG RECORD FOUND ##################;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Log record type 55, page 151:488\. Log parsing proceeded successfully up to 1213973\. Previous log record type 56, is multi 0 Recv offset 9, prev 0;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Hex dump starting 0 bytes before and ending 13 bytes after the corrupted record;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= len 22. hex 38000000000012860cb7809781e80006626f67757300. asc 8 bogus ;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=InnoDB: Set innodb_force_recovery to ignore this error;
+--source include/search_pattern_in_file.inc
+
+--list_files $bugdir
+--remove_files_wildcard $bugdir
+--rmdir $bugdir
diff --git a/mysql-test/suite/innodb/t/log_file.test b/mysql-test/suite/innodb/t/log_file.test
new file mode 100644
index 00000000000..7e52ccfc726
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_file.test
@@ -0,0 +1,262 @@
+--echo # Testcase for the following bugs
+--echo # Bug#16691130 - ASSERT WHEN INNODB_LOG_GROUP_HOME_DIR DOES NOT EXIST
+--echo # Bug#16418661 - CHANGING NAME IN FOR INNODB_DATA_FILE_PATH SHOULD NOT SUCCEED WITH LOG FILES
+
+--source include/have_innodb.inc
+
+let bugdir= $MYSQLTEST_VARDIR/tmp/log_file;
+--mkdir $bugdir
+
+--let SEARCH_RANGE = -50000
+--let SEARCH_FILE = $bugdir/my_restart.err
+--let SEARCH_ABORT=NOT FOUND
+--let $args=--defaults-file=$bugdir/my.cnf --loose-console > $SEARCH_FILE 2>&1
+
+--echo # Write tmp/log_file/my.cnf
+
+perl;
+die unless open IN, "<", "$ENV{MYSQLTEST_VARDIR}/my.cnf";
+my $found;
+while (<IN>) { $found=$1 if /^(lc-messages-dir=.*)/ }
+close IN;
+
+die unless defined $found;
+die unless open OUT, ">", "$ENV{bugdir}/my.cnf";
+print OUT "[mysqld]
+$found
+innodb_data_home_dir = $ENV{bugdir}
+datadir = $ENV{bugdir}
+secure_file_priv=
+skip_aria
+core_file
+innodb_data_file_path = ibdata1:10M;ibdata2:10M:autoextend
+innodb_undo_logs = 20
+innodb_undo_tablespaces = 3
+innodb_log_files_in_group = 3
+skip_innodb_use_native_aio # MDEV-11948 CentOS 5 fails to write ib_logfile101
+";
+close(OUT);
+EOF
+
+--echo # Start mysqld without the possibility to create innodb_undo_tablespaces
+--mkdir $bugdir/undo002
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=\[ERROR\] InnoDB: Could not create undo tablespace '.*undo002';
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+--echo # Remove undo001,undo002,ibdata1,ibdata2,ib_logfile1,ib_logfile2,ib_logfile101
+--remove_file $bugdir/undo001
+--rmdir $bugdir/undo002
+--remove_file $bugdir/ibdata1
+--remove_file $bugdir/ibdata2
+--remove_file $bugdir/ib_logfile1
+--remove_file $bugdir/ib_logfile2
+--remove_file $bugdir/ib_logfile101
+--list_files $bugdir
+
+--echo # Start mysqld with non existent innodb_log_group_home_dir
+--error 1
+--exec $MYSQLD $args --innodb_log_group_home_dir=/path/to/non-existent/
+let SEARCH_PATTERN=File .path.to.non-existent.*ib_logfile101: 'create' returned OS error \d+;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+--echo # Remove ibdata1 & ibdata2
+--remove_file $bugdir/ibdata1
+--remove_file $bugdir/ibdata2
+--list_files $bugdir
+
+# Innodb creates system tablespaces according to my.cnf and aborts
+# complaining about mysql.* tables. This is sufficient for testing
+# missing tablespaces.
+--echo # Start mysqld to create tablespaces according to my.cnf
+--error 2
+--exec $MYSQLD $args --skip-grant-tables --innodb-unknown-parameter
+let SEARCH_PATTERN=unknown option '--innodb-unknown-parameter';
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+--echo # Backup tmp/logfile/*
+--copy_file $bugdir/ibdata1 $bugdir/bak_ibdata1
+--copy_file $bugdir/ibdata2 $bugdir/bak_ibdata2
+--copy_file $bugdir/ib_logfile0 $bugdir/bak_ib_logfile0
+--copy_file $bugdir/ib_logfile1 $bugdir/bak_ib_logfile1
+--copy_file $bugdir/ib_logfile2 $bugdir/bak_ib_logfile2
+--copy_file $bugdir/undo001 $bugdir/bak_undo001
+--copy_file $bugdir/undo002 $bugdir/bak_undo002
+--copy_file $bugdir/undo003 $bugdir/bak_undo003
+
+--echo # 1. With ibdata2, Without ibdata1
+--remove_file $bugdir/ibdata1
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=The innodb_system data file 'ibdata1' was not found but one of the other data files 'ibdata2' exists;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 2. With ibdata1, without ibdata2
+--remove_file $bugdir/ibdata2
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=Tablespace size stored in header is \d+ pages, but;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 3. Without ibdata1 & ibdata2
+--remove_file $bugdir/ibdata1
+--remove_file $bugdir/ibdata2
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 4. Without ibdata*, ib_logfile* and with undo00*
+--remove_files_wildcard $bugdir ibdata*
+--remove_files_wildcard $bugdir ib_logfile*
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+
+--echo # 5. Without ibdata*,ib_logfile* files & Without undo002
+--remove_files_wildcard $bugdir ibdata*
+--remove_files_wildcard $bugdir ib_logfile*
+--remove_file $bugdir/undo002
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=undo tablespace .*undo001.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 6. Without ibdata*,ib_logfile* files & Without undo001, undo002
+# and with undo003
+--remove_files_wildcard $bugdir ibdata*
+--remove_files_wildcard $bugdir ib_logfile*
+--remove_file $bugdir/undo001
+--remove_file $bugdir/undo002
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=undo tablespace .*undo003.* exists\. Creating system tablespace with existing undo tablespaces is not supported\. Please delete all undo tablespaces before creating new system tablespace\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 7. With ibdata files & Without undo002
+--remove_file $bugdir/undo002
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=to find only 1 undo tablespaces;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 8. With ibdata files & Without undo001, undo002
+--remove_file $bugdir/undo001
+--remove_file $bugdir/undo002
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=Expected to open 3 undo tablespaces but was able;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=to find only 0 undo tablespaces;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 9. Without ibdata*, without undo*, Without ib_logfile1 and with ib_logfile2
+--remove_files_wildcard $bugdir ibdata*
+--remove_files_wildcard $bugdir undo00*
+--remove_file $bugdir/ib_logfile1
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=redo log file .*ib_logfile0.* exists\. Creating system tablespace with existing redo log files is not recommended\. Please delete all redo log files before creating new system tablespace\.;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+# 10. With ibdata*, without ib_logfile0
+#--remove_file $bugdir/ib_logfile0
+# The below would start the server. Since we cannot start a parallel
+# server, do not test the below case
+#--error 1
+#--exec $MYSQLD $args
+
+# clean up & Restore
+#--source ../include/log_file_cleanup.inc
+
+--echo # 11. With ibdata*, without ib_logfile1
+--remove_file $bugdir/ib_logfile1
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=Only one log file found;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN=\[ERROR\] Aborting;
+--source include/search_pattern_in_file.inc
+
+# clean up & Restore
+--source ../include/log_file_cleanup.inc
+
+--echo # 12. With ibdata*, without ib_logfile2
+--remove_file $bugdir/ib_logfile2
+--list_files $bugdir
+--error 1
+--exec $MYSQLD $args
+let SEARCH_PATTERN=Resizing redo log from \d+\*\d+ to \d+\*\d+ pages, LSN=\d+;
+--source include/search_pattern_in_file.inc
+
+--echo # Cleanup
+# Remove ibtmp* which are re-generated after each mysqld invocation
+# skip auto generated auto.cnf from list_files
+--remove_files_wildcard $bugdir auto.cnf
+--remove_files_wildcard $bugdir ibtmp*
+--list_files $bugdir
+--remove_files_wildcard $bugdir
+--rmdir $bugdir
diff --git a/mysql-test/suite/innodb/t/log_file_name.test b/mysql-test/suite/innodb/t/log_file_name.test
new file mode 100644
index 00000000000..5c063ab124f
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_file_name.test
@@ -0,0 +1,267 @@
+# WL#7142 InnoDB: Simplify tablespace discovery during crash recovery
+# Test the detection of duplicate tablespaces.
+
+--source include/have_innodb.inc
+
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+
+SET GLOBAL innodb_file_per_table=ON;
+
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+
+--source include/no_checkpoint_start.inc
+CREATE TABLE t3(a INT PRIMARY KEY) ENGINE=InnoDB;
+
+BEGIN;
+INSERT INTO t3 VALUES (33101),(347);
+INSERT INTO t1 VALUES (42),(9),(101);
+RENAME TABLE t1 TO t2;
+UPDATE t2 SET a=347 where a=42;
+COMMIT;
+
+--let CLEANUP_IF_CHECKPOINT=DROP TABLE t2,t3;
+--source include/no_checkpoint_end.inc
+
+--echo # Fault 0 (no real fault): Orphan file with duplicate space_id.
+--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t0.ibd
+
+--echo # Fault 1: Two dirty files with the same space_id.
+--copy_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t1.ibd
+
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_RANGE= -50000;
+let SEARCH_ABORT= NOT FOUND;
+let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES
+WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+
+# This could fail to refuse InnoDB startup, in case there was a log
+# checkpoint after the INSERT. That is what we checked above.
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t2.ibd' with space ID \d+. Another data file called .*t1.ibd exists with the same space ID;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+--remove_file $MYSQLD_DATADIR/test/t1.ibd
+
+# This could fail to refuse InnoDB startup, in case there was a log
+# checkpoint after the CREATE TABLE t3. That is what we checked above.
+--echo # Fault 2: Wrong space_id in a dirty file, and a missing file.
+--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t1.ibd
+
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t1.ibd' with space ID;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at.*t3.ibd;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+--move_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t3.ibd
+
+--echo # Fault 3: Wrong space_id in a dirty file, and no missing file.
+# Swap t2.ibd and t3.ibd.
+--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t.ibd
+--move_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t3.ibd
+--move_file $MYSQLD_DATADIR/test/t.ibd $MYSQLD_DATADIR/test/t2.ibd
+
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= InnoDB: Ignoring data file '.*t[23].ibd' with space ID;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t1.ibd;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t3.ibd;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+# Swap back t3.ibd, but hide t2.ibd (which the redo log also knows as t1.ibd).
+--move_file $MYSQLD_DATADIR/test/t3.ibd $MYSQLD_DATADIR/test/t.ibd
+--move_file $MYSQLD_DATADIR/test/t2.ibd $MYSQLD_DATADIR/test/t3.ibd
+
+--echo # Fault 4: Missing data file
+
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= InnoDB: Tablespace \d+ was not found at .*t[12].ibd.
+.*InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+--echo # Fault 5: Wrong type of data file
+
+# TODO: Test the following as well once
+# Bug#18131883 IMPROVE INNODB ERROR MESSAGES REGARDING FILES
+# has been fixed:
+# A file containing 16384 zero bytes.
+# --mkdir $MYSQLD_DATADIR/test/t2.ibd
+
+# Create a short file.
+--exec echo "" > $MYSQLD_DATADIR/test/t2.ibd
+
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Datafile .*t2.*\. Cannot determine the space ID from the first 64 pages;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+# Restore t2.ibd
+--remove_file $MYSQLD_DATADIR/test/t2.ibd
+--move_file $MYSQLD_DATADIR/test/t.ibd $MYSQLD_DATADIR/test/t2.ibd
+
+--source include/start_mysqld.inc
+
+SELECT * FROM t2;
+SELECT * FROM t3;
+SHOW TABLES;
+DROP TABLE t2,t3;
+
+--error ER_TABLESPACE_EXISTS
+CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB;
+
+# Remove the orphan file from fault 0.
+--remove_file $MYSQLD_DATADIR/test/t0.ibd
+
+CREATE TABLE t0(a INT PRIMARY KEY) ENGINE=InnoDB;
+DROP TABLE t0;
+
+--disable_query_log
+# The following are for the orphan file t0.ibd:
+call mtr.add_suppression("InnoDB: Operating system error number [0-9]* in a file operation");
+call mtr.add_suppression("InnoDB: Error number [0-9]* means 'File exists'");
+call mtr.add_suppression("InnoDB: Cannot create file '.*t0.ibd'");
+call mtr.add_suppression("InnoDB: The file '.*t0\.ibd' already exists");
+# The following are for aborted startup without --innodb-force-recovery:
+call mtr.add_suppression("InnoDB: Tablespace .* was not found at .*test");
+call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore this and to permanently lose all changes to the tablespace");
+call mtr.add_suppression("InnoDB: Cannot read first page of '.*test.[tu]2.ibd' I/O error");
+call mtr.add_suppression("InnoDB: Cannot read first page in datafile: .*test.*ibd");
+call mtr.add_suppression("InnoDB: Datafile '.*test.*ibd' is corrupted");
+call mtr.add_suppression("InnoDB: Cannot replay file rename. Remove either file and try again");
+call mtr.add_suppression("InnoDB: Cannot rename.*because the target file exists");
+call mtr.add_suppression("InnoDB: Found corrupted log");
+# The following are for the --innodb-force-recovery=1 with broken u* tables:
+call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd");
+call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
+call mtr.add_suppression("InnoDB: .*you must create directories");
+call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: '.*u[1-5]\.ibd'");
+call mtr.add_suppression("InnoDB: Could not find a valid tablespace file for `test/u[1-5]`");
+call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`.`u[1-3]` because it could not be opened.");
+call mtr.add_suppression("InnoDB: Failed to find tablespace for table .* in the cache. Attempting to load the tablespace with space id");
+call mtr.add_suppression("InnoDB: Plugin initialization aborted");
+call mtr.add_suppression("Plugin 'InnoDB' \(init function returned error\|registration as a STORAGE ENGINE failed\)");
+FLUSH TABLES;
+--enable_query_log
+
+--source include/no_checkpoint_start.inc
+
+CREATE TABLE u1(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u2(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u3(a INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE u4(a INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO u4 VALUES(1);
+RENAME TABLE u4 TO u5;
+RENAME TABLE u5 TO u6;
+INSERT INTO u6 VALUES(2);
+
+--let CLEANUP_IF_CHECKPOINT=DROP TABLE u1,u2,u3,u6;
+--source include/no_checkpoint_end.inc
+
+--echo # Fault 6: All-zero data file and innodb_force_recovery
+
+--remove_file $MYSQLD_DATADIR/test/u1.ibd
+--remove_file $MYSQLD_DATADIR/test/u2.ibd
+--remove_file $MYSQLD_DATADIR/test/u3.ibd
+
+# InnoDB: Header page consists of zero bytes
+perl;
+die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/test/u1.ibd");
+print FILE "\0" x 16384;
+close(FILE);
+EOF
+
+--exec echo "" > $MYSQLD_DATADIR/test/u2.ibd
+
+# TODO: Test with this, once
+# Bug#18131883 IMPROVE INNODB ERROR MESSAGES REGARDING FILES
+# has been fixed:
+#--mkdir $MYSQLD_DATADIR/test/u3.ibd
+
+--copy_file $MYSQLD_DATADIR/test/u6.ibd $MYSQLD_DATADIR/test/u4.ibd
+
+--let $restart_parameters= --innodb-force-recovery=1
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Datafile .*u1.*\. Cannot determine the space ID from the first 64 pages;
+--source include/search_pattern_in_file.inc
+
+# TODO: These errors should state the file name (u2.ibd) and be ignored
+# in innodb-force-recovery mode once
+# Bug#18131883 IMPROVE INNODB ERROR MESSAGES REGARDING FILES
+# has been fixed:
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot read first page of .*u2.ibd.*;
+--source include/search_pattern_in_file.inc
+
+--source include/shutdown_mysqld.inc
+
+# Allow --innodb-force-recovery to start despite the broken file.
+# TODO: Remove this workaround, and make --innodb-force-recovery=1
+# ignore the broken file.
+--remove_file $MYSQLD_DATADIR/test/u2.ibd
+
+--echo # Fault 7: Missing or wrong data file and innodb_force_recovery
+
+--source include/start_mysqld.inc
+eval $check_no_innodb;
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot rename '.*u5.ibd' to '.*u6.ibd' for space ID \d+ because the target file exists;
+--source include/search_pattern_in_file.inc
+
+--remove_file $MYSQLD_DATADIR/test/u6.ibd
+
+--source include/restart_mysqld.inc
+
+let SEARCH_PATTERN= \[ERROR\] InnoDB: Header page consists of zero bytes in datafile: .*u1.ibd;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace;
+--source include/search_pattern_in_file.inc
+
+let SEARCH_PATTERN= \[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+DROP TABLE u1,u2,u3,u6;
+
+--remove_file $MYSQLD_DATADIR/test/u1.ibd
+--echo # List of files:
+--list_files $MYSQLD_DATADIR/test
+
+SHOW TABLES;
diff --git a/mysql-test/suite/innodb/t/log_file_name_debug.test b/mysql-test/suite/innodb/t/log_file_name_debug.test
new file mode 100644
index 00000000000..41d7ec2e53e
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_file_name_debug.test
@@ -0,0 +1,31 @@
+--source include/have_innodb.inc
+# Embedded server does not support restarting
+--source include/not_embedded.inc
+--source include/have_debug.inc
+
+--echo #
+--echo # Bug#19685095 DO NOT CARE ABOUT UNRESOLVED MLOG_FILE_NAME
+--echo # IF THERE ARE NO OPERATIONS TO APPLY
+--echo #
+
+SET GLOBAL DEBUG_DBUG='+d,fil_names_write_bogus';
+--disable_query_log
+FLUSH TABLES;
+--enable_query_log
+
+--source include/no_checkpoint_start.inc
+
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+
+--let CLEANUP_IF_CHECKPOINT=DROP TABLE t1;
+--source include/no_checkpoint_end.inc
+
+--source include/start_mysqld.inc
+
+DROP TABLE t1;
+
+--let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err
+--let SEARCH_PATTERN = InnoDB: Tablespace 4294967280 was not found at .*, but there were no modifications either
+--let SEARCH_ABORT = NOT FOUND
+--let SEARCH_RANGE = -50000
+--source include/search_pattern_in_file.inc
diff --git a/mysql-test/suite/innodb/t/log_file_size.test b/mysql-test/suite/innodb/t/log_file_size.test
new file mode 100644
index 00000000000..9d004991735
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_file_size.test
@@ -0,0 +1,218 @@
+# Test resizing the InnoDB redo log.
+
+--source include/have_innodb.inc
+
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+# DBUG_EXECUTE_IF is needed
+--source include/have_debug.inc
+
+if (`SELECT @@innodb_log_file_size = 1048576`) {
+ --skip Test requires innodb_log_file_size>1M.
+}
+
+--disable_query_log
+call mtr.add_suppression("InnoDB: Resizing redo log");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created");
+call mtr.add_suppression("InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles");
+call mtr.add_suppression("syntax error in innodb_log_group_home_dir");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
+call mtr.add_suppression("InnoDB: Plugin initialization aborted");
+call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery");
+call mtr.add_suppression("InnoDB: Are you sure you are using the right ib_logfiles");
+call mtr.add_suppression("InnoDB: Cannot create log files in read-only mode");
+call mtr.add_suppression("InnoDB: Only one log file found");
+call mtr.add_suppression("InnoDB: Log file .*ib_logfile[01].* size");
+call mtr.add_suppression("InnoDB: Unable to open .*ib_logfile0. to check native AIO read support");
+FLUSH TABLES;
+--enable_query_log
+
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+BEGIN;
+INSERT INTO t1 VALUES (42);
+
+let $restart_parameters = --innodb-log-file-size=6M;
+--source include/kill_and_restart_mysqld.inc
+
+SELECT * FROM t1;
+
+INSERT INTO t1 VALUES (42);
+BEGIN;
+DELETE FROM t1;
+
+let $restart_parameters = --innodb-log-files-in-group=3 --innodb-log-file-size=5M;
+--source include/kill_and_restart_mysqld.inc
+
+SELECT * FROM t1;
+
+INSERT INTO t1 VALUES (123);
+
+let MYSQLD_DATADIR= `select @@datadir`;
+let SEARCH_ABORT = NOT FOUND;
+let SEARCH_RANGE= -50000;
+let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
+
+BEGIN;
+DELETE FROM t1;
+
+--source include/kill_mysqld.inc
+
+--let $restart_parameters= --innodb-log-group-home-dir=foo\;bar
+--source include/start_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= syntax error in innodb_log_group_home_dir;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_1
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_3
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --innodb-read-only
+--source include/restart_mysqld.inc
+
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_4
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_5
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --innodb-read-only
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: innodb_read_only prevents crash recovery;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_6
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Starting an apply batch of log records;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Resizing redo log from 3\*[0-9]+ to 2\*[0-9]+ pages;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_7
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+# this aborts right after deleting all log files
+
+--let $restart_parameters= --innodb-read-only
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Cannot create log files in read-only mode;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_8
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters= --debug=d,innodb_log_abort_9
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
+--source include/search_pattern_in_file.inc
+--source include/shutdown_mysqld.inc
+
+# We should have perfectly synced files here.
+# Rename the log files, and trigger an error in recovery.
+--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
+--move_file $MYSQLD_DATADIR/ib_logfile1 $MYSQLD_DATADIR/ib_logfile1_hidden
+
+--let $restart_parameters=
+--source include/start_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Only one log file found;
+--source include/search_pattern_in_file.inc
+--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
+
+perl;
+die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile0");
+print FILE "garbage";
+close(FILE);
+EOF
+
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile0 size 7 is not a multiple of innodb_page_size;
+--source include/search_pattern_in_file.inc
+--remove_file $MYSQLD_DATADIR/ib_logfile0
+--move_file $MYSQLD_DATADIR/ib_logfile101 $MYSQLD_DATADIR/ib_logfile0
+
+perl;
+die unless open(FILE, ">$ENV{MYSQLD_DATADIR}/ib_logfile1");
+print FILE "junkfill" x 131072;
+close(FILE);
+EOF
+
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Log file .*ib_logfile1 is of different size 1048576 bytes than other log files;
+--source include/search_pattern_in_file.inc
+--remove_file $MYSQLD_DATADIR/ib_logfile1
+--move_file $MYSQLD_DATADIR/ib_logfile0 $MYSQLD_DATADIR/ib_logfile101
+--move_file $MYSQLD_DATADIR/ib_logfile1_hidden $MYSQLD_DATADIR/ib_logfile1
+
+--let $restart_parameters= --debug=d,innodb_log_abort_10
+--source include/restart_mysqld.inc
+--error ER_UNKNOWN_STORAGE_ENGINE
+SELECT * FROM t1;
+
+let SEARCH_PATTERN= InnoDB: Setting log file .*ib_logfile[0-9]+ size to;
+--source include/search_pattern_in_file.inc
+let SEARCH_PATTERN= InnoDB: Renaming log file .*ib_logfile101 to .*ib_logfile0;
+--source include/search_pattern_in_file.inc
+
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/log_file_size_checkpoint.test b/mysql-test/suite/innodb/t/log_file_size_checkpoint.test
new file mode 100644
index 00000000000..26e0bdf5e2c
--- /dev/null
+++ b/mysql-test/suite/innodb/t/log_file_size_checkpoint.test
@@ -0,0 +1,32 @@
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
+
+CREATE DATABASE logtest;
+USE logtest;
+let $n=250;
+let $t=veryLongTableNameToCreateMLOG_FILE_NAMErecords;
+
+--disable_query_log
+call mtr.add_suppression("InnoDB: Resizing redo log");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created");
+FLUSH TABLES;
+
+let $i=$n;
+while ($i)
+{
+--eval CREATE TABLE $t$i(a INT PRIMARY KEY) ENGINE=InnoDB;
+dec $i;
+}
+
+# If we set above n to 500, this test case could fail easily, because
+# the inndob buffer pool is too small, some of which would be occupied
+# by the recv*. With n=250, this test case could sporadically fail too.
+# So we have to set buffer pool size to 50M which should be enough for this
+# test case. Once we fix the bug#22179133 and bug#22186325, we should use
+# the default innodb buffer pool(or the smaller one).
+let $restart_parameters = --innodb-log-files-in-group=2 --innodb-log-file-size=4M --innodb-buffer-pool-size=50M;
+--source include/kill_and_restart_mysqld.inc
+
+DROP DATABASE logtest;
diff --git a/mysql-test/suite/innodb_zip/t/wl6470_1.test b/mysql-test/suite/innodb/t/temp_table.test
index ecf6b601d3d..4809f278fb6 100644
--- a/mysql-test/suite/innodb_zip/t/wl6470_1.test
+++ b/mysql-test/suite/innodb/t/temp_table.test
@@ -1,6 +1,4 @@
--source include/have_innodb.inc
---source include/have_innodb_zip.inc
---source include/big_test.inc
####################################################################
# TC to test temp-table DML optimization changes for correctness #
@@ -22,28 +20,29 @@ create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
---source suite/innodb_zip/include/innodb_dml_ops.inc
-drop table t1;
-drop table t2;
+--source suite/innodb/include/dml_ops.inc
+drop temporary table t1,t2;
#
---disable_warnings
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 4;
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc), index sec_index(c1)
+ ) engine = innodb;
set innodb_strict_mode=off;
+--disable_warnings
create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb key_block_size = 8;
-set innodb_strict_mode=default;
+set innodb_strict_mode=on;
--enable_warnings
---source suite/innodb_zip/include/innodb_dml_ops.inc
-drop table t1;
-drop table t2;
+--source suite/innodb/include/dml_ops.inc
+drop temporary table t1, t2;
#
-let $file_per_table = `select @@innodb_file_per_table`;
-set global innodb_file_per_table = 0;
create temporary table t1
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
@@ -52,9 +51,4 @@ create temporary table t2
(keyc int, c1 char(100), c2 char(100),
primary key(keyc), index sec_index(c1)
) engine = innodb;
---source suite/innodb_zip/include/innodb_dml_ops.inc
-drop table t1;
-drop table t2;
-eval set global innodb_file_per_table = $file_per_table;
-#
-
+--source suite/innodb/include/dml_ops.inc
diff --git a/mysql-test/suite/innodb_zip/t/wl6470_2.test b/mysql-test/suite/innodb/t/temp_table_savepoint.test
index 020c27b97b9..314ac148fca 100644
--- a/mysql-test/suite/innodb_zip/t/wl6470_2.test
+++ b/mysql-test/suite/innodb/t/temp_table_savepoint.test
@@ -1,11 +1,10 @@
--source include/have_innodb.inc
---source include/have_innodb_zip.inc
--source include/no_valgrind_without_big.inc
####################################################################
# TC to test temp-table DML optimization changes for correctness #
# Sceanrio covered in single testcase : #
-# - Tables with row format(redundant,compressed,dynamic,compact #
+# - Tables with row format(redundant,dynamic,compact) #
# - Table with primary,composite,prefix,secondary index #
# - Insert/delete/update with transactioons #
# - Transaction with commit,rollback,savepoint statements #
@@ -14,37 +13,20 @@
# - Inserting data using #
# - Insert into .. , Load data infile..,insert ignore #
# - Insert into .. on duplicate update #
-# - Check basic delete and upadte [ignore] #
+# - Check basic delete and update [ignore] #
# - Check constraints like duplicate key,default value #
# - Alter add column , add primary key #
# - with prepare and execute statement #
####################################################################
-# run for page size >= 8k
---disable_warnings
-if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`)
-{
- --skip Test requires InnoDB with page size >= 8k.
-}
---enable_warnings
-
-
-# Save initial values of server variable
---disable_query_log
-let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
---enable_query_log
-
-# Create procedure to perform
+# Create procedure to perform
# 1. Create temp table with row types , index , sufficent data types
-# 2. Perform DML with transaction
+# 2. Perform DML with transaction
delimiter |;
create procedure populate_tables()
begin
declare n int default 20;
declare inner_loop int default 100;
- set global innodb_file_per_table=on;
- drop table if exists t1,t2,t3,t4;
create temporary table t1(c1 int not null,
c2 int not null,
@@ -56,7 +38,7 @@ create procedure populate_tables()
c8 datetime,
c9 decimal(6,3),
primary key (c1),
- index (c3,c4(50),c5(50)),
+ index (c3,c4(50),c5(50)),
index (c2))
engine=innodb row_format=redundant;
@@ -74,20 +56,6 @@ create procedure populate_tables()
index (c2))
engine=innodb row_format=compact;
- create temporary table t3(c1 int not null,
- c2 int not null,
- c3 char(255) not null,
- c4 text(6000) not null,
- c5 blob(6000) not null,
- c6 varchar(2000) not null,
- c7 varchar(2000) not null,
- c8 datetime,
- c9 decimal(6,3),
- primary key (c1),
- index (c3,c4(50),c5(50)),
- index (c2))
- engine=innodb row_format=compressed key_block_size=4;
-
create temporary table t4(c1 int not null,
c2 int not null,
c3 char(255) not null,
@@ -115,23 +83,19 @@ create procedure populate_tables()
index (c3,c4(50),c5(50)),
index (c2))
engine=innodb;
-
+
create temporary table t6 ( a int ) engine = innodb;
insert into t6 values (50),(100),(150),(190);
while (n > 0) do
start transaction;
insert into t1 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
- repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
+ repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
now(),(100.55+n));
insert into t2 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
- repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
- now(),(100.55+n));
- insert into t3 values(n,n,repeat(concat(' tc3_',n),30),
- repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
- repeat(concat(' tc6_',n),800),repeat(concat(' tc7_',n),800),
+ repeat(concat(' tc4_',n),8),repeat(concat(' tc_',n),8),
+ repeat(concat(' tc6_',n),8),repeat(concat(' tc7_',n),8),
now(),(100.55+n));
insert into t4 values(n,n,repeat(concat(' tc3_',n),30),
repeat(concat(' tc4_',n),800),repeat(concat(' tc_',n),800),
@@ -144,35 +108,29 @@ create procedure populate_tables()
if (n > 10) then
commit;
- else
+ else
delete from t1 where c1 > 10 ;
delete from t2 where c1 > 10 ;
- delete from t3 where c1 > 10 ;
delete from t4 where c1 > 10 ;
delete from t5 where c1 > 10 ;
-
+
rollback;
start transaction;
update t1 set c1 = c1 + 1000 where c1 > 10;
update t2 set c1 = c1 + 1000 where c1 > 10;
- update t3 set c1 = c1 + 1000 where c1 > 10;
update t4 set c1 = c1 + 1000 where c1 > 10;
update t5 set c1 = c1 + 1000 where c1 > 10;
rollback;
- end if;
+ end if;
start transaction;
insert into t1 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
- insert into t3 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -185,29 +143,23 @@ create procedure populate_tables()
delete from t1 where c1 between 100 and 110;
delete from t2 where c1 between 100 and 110;
- delete from t3 where c1 between 100 and 110;
delete from t4 where c1 between 100 and 110;
delete from t5 where c1 between 100 and 110;
- update t1 set c1 = c1+1 where c1>110;
- update t2 set c1 = c1+1 where c1>110;
- update t3 set c1 = c1+1 where c1>110;
- update t4 set c1 = c1+1 where c1>110;
- update t5 set c1 = c1+1 where c1>110;
+ update t1 set c1 = c1+1 where c1>110;
+ update t2 set c1 = c1+1 where c1>110;
+ update t4 set c1 = c1+1 where c1>110;
+ update t5 set c1 = c1+1 where c1>110;
savepoint a;
insert into t1 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
- insert into t3 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(300+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -220,16 +172,12 @@ create procedure populate_tables()
savepoint b;
insert into t1 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t2 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
- now(),(100.55+n+inner_loop));
- insert into t3 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
- repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
- repeat(concat(' tc6_',n+inner_loop),245),repeat(concat(' tc7_',n+inner_loop),245),
+ repeat(concat(' tc4_',n+inner_loop),8),repeat(concat(' tc_',n+inner_loop),8),
+ repeat(concat(' tc6_',n+inner_loop),2),repeat(concat(' tc7_',n+inner_loop),2),
now(),(100.55+n+inner_loop));
insert into t4 values(400+n+inner_loop,n+inner_loop,repeat(concat(' tc3_',n+inner_loop),30),
repeat(concat(' tc4_',n+inner_loop),800),repeat(concat(' tc_',n+inner_loop),800),
@@ -245,67 +193,42 @@ create procedure populate_tables()
commit;
commit;
rollback;
- set n = n - 1;
+ set n = n - 1;
end while;
end|
delimiter ;|
# Create two client for concurrent execution
connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-
---echo #---client 1 : dml operation ---"
-connection con1;
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
--- enable_query_log
--- disable_query_log
-# call procedure
--send call populate_tables();
--- enable_query_log
---echo #---client 2 : dml operation ---"
-connection con2;
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
--- enable_query_log
--- disable_query_log
-# call procedure
+connect (con2,localhost,root,,);
--send call populate_tables();
--- enable_query_log
-# check data of client connection 1
---echo # In connection 1
connection con1;
--reap
-# 20 rows exepceted in 5 tables
+# 20 rows expected
select count(*) from t1;
select count(*) from t2;
-select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
select c1 from t1;
select c1 from t2;
-select c1 from t3;
select c1 from t4;
select c1 from t5;
-# check data of client connection 2
---echo # In connection 2
+
connection con2;
--reap
-# 20 rows exepceted in 5 tables
+# 20 rows expected
select count(*) from t1;
select count(*) from t2;
-select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
select c1 from t1;
select c1 from t2;
-select c1 from t3;
select c1 from t4;
select c1 from t5;
---echo # In connection 1
connection con1;
set autocommit = 0;
@@ -317,9 +240,6 @@ insert ignore into t1 values (20,1,'a','a','a','a','a',now(),100.55);
insert into t2 values (20,1,'a','a','a','a','a',now(),100.55);
insert ignore into t2 values (20,1,'a','a','a','a','a',now(),100.55);
--error ER_DUP_ENTRY
-insert into t3 values (20,1,'a','a','a','a','a',now(),100.55);
-insert ignore into t3 values (20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
insert into t4 values (20,1,'a','a','a','a','a',now(),100.55);
insert ignore into t4 values (20,1,'a','a','a','a','a',now(),100.55);
--error ER_DUP_ENTRY
@@ -334,9 +254,6 @@ insert into t1 values (1,1,'a','a','a','a','a',now(),100.55),
insert into t2 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
--error ER_DUP_ENTRY
-insert into t3 values (1,1,'a','a','a','a','a',now(),100.55),
-(20,1,'a','a','a','a','a',now(),100.55);
---error ER_DUP_ENTRY
insert into t4 values (1,1,'a','a','a','a','a',now(),100.55),
(20,1,'a','a','a','a','a',now(),100.55);
--error ER_DUP_ENTRY
@@ -347,74 +264,59 @@ set autocommit = 1;
select c1,c2 from t1 where c1 in (20,1);
select c1,c2 from t2 where c1 in (20,1);
-select c1,c2 from t3 where c1 in (20,1);
select c1,c2 from t4 where c1 in (20,1);
select c1,c2 from t5 where c1 in (20,1);
#replace statement
replace into t1 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t2 values (20,1,'a','a','a','a','a',now(),100.55);
-replace into t3 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t4 values (20,1,'a','a','a','a','a',now(),100.55);
replace into t5 values (20,1,'a','a','a','a','a',now(),100.55);
# verify row is replaced from (20,20) to (20,1)
select c1,c2,c3,c4,c5,c6,c7,c9 from t1 where c1 = 20;
select c1,c2,c3,c4,c5,c6,c7,c9 from t2 where c1 = 20;
-select c1,c2,c3,c4,c5,c6,c7,c9 from t3 where c1 = 20;
select c1,c2,c3,c4,c5,c6,c7,c9 from t4 where c1 = 20;
select c1,c2,c3,c4,c5,c6,c7,c9 from t5 where c1 = 20;
-# Update ignore. statement is gonored as 20 value exits
+# Update ignore. statement is ignored as 20 value exists
update ignore t1 set c1 = 20 where c1 = 140 ;
update ignore t2 set c1 = 20 where c1 = 140 ;
-update ignore t3 set c1 = 20 where c1 = 140 ;
update ignore t4 set c1 = 20 where c1 = 140 ;
update ignore t5 set c1 = 20 where c1 = 140 ;
# see record 140 is present as last update ignored
select count(*) from t1 where c1 = 140;
select count(*) from t2 where c1 = 140;
-select count(*) from t3 where c1 = 140;
select count(*) from t4 where c1 = 140;
select count(*) from t5 where c1 = 140;
-# Load data infile
---echo "running select * into outfile <file> from t1 ;
---disable_query_log
+--replace_result $MYSQLTEST_VARDIR VARDIR
eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t1.outfile" from t1;
---enable_query_log
-# Create table as select
+
create temporary table temp_1 engine = innodb as select * from t1 where 1=2;
select count(*) from temp_1;
---echo "running load data infile <file> into temp_1 ;
---disable_query_log
+
+--replace_result $MYSQLTEST_VARDIR VARDIR
eval load data infile '$MYSQLTEST_VARDIR/tmp/t1.outfile' into table temp_1;
---enable_query_log
select count(*) from temp_1;
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile
# Alter table to add column and primary key
-alter table temp_1 add column c10 int default 99 ,
+alter table temp_1 add column c10 int default 99 ,
add column c11 varchar(100) default 'test';
alter table temp_1 add primary key (c1);
insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55);
select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
select count(*) from temp_1 where c10 = 99 and c11 like 'test';
# insert on duplicate key update
-insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
+insert into temp_1 (c1,c2,c3,c4,c5,c6,c7,c8,c9) values (-1,-1,'a','a','a','a','a',now(),100.55)
on duplicate key update c1=-2,c2=-2;
select c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 from temp_1 where c1 < 0;
-#cleanup
-drop table t1 ,t2 ,t3,t4,t5,t6,temp_1;
disconnect con1;
-
-connection con2;
-drop table t1 ,t2 ,t3,t4,t5,t6;
disconnect con2;
-
connection default;
drop procedure populate_tables;
-
# case 2 - with prepare and execute
let $prep_loop= 5;
create temporary table prep_1(c1 int not null,
@@ -457,12 +359,3 @@ select count(*) from prep_1;
drop prepare stm;
drop prepare stm_1;
drop prepare stm_2;
-drop table prep_1;
-
---remove_file $MYSQLTEST_VARDIR/tmp/t1.outfile
-
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
-SET sql_mode = default;
--- enable_query_log
-
diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test
new file mode 100644
index 00000000000..9f63fe52f3b
--- /dev/null
+++ b/mysql-test/suite/innodb/t/temporary_table.test
@@ -0,0 +1,445 @@
+#
+# InnoDB temporary table test case, including
+# WL#6560: InnoDB: separate tablespace for innodb-temp-tables.
+# WL#7899: InnoDB: Map compressed temporary tables to uncompressed
+#
+
+--source include/have_innodb.inc
+# Embedded server does not restart of server
+--source include/not_embedded.inc
+--source include/no_valgrind_without_big.inc
+
+--disable_query_log
+call mtr.add_suppression("last file in setting innodb_temp_data_file_path");
+call mtr.add_suppression("The table 't1' is full");
+call mtr.add_suppression("Plugin 'InnoDB' init function returned error");
+call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
+call mtr.add_suppression("InnoDB: Tablespace doesn't support raw devices");
+call mtr.add_suppression("InnoDB: The innodb_temporary data file 'ibtmp1' must be at least");
+call mtr.add_suppression("InnoDB: Plugin initialization aborted");
+call mtr.add_suppression("innodb_temporary and innodb_system file names seem to be the same");
+call mtr.add_suppression("Could not create the shared innodb_temporary");
+call mtr.add_suppression("InnoDB: syntax error in file path");
+--enable_query_log
+
+let $MYSQL_TMP_DIR = `select @@tmpdir`;
+let $MYSQL_DATA_DIR = `select @@datadir`;
+
+--echo # files in MYSQL_DATA_DIR
+--list_files $MYSQL_DATA_DIR/ ibtmp*
+
+create temporary table t1 (i int, f float, c char(100)) engine=innodb;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+select * from t1 where i = 98;
+select * from t1 where i < 100;
+
+explain select * from t1 where f > 1.29999;
+alter table t1 add index sec_index(f);
+explain select * from t1 where f > 1.29999;
+select * from t1 where f > 1.29999;
+
+explain select * from t1 where i = 100;
+alter table t1 add unique index pri_index(i);
+explain select * from t1 where i = 100;
+select * from t1 where i = 100;
+
+delete from t1 where i < 97;
+select * from t1;
+insert into t1 values (96, 1.5, 'kolkata');
+select * from t1;
+
+update t1 set f = 1.44 where c = 'delhi';
+select * from t1;
+
+truncate table t1;
+insert into t1 values (100, 1.1, 'pune');
+insert into t1 values (99, 1.2, 'mumbai');
+insert into t1 values (98, 1.3, 'jaipur');
+insert into t1 values (97, 1.4, 'delhi');
+insert into t1 values (96, 1.5, 'ahmedabad');
+select * from t1;
+
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 discard tablespace;
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 import tablespace;
+drop temporary table t1;
+
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc)) engine = innodb;
+delimiter |;
+CREATE PROCEDURE populate_t1()
+BEGIN
+ DECLARE i INT DEFAULT 1;
+ while (i <= 20000) DO
+ insert into t1 values (i, 'a', 'b');
+ SET i = i + 1;
+ END WHILE;
+END|
+delimiter ;|
+set autocommit=0;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+select * from t1 limit 10;
+set autocommit=1;
+truncate table t1;
+select * from t1;
+#
+
+--echo # test condition of full-temp-tablespace
+--let $restart_parameters= --innodb_temp_data_file_path=ibtmp1:12M
+--source include/restart_mysqld.inc
+
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc)) engine = innodb;
+begin;
+--error ER_RECORD_FILE_FULL
+call populate_t1();
+
+drop procedure populate_t1;
+
+--echo # test read-only mode
+--let $restart_parameters = --innodb-read-only
+--source include/restart_mysqld.inc
+
+--echo # files in MYSQL_DATA_DIR
+--list_files $MYSQL_DATA_DIR/ ibtmp*
+
+--error ER_NO_SUCH_TABLE
+select * from t1;
+show tables;
+--error ER_CANT_CREATE_TABLE
+create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
+
+--echo # test various bad start-up parameters
+
+let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
+let SEARCH_RANGE = -50000;
+let SEARCH_ABORT = NOT FOUND;
+let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb'
+AND support IN ('YES', 'DEFAULT', 'ENABLED');
+
+--let $restart_parameters= --innodb_data_file_path=ibdata1:12M:autoextend --innodb_temp_data_file_path=ibdata1:12M:autoextend
+--source include/restart_mysqld.inc
+--let SEARCH_PATTERN = innodb_temporary and innodb_system file names seem to be the same
+--source include/search_pattern_in_file.inc
+eval $check_no_innodb;
+
+--let $restart_parameters= --innodb_temp_data_file_path=foobar:3Gnewraw
+--source include/restart_mysqld.inc
+--let SEARCH_PATTERN = support raw device
+--source include/search_pattern_in_file.inc
+eval $check_no_innodb;
+
+--let $restart_parameters= --innodb_temp_data_file_path=barbar:3Graw
+--source include/restart_mysqld.inc
+--source include/search_pattern_in_file.inc
+eval $check_no_innodb;
+
+--let $restart_parameters= --innodb_temp_data_file_path=ibtmp1:2M:autoextend
+--source include/restart_mysqld.inc
+--let SEARCH_PATTERN = The innodb_temporary data file 'ibtmp1' must be at least
+--source include/search_pattern_in_file.inc
+eval $check_no_innodb;
+
+--let $restart_parameters= --innodb_temp_data_file_path=
+--source include/restart_mysqld.inc
+--let SEARCH_PATTERN = InnoDB: syntax error in file path
+--source include/search_pattern_in_file.inc
+eval $check_no_innodb;
+
+--let $restart_parameters=
+--source include/restart_mysqld.inc
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed;
+#
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed key_block_size = 8;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+show warnings;
+drop table t;
+set innodb_strict_mode = off;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed key_block_size = 8;
+show warnings;
+set innodb_strict_mode = default;
+#
+drop table t;
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+create temporary table t (
+ i int)
+ engine = innodb row_format = compressed;
+--echo #files in MYSQL_TMP_DIR, expecting only default temporary tablespace file
+--list_files $MYSQL_TMP_DIR/ *.ibd
+--list_files $MYSQL_DATA_DIR/ ibtmp*
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic;
+show warnings;
+drop table t;
+set innodb_strict_mode = off;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = dynamic key_block_size = 4;
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb row_format = compact;
+show warnings;
+drop table t;
+#
+create temporary table t (
+ i int)
+ engine = innodb key_block_size = 4;
+show warnings;
+drop table t;
+#
+
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPACT;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 8;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+
+# Test alter table for temporary tables with row format = compressed or
+# key_block_size
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4 ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+# Set innodb_strict_mode=ON and test compressed temporary tables again.
+set innodb_strict_mode = ON;
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+#
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4, ROW_FORMAT = COMPACT;
+SHOW WARNINGS;
+#
+
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+#
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+#
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 8;
+SHOW WARNINGS;
+#
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = COMPRESSED KEY_BLOCK_SIZE = 7;
+SHOW WARNINGS;
+#
+
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY,
+ c CHAR(10) NOT NULL
+) ENGINE = InnoDB ROW_FORMAT = DYNAMIC;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+#
+
+CREATE TEMPORARY TABLE t1 (
+ i INT NOT NULL PRIMARY KEY
+) ENGINE = InnoDB ROW_FORMAT = REDUNDANT;
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+ALTER TABLE t1 KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC KEY_BLOCK_SIZE = 4;
+SHOW WARNINGS;
+
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+
+#
+# Some checking for turning innodb_strict_mode ON and OFF.
+set innodb_strict_mode = OFF;
+
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+
+set innodb_strict_mode = ON;
+
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+SHOW CREATE TABLE t1;
+
+set innodb_strict_mode = OFF;
+
+ALTER TABLE t1 ROW_FORMAT = COMPRESSED;
+SHOW WARNINGS;
+
+ALTER TABLE t1 KEY_BLOCK_SIZE = 8;
+SHOW WARNINGS;
+
+set innodb_strict_mode = ON;
+
+--error ER_UNSUPPORT_COMPRESSED_TEMPORARY_TABLE
+ALTER TABLE t1 ADD COLUMN j INT;
+SHOW WARNINGS;
+SHOW CREATE TABLE t1;
+
+set innodb_strict_mode = OFF;
+
+ALTER TABLE t1 KEY_BLOCK_SIZE = 0;
+SHOW CREATE TABLE t1;
+
+ALTER TABLE t1 ROW_FORMAT = DYNAMIC;
+
+set innodb_strict_mode = ON;
+ALTER TABLE t1 ADD COLUMN j INT;
+SHOW CREATE TABLE t1;
diff --git a/mysql-test/suite/innodb/t/temporary_table_optimization.opt b/mysql-test/suite/innodb/t/temporary_table_optimization.opt
new file mode 100644
index 00000000000..2f73da1ead6
--- /dev/null
+++ b/mysql-test/suite/innodb/t/temporary_table_optimization.opt
@@ -0,0 +1 @@
+--loose-innodb-sys-datafiles --loose-innodb-sys-tables
diff --git a/mysql-test/suite/innodb/t/temporary_table_optimization.test b/mysql-test/suite/innodb/t/temporary_table_optimization.test
new file mode 100644
index 00000000000..ae41c87839b
--- /dev/null
+++ b/mysql-test/suite/innodb/t/temporary_table_optimization.test
@@ -0,0 +1,243 @@
+#
+# WL#6469: Optimizing CREATE/DROP performance for temporary tables
+#
+--source include/no_valgrind_without_big.inc
+--source include/have_innodb.inc
+
+#########################################################################
+# #
+# Will test following scenarios: #
+# 1. Create/Drop of temp-table. (with and w/o explicit pk) #
+# 2. Truncate temp-table (result in table drop and recreate). #
+# 3. Alter of temp-table. #
+# 4. Import/Discard of temp-table (to check blocked action) #
+# 5. Renaming of temp-table #
+# 6. Creating temp-table with large prefix. #
+# 7. Check Temp table info not stored in I_S datafile and tables #
+#########################################################################
+
+
+#-------------------------------------------------------------
+#
+# 1. Create/Drop of temp-table. (with and w/o explicit pk) #
+#
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+select * from t1 where i = 4;
+drop table t1;
+#
+# recreate table wih same name to ensure entries are removed.
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+select * from t1 where i = 4;
+drop table t1;
+#
+create temporary table t2 (i int) engine = innodb;
+insert into t2 values (1), (2), (3), (4);
+select * from t2;
+select * from t2 where i = 4;
+drop table t2;
+
+#-------------------------------------------------------------
+#
+# 2. Truncate temp-table (result in table drop and recreate). #
+#
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc)) engine = innodb;
+delimiter |;
+create procedure populate_t1()
+begin
+ declare i int default 1;
+ while (i <= 200) DO
+ insert into t1 values (i, 'a', 'b');
+ set i = i + 1;
+ end while;
+end|
+delimiter ;|
+set autocommit=0;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+select * from t1 limit 10;
+set autocommit=1;
+truncate table t1;
+select count(*) from t1;
+drop table t1;
+#
+# recreate table wih same name to ensure entries are removed.
+create temporary table t1 (i int) engine = innodb;
+insert into t1 values (1), (2), (3), (4);
+select * from t1;
+select * from t1 where i = 4;
+drop table t1;
+#
+create temporary table t1
+ (keyc int, c1 char(100), c2 char(100),
+ primary key(keyc))
+ engine = innodb;
+begin;
+select count(*) from t1;
+call populate_t1();
+select count(*) from t1;
+rollback;
+select count(*) from t1;
+begin;
+call populate_t1();
+commit;
+select count(*) from t1;
+truncate table t1;
+select count(*) from t1;
+drop table t1;
+#
+drop procedure populate_t1;
+
+
+#-------------------------------------------------------------
+#
+# 3. Alter of temp-table.
+#
+create temporary table t1 (t1_i int, t1_f float) engine = innodb;
+insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4);
+#
+explain select * from t1 where t1_i = 1;
+alter table t1 add unique index pri_index(t1_i);
+explain select * from t1 where t1_i = 1;
+select * from t1 where t1_i = 1;
+#
+--error ER_DUP_ENTRY
+alter table t1 add unique index sec_index(t1_f);
+alter table t1 add index sec_index(t1_f);
+explain select * from t1 where t1_f > 2.2;
+select * from t1 where t1_f > 2.2;
+#
+alter table t1 add column (t1_c char(10));
+select * from t1;
+insert into t1 values (5, 5.5, 'krunal');
+#
+alter table t1 drop column t1_f;
+show create table t1;
+--error ER_BAD_FIELD_ERROR
+select * from t1 where t1_f > 2.2;
+#
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table t1 add index sec_index2(t1_c), algorithm=inplace;
+#
+drop table t1;
+
+#-------------------------------------------------------------
+#
+# 4. Import/Discard of temp-table (to check blocked action)
+#
+create temporary table t1 (i int, f float) engine = innodb;
+insert into t1 values (10, 1.1), (20, 2.2);
+select * from t1;
+#
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 discard tablespace;
+--error ER_CANNOT_DISCARD_TEMPORARY_TABLE
+alter table t1 import tablespace;
+drop table t1;
+
+#-------------------------------------------------------------
+#
+# 5. Renaming of temp-table #
+#
+create temporary table t1 (i int) engine=innodb;
+insert into t1 values (1), (2), (3);
+select * from t1;
+#
+alter table t1 rename t2;
+--error ER_NO_SUCH_TABLE
+select * from t1;
+select * from t2;
+insert into t2 values (1), (2), (6), (7);
+select * from t2;
+drop table t2;
+
+
+#-------------------------------------------------------------
+#
+# 6. Creating temp-table with large prefix. #
+#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+# This will lead to warnings on innodb_page_size=8k or 4k:
+# 8k: Specified key was too long; max key length is 1536 bytes
+# 4k: Specified key was too long; max key length is 768 bytes
+--disable_warnings
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = dynamic engine=innodb;
+drop table t;
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = dynamic engine=innodb;
+drop table t;
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = dynamic engine=innodb;
+drop table t;
+#
+SET innodb_strict_mode=OFF;
+--error ER_INDEX_COLUMN_TOO_LONG
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = compact engine=innodb;
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = dynamic engine=innodb;
+drop table t;
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = compressed engine=innodb;
+drop table t;
+#
+--error ER_INDEX_COLUMN_TOO_LONG
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = compact engine=innodb;
+#
+create temporary table t (
+ a int not null,
+ b blob not null,
+ index sk (b(3021))
+ ) row_format = dynamic engine=innodb;
+drop table t;
+--enable_warnings
+#
+
+#-------------------------------------------------------------
+#
+# 7. Temp table info not stored in I_S
+#
+CREATE TABLE t1 ( i INT ) ENGINE = Innodb;
+CREATE TEMPORARY TABLE t2 ( i INT ) ENGINE = Innodb;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
+CREATE TEMPORARY table t3 ( i INT ) ENGINE = Innodb;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
+DROP TABLE t1,t2,t3;
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_DATAFILES WHERE PATH LIKE '%test%t_';
+SELECT COUNT(*) FROM information_schema.INNODB_SYS_TABLES WHERE NAME LIKE '%test%t_';
diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test
index 32373d63d14..f5c2b655545 100644
--- a/mysql-test/suite/innodb/t/xa_recovery.test
+++ b/mysql-test/suite/innodb/t/xa_recovery.test
@@ -1,7 +1,3 @@
-if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not fixed in InnoDB as of 5.6.24 or earlier
-}
--source include/have_innodb.inc
# Embedded server does not support restarting.
--source include/not_embedded.inc
@@ -9,31 +5,17 @@ if (`select plugin_auth_version <= "5.6.24" from information_schema.plugins wher
# MDEV-8841 - close tables opened by previous tests,
# so they don't get marked crashed when the server gets crashed
--disable_query_log
+call mtr.add_suppression("Found 1 prepared XA transactions");
FLUSH TABLES;
--enable_query_log
-#
-# We kill server belown with timeout 0 that is not fully safe
-#
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connect (con1,localhost,root);
XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x';
connection default;
-call mtr.add_suppression("Found 1 prepared XA transactions");
-
-# Kill and restart the server.
--- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- shutdown_server 0
--- source include/wait_until_disconnected.inc
-
--- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--- enable_reconnect
--- source include/wait_until_connected_again.inc
--- disable_reconnect
+--source include/kill_and_restart_mysqld.inc
disconnect con1;
connect (con1,localhost,root);
diff --git a/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc b/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc
deleted file mode 100644
index 42e0908f810..00000000000
--- a/mysql-test/suite/innodb_zip/include/innodb_temp_table_dml.inc
+++ /dev/null
@@ -1,40 +0,0 @@
-# insert test
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-select * from t1 where i = 98;
-select * from t1 where i < 100;
-#
-# add index using alter table table
-explain select * from t1 where f > 1.29999;
-alter table t1 add index sec_index(f);
-explain select * from t1 where f > 1.29999;
-select * from t1 where f > 1.29999;
-#
-explain select * from t1 where i = 100;
-alter table t1 add unique index pri_index(i);
-explain select * from t1 where i = 100;
-select * from t1 where i = 100;
-#
-# delete test
-delete from t1 where i < 97;
-select * from t1;
-insert into t1 values (96, 1.5, 'kolkata');
-select * from t1;
-#
-# update test
-update t1 set f = 1.44 where c = 'delhi';
-select * from t1;
-#
-# truncate table
-truncate table t1;
-insert into t1 values (100, 1.1, 'pune');
-insert into t1 values (99, 1.2, 'mumbai');
-insert into t1 values (98, 1.3, 'jaipur');
-insert into t1 values (97, 1.4, 'delhi');
-insert into t1 values (96, 1.5, 'ahmedabad');
-select * from t1;
-
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc
deleted file mode 100644
index fcefd0cdf7e..00000000000
--- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_crash_stripped.inc
+++ /dev/null
@@ -1,144 +0,0 @@
-#
-# WL#6501: make truncate table atomic
-#
-
---source include/have_innodb.inc
---source include/have_debug.inc
-
-# Valgrind would complain about memory leaks when we crash on purpose.
---source include/not_valgrind.inc
-# Embedded server does not support crashing
---source include/not_embedded.inc
-# Avoid CrashReporter popup on Mac
---source include/not_crashrep.inc
-
-# suppress expected warnings.
-call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
-call mtr.add_suppression("Cannot create file '.*'");
-call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
-
-################################################################################
-#
-# Will test following scenarios:
-# 1. Hit crash point on completing drop of all indexes before creation of index
-# is commenced.
-# 2. Hit crash point after data is updated to system-table and in-memory dict.
-# 3. Post truncate recovery, abruptly shutdown the server.
-# On restart ensure table state is maintained.
-#
-################################################################################
-
-#-----------------------------------------------------------------------------
-#
-# create test-bed
-#
-
-let $WL6501_TMP_DIR = `select @@tmpdir`;
-let $WL6501_DATA_DIR = `select @@datadir`;
-let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
-
-#-----------------------------------------------------------------------------
-#
-# 1. Hit crash point on completing drop of all indexes before creation of index
-# is commenced.
-#
---echo "1. Hit crash point on completing drop of all indexes before creation"
---echo " of index is commenced."
-eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
-set innodb_strict_mode=off;
---disable_warnings
-eval create $wl6501_temp table t (
- i int, f float, c char,
- primary key pk(i), unique findex(f), index ck(c))
- engine = innodb row_format = $wl6501_row_fmt
- key_block_size = $wl6501_kbs;
---enable_warnings
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-select * from t;
-check table t;
-#
-set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
---source include/expect_crash.inc
---error 2013
-truncate table t;
-#
---source include/start_mysqld.inc
-
-check table t;
-select * from t;
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-select * from t;
-select * from t where f < 2.5;
-drop table t;
-
-#-----------------------------------------------------------------------------
-#
-# 2. Hit crash point after data is updated to system-table and in-memory dict.
-#
---echo "2. Hit crash point after data is updated to system-table and"
---echo " in-memory dict."
-eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
-set innodb_strict_mode=off;
---disable_warnings
-eval create $wl6501_temp table t (
- i int, f float, c char,
- primary key pk(i), unique findex(f), index ck(c))
- engine = innodb row_format = $wl6501_row_fmt
- key_block_size = $wl6501_kbs;
---enable_warnings
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-select * from t;
-check table t;
-#
-set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
---source include/expect_crash.inc
---error 2013
-truncate table t;
-#
---source include/start_mysqld.inc
-check table t;
-select * from t;
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-select * from t;
-select * from t where f < 2.5;
-drop table t;
-
-#-----------------------------------------------------------------------------
-#
-# 3. Post truncate recovery, abruptly shutdown the server.
-# On restart ensure table state is maintained.
-#
---echo "3. Post truncate recovery, abruptly shutdown the server."
---echo " On restart ensure table state is maintained."
-eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
-set innodb_strict_mode=off;
---disable_warnings
-eval create $wl6501_temp table t (
- i int, f float, c char,
- primary key pk(i), unique findex(f), index ck(c))
- engine = innodb row_format = $wl6501_row_fmt
- key_block_size = $wl6501_kbs;
---enable_warnings
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-select * from t;
-check table t;
-#
-set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
---source include/expect_crash.inc
---error 2013
-truncate table t;
-#
---source include/start_mysqld.inc
-check table t;
-select * from t;
-insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
-#
---source include/kill_and_restart_mysqld.inc
-#
-check table t;
-select * from t;
-select * from t where f < 2.5;
-drop table t;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc
index 0939d452dae..424608f251b 100644
--- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc
+++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_error.inc
@@ -44,7 +44,6 @@ set innodb_strict_mode=off;
#
--echo "1. Error in assigning undo logs for truncate action."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
@@ -71,7 +70,6 @@ drop table t;
#
--echo "2. Error while preparing for truncate."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
@@ -98,7 +96,6 @@ drop table t;
#
--echo "3. Error while dropping/creating indexes"
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
@@ -122,7 +119,6 @@ drop table t;
#
#
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (
i int, f float, c char,
@@ -146,7 +142,6 @@ drop table t;
#
#
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create temporary table t (
i int, f float, c char,
@@ -174,7 +169,6 @@ drop table t;
#
--echo "4. Error while completing truncate of table involving FTS."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
@@ -203,7 +197,6 @@ drop table t;
#
--echo "5. Error while updating sys-tables."
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--disable_warnings
eval create $wl6501_temp table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
@@ -230,5 +223,4 @@ drop table t;
#
# remove test-bed
#
-eval set global innodb_file_format = $format;
eval set global innodb_file_per_table = $per_table;
diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc
index 67569d3dae9..bef28a9c484 100644
--- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc
+++ b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc
@@ -45,7 +45,6 @@ delimiter ;|
# create and load the tables.
#
eval set global innodb_file_per_table = $wl6501_file_per_table;
-eval set global innodb_file_format = $wl6501_file_format;
--replace_regex /[0-9]+/NUMBER/
eval create table t1
(i int, c1 char(100), c2 char(100),
diff --git a/mysql-test/suite/innodb_zip/r/create_options.result b/mysql-test/suite/innodb_zip/r/create_options.result
index 2d80894c8cd..1c152229b3c 100644
--- a/mysql-test/suite/innodb_zip/r/create_options.result
+++ b/mysql-test/suite/innodb_zip/r/create_options.result
@@ -1,4 +1,7 @@
SET default_storage_engine=InnoDB;
+SET GLOBAL innodb_file_format=`Barracuda`;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=ON;
SET SESSION innodb_strict_mode = ON;
# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
@@ -309,6 +312,10 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelop
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SHOW WARNINGS;
+Level Code Message
+Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
+Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
@@ -340,7 +347,7 @@ Level Code Message
SET GLOBAL innodb_file_format=Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+# Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
# and a valid non-zero KEY_BLOCK_SIZE are rejected with
# innodb_file_per_table=OFF and that they can be set to default
# values during strict mode.
@@ -361,7 +368,12 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
+SHOW WARNINGS;
+Level Code Message
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
Level Code Message
@@ -392,7 +404,11 @@ Level Code Message
Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+TABLE_NAME ROW_FORMAT CREATE_OPTIONS
+t1 Dynamic row_format=DYNAMIC
+SHOW WARNINGS;
+Level Code Message
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
@@ -837,3 +853,5 @@ TABLE_NAME ROW_FORMAT CREATE_OPTIONS
t1 Dynamic row_format=DYNAMIC
# Cleanup
DROP TABLE t1;
+Warnings:
+Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result
index d05f93bd5af..ff1bccfb60c 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum.result
@@ -1,7 +1,6 @@
# Set the environmental variables
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-SET GLOBAL innodb_file_per_table=on;
CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
CREATE INDEX idx1 ON tab1(c2(10));
INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
@@ -89,6 +88,4 @@ c1 c2
FOUND /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err
FOUND /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err
FOUND /Error while setting value \'crc23\' to \'write\'/ in my_restart.err
-# Restart the server
DROP TABLE tab1;
-SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_2.result b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
index 649c32b1a87..78d8a1cbf90 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_2.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_2.result
@@ -41,7 +41,7 @@ innochecksum Ver #.#.#
Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others.
InnoDB offline file checksum utility.
-Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] <filename or [-]>
+Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] [-e] <filename or [-]>
-?, --help Displays this help and exits.
-I, --info Synonym for --help.
-V, --version Displays version information and exits.
@@ -63,7 +63,7 @@ Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-a
-D, --page-type-dump=name
Dump the page type info for each page in a tablespace.
-l, --log=name log output.
- -l, --leaf Examine leaf index pages
+ -e, --leaf Examine leaf index pages
-m, --merge=# leaf page count if merge given number of consecutive
pages
diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
index c5c2a7673b3..32e6d3f1d13 100644
--- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result
+++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result
@@ -1,6 +1,5 @@
# Set the environmental variables
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-SET GLOBAL innodb_file_per_table=on;
[1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
linestring_key GEOMETRY NOT NULL,
@@ -221,7 +220,4 @@ NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_resta
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
NOT FOUND /Incorrect unsigned integer value: '18446744073709551616'/ in my_restart.err
-# Restart the server
-DROP TABLE tab1;
-DROP TABLE tab2;
-SET GLOBAL innodb_file_per_table=default;
+DROP TABLE tab1,tab2;
diff --git a/mysql-test/suite/innodb_zip/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result
deleted file mode 100644
index 1b92eb71fba..00000000000
--- a/mysql-test/suite/innodb_zip/r/innodb-create-options.result
+++ /dev/null
@@ -1,870 +0,0 @@
-SET default_storage_engine=InnoDB;
-SET GLOBAL innodb_file_format=`Barracuda`;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=ON;
-SET SESSION innodb_strict_mode = ON;
-# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
-# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
-DROP TABLE IF EXISTS t1;
-Warnings:
-Note 1051 Unknown table 'test.t1'
-# 'FIXED' is sent to InnoDB since it is used by MyISAM.
-# But it is an invalid mode in InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
-# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: invalid ROW_FORMAT specifier.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_TYPE'
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-ALTER TABLE t1 KEY_BLOCK_SIZE=4;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED
-ALTER TABLE t1 KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
-# ALTER with each ROW_FORMAT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT NULL,
- `f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16]
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
-# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
-# and that they can be set to default values during strict mode.
-SET GLOBAL innodb_file_format=Antelope;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-DROP TABLE IF EXISTS t1;
-Warnings:
-Note 1051 Unknown table 'test.t1'
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-SET GLOBAL innodb_file_format=Antelope;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-ALTER TABLE t1 ADD COLUMN f1 INT;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4.
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT NULL,
- `f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
-# and a valid non-zero KEY_BLOCK_SIZE are rejected with
-# innodb_file_per_table=OFF and that they can be set to default
-# values during strict mode.
-SET GLOBAL innodb_file_per_table=OFF;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Error 1005 Can't create table `test`.`t1` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 KEY_BLOCK_SIZE=1;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Error 1478 Table storage engine 'InnoDB' does not support the create option 'ROW_FORMAT'
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-ALTER TABLE t1 ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-SET GLOBAL innodb_file_per_table=ON;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SET GLOBAL innodb_file_per_table=ON;
-##################################################
-SET SESSION innodb_strict_mode = OFF;
-# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
-# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
-# 'FIXED' is sent to InnoDB since it is used by MyISAM.
-# It is an invalid mode in InnoDB, use COMPACT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
-Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=FIXED
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
-Warnings:
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=FIXED
-# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
-# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT key_block_size=1
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC key_block_size=4
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=FIXED key_block_size=1
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC key_block_size=4
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT key_block_size=2
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=2
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC key_block_size=2
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-ALTER TABLE t1 KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=4
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed key_block_size=2
-# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
-# ALTER with each ROW_FORMAT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT NULL,
- `f1` int(11) DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=1
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Redundant row_format=REDUNDANT key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compact row_format=COMPACT
-# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
-# it defaults to half of the page size.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
-Warnings:
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic key_block_size=15
-# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
-valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
-is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-SET GLOBAL innodb_file_format=Antelope;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-ALTER TABLE t1 ADD COLUMN f1 INT;
-Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SHOW WARNINGS;
-Level Code Message
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1.
-Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=COMPRESSED key_block_size=1
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=1
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-SET GLOBAL innodb_file_format=Antelope;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
-valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
-and then used again when innodb_file_per_table=ON.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-SET GLOBAL innodb_file_per_table=ON;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Compressed row_format=COMPRESSED key_block_size=2
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-SET GLOBAL innodb_file_per_table=ON;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-Level Code Message
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-TABLE_NAME ROW_FORMAT CREATE_OPTIONS
-t1 Dynamic row_format=DYNAMIC
-# Cleanup
-DROP TABLE IF EXISTS t1;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result
index 47215a1e077..c715f77b9ba 100644
--- a/mysql-test/suite/innodb_zip/r/innodb-zip.result
+++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result
@@ -1,4 +1,3 @@
-DROP DATABASE IF EXISTS mysqltest_innodb_zip;
CREATE DATABASE mysqltest_innodb_zip;
USE mysqltest_innodb_zip;
SELECT table_name, row_format, data_length, index_length
@@ -316,19 +315,16 @@ Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table.
Error 1005 Can't create table `mysqltest_innodb_zip`.`t6` (errno: 140 "Wrong create options")
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t7 (id int primary key) engine = innodb row_format = dynamic;
-ERROR HY000: Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
show warnings;
Level Code Message
-Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
-Error 1005 Can't create table `mysqltest_innodb_zip`.`t7` (errno: 140 "Wrong create options")
-Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql';
table_schema table_name row_format data_length index_length
+mysqltest_innodb_zip t7 Dynamic {valid} 0
mysqltest_innodb_zip t8 Compact {valid} 0
mysqltest_innodb_zip t9 Redundant {valid} 0
-drop table t8, t9;
+drop table t7, t8, t9;
set global innodb_file_per_table = on;
set global innodb_file_format = `0`;
Warnings:
@@ -409,5 +405,4 @@ select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
drop table normal_table, zip_table;
-USE test;
DROP DATABASE mysqltest_innodb_zip;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
index 161cef10ad5..bae08bd54a2 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result
@@ -1,5 +1 @@
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
-SET GLOBAL innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=ON;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
index 5ba26753ea6..7ae3cc4bb71 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
@@ -128,7 +124,3 @@ Warning 1264 Out of range value for column 'col78' at row 1
Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745;
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=1;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
index 3b10942c2de..0222ad64fa2 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result
@@ -1,7 +1,3 @@
-SET GLOBAL innodb_file_format='Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
CREATE TABLE bug53591(a text charset utf8 not null)
@@ -12,8 +8,4 @@ SHOW WARNINGS;
Level Code Message
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is {checked_valid}. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
DROP TABLE bug53591;
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
index 92b589c6b7e..c509c5bad21 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result
@@ -1,8 +1,4 @@
SET GLOBAL tx_isolation='REPEATABLE-READ';
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug56680(
a INT AUTO_INCREMENT PRIMARY KEY,
b CHAR(1),
@@ -121,5 +117,3 @@ Table Op Msg_type Msg_text
test.bug56680_2 check status OK
DROP TABLE bug56680_2;
DROP TABLE bug56680;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
index d44c7e33fe3..b599716905d 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
@@ -1,9 +1,5 @@
SET default_storage_engine=InnoDB;
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
-set global innodb_file_format="Barracuda";
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
@@ -491,6 +487,7 @@ connection con1;
select a = repeat("a", 20000) from worklog5743;
a = repeat("a", 20000)
1
+disconnect con1;
connection con2;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
@@ -500,6 +497,7 @@ select a = repeat("x", 25000) from worklog5743;
a = repeat("x", 25000)
1
1
+disconnect con2;
connection default;
rollback;
drop table worklog5743;
@@ -529,16 +527,7 @@ create index idx on worklog5743(a(768));
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
create index idx2 on worklog5743(a(767));
drop table worklog5743;
-SET GLOBAL innodb_file_format=Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-SET GLOBAL innodb_file_per_table=1;
SET GLOBAL innodb_large_prefix=1;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_strict_mode = DEFAULT;
-connection con1;
-disconnect con1;
-connection con2;
-disconnect con2;
-connection default;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
index e874ab1a37a..554bb2892f6 100644
--- a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result
@@ -5,9 +5,6 @@ set global innodb_file_per_table = on;
"1. Hit crash point while writing redo log."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -44,9 +41,6 @@ drop table t;
"2. Hit crash point on completion of redo log write."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -86,9 +80,6 @@ drop table t;
"3. Hit crash point while dropping indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -127,9 +118,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -168,9 +156,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -211,9 +196,6 @@ drop table t;
" of index is commenced."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -253,9 +235,6 @@ drop table t;
"5. Hit crash point while creating indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -294,9 +273,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -335,9 +311,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -378,9 +351,6 @@ drop table t;
" in-memory dict."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -420,9 +390,6 @@ drop table t;
"7. Hit crash point before/after log checkpoint is done."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -456,9 +423,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -495,7 +459,4 @@ i f c
1 1.1 a
2 2.2 b
drop table t;
-set global innodb_file_format = Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
index cb8a4d5a157..1a02c1a711a 100644
--- a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result
@@ -5,9 +5,6 @@ set global innodb_file_per_table = on;
"1. Hit crash point while writing redo log."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -24,9 +21,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -43,9 +41,6 @@ drop table t;
"2. Hit crash point on completion of redo log write."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -62,9 +57,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -84,9 +80,6 @@ drop table t;
"3. Hit crash point while dropping indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -103,9 +96,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -124,9 +118,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -143,9 +134,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -164,9 +156,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -183,9 +172,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -206,9 +196,6 @@ drop table t;
" of index is commenced."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -225,9 +212,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -247,9 +235,6 @@ drop table t;
"5. Hit crash point while creating indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -266,9 +251,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -287,9 +273,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -306,9 +289,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -327,9 +311,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -346,9 +327,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -369,9 +351,6 @@ drop table t;
" in-memory dict."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -388,9 +367,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -410,9 +390,6 @@ drop table t;
"7. Hit crash point before/after log checkpoint is done."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -429,9 +406,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_before_log_removal";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -445,9 +423,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -464,9 +439,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_after_truncate_done";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -483,18 +459,16 @@ i f c
1 1.1 a
2 2.2 b
drop table t;
-set global innodb_file_format = Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
call mtr.add_suppression("does not exist in the InnoDB internal");
+Warnings:
+Error 145 Table './mtr/test_suppressions' is marked as crashed and should be repaired
+Error 1194 Table 'test_suppressions' is marked as crashed and should be repaired
+Error 1034 1 client is using or hasn't closed the table properly
set global innodb_file_per_table = on;
"1. Hit crash point on completing drop of all indexes before creation"
" of index is commenced."
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode=off;
create temporary table t (
i int, f float, c char,
@@ -511,9 +485,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check Error Table 'test.t' doesn't exist
@@ -521,9 +496,6 @@ test.t check status Operation failed
"2. Hit crash point after data is updated to system-table and"
" in-memory dict."
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode=off;
create temporary table t (
i int, f float, c char,
@@ -540,14 +512,11 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check Error Table 'test.t' doesn't exist
test.t check status Operation failed
-set global innodb_file_format = Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
-set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
index 74f1e9dd1ad..b5fea6382ff 100644
--- a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
+++ b/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result
@@ -5,9 +5,6 @@ set global innodb_file_per_table = on;
"1. Hit crash point while writing redo log."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -24,9 +21,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_while_writing_redo_log";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -43,9 +41,6 @@ drop table t;
"2. Hit crash point on completion of redo log write."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -62,9 +57,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -84,9 +80,6 @@ drop table t;
"3. Hit crash point while dropping indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -103,9 +96,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -124,9 +118,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -143,9 +134,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -164,9 +156,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -183,9 +172,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -206,9 +196,6 @@ drop table t;
" of index is commenced."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -225,9 +212,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -247,9 +235,6 @@ drop table t;
"5. Hit crash point while creating indexes."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -266,9 +251,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_clust_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -287,9 +273,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -306,9 +289,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -327,9 +311,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -346,9 +327,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_create_of_sec_index";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -369,9 +351,6 @@ drop table t;
" in-memory dict."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -388,9 +367,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -410,9 +390,6 @@ drop table t;
"7. Hit crash point before/after log checkpoint is done."
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -429,9 +406,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_before_log_removal";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -445,9 +423,6 @@ i f c
drop table t;
use test;
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET innodb_strict_mode=OFF;
create table t (
i int, f float, c char,
@@ -464,9 +439,10 @@ check table t;
Table Op Msg_type Msg_text
test.t check status OK
set session debug = "+d,ib_trunc_crash_after_truncate_done";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
-# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
@@ -483,7 +459,4 @@ i f c
1 1.1 a
2 2.2 b
drop table t;
-set global innodb_file_format = Barracuda;
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
diff --git a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
index 9c197737137..0064cf2a469 100644
--- a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
+++ b/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result
@@ -20,32 +20,27 @@ set i = i + 1;
end while;
end|
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Antelope';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table tNUMBER
(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
index cNUMBER_idx(cNUMBER))
engine=innodb row_format=compact
key_block_size=NUMBER;
Warnings:
-Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
+Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER unless ROW_FORMAT=COMPRESSED.
create table t2
(i int, c1 char(100), c2 char(100),
index c1_idx(c1))
engine=innodb row_format=compact
key_block_size=16;
Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
-Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED.
create temporary table t3
(i int, c1 char(100), c2 char(100),
index c1_idx(c1))
engine=innodb row_format=compact
key_block_size=16;
Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
select count(*) from t1;
count(*)
@@ -140,9 +135,6 @@ set i = i + 1;
end while;
end|
set global innodb_file_per_table = 1;
-set global innodb_file_format = 'Barracuda';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table tNUMBER
(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
index cNUMBER_idx(cNUMBER))
@@ -158,6 +150,11 @@ create temporary table t3
index c1_idx(c1))
engine=innodb row_format=compressed
key_block_size=16;
+Warnings:
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
+Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED is ignored for TEMPORARY TABLE.
+Warning 1478 InnoDB: assuming ROW_FORMAT=DYNAMIC.
select count(*) from t1;
count(*)
0
@@ -251,9 +248,6 @@ set i = i + 1;
end while;
end|
set global innodb_file_per_table = 0;
-set global innodb_file_format = 'Antelope';
-Warnings:
-Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table tNUMBER
(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER),
index cNUMBER_idx(cNUMBER))
@@ -261,7 +255,6 @@ engine=innodb row_format=compact
key_block_size=NUMBER;
Warnings:
Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER.
create table t2
(i int, c1 char(100), c2 char(100),
@@ -270,7 +263,6 @@ engine=innodb row_format=compact
key_block_size=16;
Warnings:
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
create temporary table t3
(i int, c1 char(100), c2 char(100),
@@ -278,8 +270,7 @@ index c1_idx(c1))
engine=innodb row_format=compact
key_block_size=16;
Warnings:
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
-Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
+Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE.
Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16.
select count(*) from t1;
count(*)
diff --git a/mysql-test/suite/innodb_zip/r/wl6915_1.result b/mysql-test/suite/innodb_zip/r/wl6915_1.result
deleted file mode 100644
index bba81098e9d..00000000000
--- a/mysql-test/suite/innodb_zip/r/wl6915_1.result
+++ /dev/null
@@ -1,2079 +0,0 @@
-call mtr.ADD_suppression(".*Resizing redo log.*");
-call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*");
-call mtr.ADD_suppression(".*New log files created.*");
-SELECT @@global.innodb_undo_tablespaces;
-@@global.innodb_undo_tablespaces
-0
-CREATE PROCEDURE populate_tables(IN id VARCHAR(10))
-begin
-declare n int default 20;
-set global innodb_file_per_table=on;
-DROP TABLE IF EXISTS t1,t2,t3,t4;
-CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL,
-c2 int NOT NULL,
-c3 char(255) NOT NULL,
-c4 text(600) NOT NULL,
-c5 blob(600) NOT NULL,
-c6 varchar(600) NOT NULL,
-c7 varchar(600) NOT NULL,
-c8 datetime,
-c9 decimal(6,3),
-PRIMARY KEY (c1),
-INDEX (c3,c4(50),c5(50)),
-INDEX (c2))
-ENGINE=InnoDB ROW_FORMAT=redundant;
-set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;");
-PREPARE createTable FROM @s;
-EXECUTE createTable;
-DEALLOCATE PREPARE createTable;
-CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL,
-c2 int NOT NULL,
-c3 char(255) NOT NULL,
-c4 text(600) NOT NULL,
-c5 blob(600) NOT NULL,
-c6 varchar(600) NOT NULL,
-c7 varchar(600) NOT NULL,
-c8 datetime,
-c9 decimal(6,3),
-PRIMARY KEY (c1),
-INDEX (c3,c4(50),c5(50)),
-INDEX (c2))
-ENGINE=InnoDB ROW_FORMAT=compact;
-set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;");
-PREPARE createTable FROM @s;
-EXECUTE createTable;
-DEALLOCATE PREPARE createTable;
-CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL,
-c2 int NOT NULL,
-c3 char(255) NOT NULL,
-c4 text(600) NOT NULL,
-c5 blob(600) NOT NULL,
-c6 varchar(600) NOT NULL,
-c7 varchar(600) NOT NULL,
-c8 datetime,
-c9 decimal(6,3),
-PRIMARY KEY (c1),
-INDEX (c3,c4(50),c5(50)),
-INDEX (c2))
-ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;
-set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;");
-PREPARE createTable FROM @s;
-EXECUTE createTable;
-DEALLOCATE PREPARE createTable;
-CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL,
-c2 int NOT NULL,
-c3 char(255) NOT NULL,
-c4 text(600) NOT NULL,
-c5 blob(600) NOT NULL,
-c6 varchar(600) NOT NULL,
-c7 varchar(600) NOT NULL,
-c8 datetime,
-c9 decimal(6,3),
-PRIMARY KEY (c1),
-INDEX (c3,c4(50),c5(50)),
-INDEX (c2))
-ENGINE=InnoDB ROW_FORMAT=dynamic;
-set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;");
-PREPARE createTable FROM @s;
-EXECUTE createTable;
-DEALLOCATE PREPARE createTable;
-while (n > 0) do
-START TRANSACTION;
-set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
-REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
-REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
-NOW(),(100.55+n));
-set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
-REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
-REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
-NOW(),(100.55+n));
-savepoint a;
-set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
-REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
-REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
-NOW(),(100.55+n));
-savepoint b;
-set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
-REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
-REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
-NOW(),(100.55+n));
-if (n > 10) then
-if (n > 10 and n <=12) then
-ROLLBACK TO SAVEPOINT a;
-COMMIT;
-end if;
-if (n > 12 and n < 15) then
-ROLLBACK TO SAVEPOINT b;
-COMMIT;
-end if;
-if (n > 15) then
-COMMIT;
-end if;
-else
-if (n > 5) then
-START TRANSACTION;
-DELETE FROM t1_temp WHERE c1 > 10 ;
-DELETE FROM t2_temp WHERE c1 > 10 ;
-DELETE FROM t3_temp WHERE c1 > 10 ;
-DELETE FROM t4_temp WHERE c1 > 10 ;
-rollback;
-START TRANSACTION;
-update t1_temp set c1 = c1 + 1000 WHERE c1 > 10;
-update t2_temp set c1 = c1 + 1000 WHERE c1 > 10;
-update t3_temp set c1 = c1 + 1000 WHERE c1 > 10;
-update t4_temp set c1 = c1 + 1000 WHERE c1 > 10;
-rollback;
-end if;
-end if;
-if (n < 5) then
-rollback;
-end if;
-FLUSH logs;
-ALTER TABLE t1_temp DROP PRIMARY KEY;
-ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
-ALTER TABLE t2_temp DROP PRIMARY KEY;
-ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
-ALTER TABLE t3_temp DROP PRIMARY KEY;
-ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
-ALTER TABLE t4_temp DROP PRIMARY KEY;
-ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
-FLUSH tables;
-START TRANSACTION;
-set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-DELETE FROM t1_temp WHERE c1 between 100 and 110;
-DELETE FROM t2_temp WHERE c1 between 100 and 110;
-DELETE FROM t3_temp WHERE c1 between 100 and 110;
-DELETE FROM t4_temp WHERE c1 between 100 and 110;
-update t1_temp set c1 = c1+1 WHERE c1>110;
-update t2_temp set c1 = c1+1 WHERE c1>110;
-update t3_temp set c1 = c1+1 WHERE c1>110;
-update t4_temp set c1 = c1+1 WHERE c1>110;
-savepoint a;
-set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-savepoint b;
-set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
-PREPARE insertIntoTable FROM @s;
-EXECUTE insertIntoTable;
-DEALLOCATE PREPARE insertIntoTable;
-INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
-REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
-REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
-NOW(),(100.55+n+100));
-savepoint c;
-rollback to b;
-rollback to a;
-COMMIT;
-COMMIT;
-rollback;
-set n = n - 1;
-end while;
-end|
-connect con1,localhost,root,,;
-connect con2,localhost,root,,;
-#---client 1 : dml operation ---"
-connection con1;
-#---client 2 : dml operation ---"
-connection con2;
-# In connection 1
-connection con1;
-SELECT count(*) FROM t1_1;
-count(*)
-36
-SELECT count(*) FROM t2_1;
-count(*)
-36
-SELECT count(*) FROM t3_1;
-count(*)
-34
-SELECT count(*) FROM t4_1;
-count(*)
-32
-SELECT c1 FROM t1_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_1;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_1;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-# In connection 2
-connection con2;
-SELECT count(*) FROM t1_2;
-count(*)
-36
-SELECT count(*) FROM t2_2;
-count(*)
-36
-SELECT count(*) FROM t3_2;
-count(*)
-34
-SELECT count(*) FROM t4_2;
-count(*)
-32
-SELECT c1 FROM t1_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_2;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_2;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-# In connection 1
-connection con1;
-set AUTOCOMMIT = 0;
-ALTER TABLE t1_temp DROP PRIMARY KEY;
-ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t2_temp DROP PRIMARY KEY;
-ALTER TABLE t2_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t3_temp DROP PRIMARY KEY;
-ALTER TABLE t3_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t4_temp DROP PRIMARY KEY;
-ALTER TABLE t4_temp ADD PRIMARY KEY (c1);
-INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-Warnings:
-Warning 1062 Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
-ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
-set AUTOCOMMIT = 1;
-SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1);
-c1 c2
-20 20
-SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1);
-c1 c2
-20 20
-SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1);
-c1 c2
-20 20
-SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1);
-c1 c2
-20 20
-REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
-c1 c2 c3 c4 c5 c6 c7 c9
-20 1 a a a a a 100.550
-update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
-SELECT count(*) FROM t1_temp WHERE c1 = 140;
-count(*)
-1
-SELECT count(*) FROM t2_temp WHERE c1 = 140;
-count(*)
-1
-SELECT count(*) FROM t3_temp WHERE c1 = 140;
-count(*)
-1
-SELECT count(*) FROM t4_temp WHERE c1 = 140;
-count(*)
-1
-ALTER TABLE t1_temp ADD COLUMN c10 int default 99 ,
-ADD COLUMN c11 varchar(100) default 'test';
-ALTER TABLE t1_temp DROP PRIMARY KEY;
-ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
-INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55);
-SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
-c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
--1 -1 a a a a a 100.550 99 test
-SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test';
-count(*)
-27
-INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55)
-ON DUPLICATE KEY UPDATE c1=-2,c2=-2;
-SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
-c1 c2 c3 c4 c5 c6 c7 c9 c10 c11
--2 -2 a a a a a 100.550 99 test
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
-connection con2;
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-connection default;
-connect con1,localhost,root,,;
-connect con2,localhost,root,,;
-connection con1;
-call populate_tables('_1');;
-connection con2;
-call populate_tables('_2');;
-"#connection 1 - verify tables"
-connection con1;
-SELECT count(*) FROM t1_1;
-count(*)
-36
-SELECT count(*) FROM t2_1;
-count(*)
-36
-SELECT count(*) FROM t3_1;
-count(*)
-34
-SELECT count(*) FROM t4_1;
-count(*)
-32
-SELECT c1 FROM t1_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_1;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_1;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
-"#connection 2 - verify tables"
-connection con2;
-SELECT count(*) FROM t1_2;
-count(*)
-36
-SELECT count(*) FROM t2_2;
-count(*)
-36
-SELECT count(*) FROM t3_2;
-count(*)
-34
-SELECT count(*) FROM t4_2;
-count(*)
-32
-SELECT c1 FROM t1_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_2;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_2;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-connection default;
-connect con1,localhost,root,,;
-connect con2,localhost,root,,;
-connection con1;
-call populate_tables('_1');;
-connection con2;
-call populate_tables('_2');;
-"#connection 1 - verify tables"
-connection con1;
-SELECT count(*) FROM t1_1;
-count(*)
-36
-SELECT count(*) FROM t2_1;
-count(*)
-36
-SELECT count(*) FROM t3_1;
-count(*)
-34
-SELECT count(*) FROM t4_1;
-count(*)
-32
-SELECT c1 FROM t1_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_1;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_1;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_1;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
-"#connection 2 - verify tables"
-connection con2;
-SELECT count(*) FROM t1_2;
-count(*)
-36
-SELECT count(*) FROM t2_2;
-count(*)
-36
-SELECT count(*) FROM t3_2;
-count(*)
-34
-SELECT count(*) FROM t4_2;
-count(*)
-32
-SELECT c1 FROM t1_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t2_2;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t3_2;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT c1 FROM t4_2;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-SELECT count(*) FROM t1_temp;
-count(*)
-26
-SELECT count(*) FROM t2_temp;
-count(*)
-26
-SELECT count(*) FROM t3_temp;
-count(*)
-24
-SELECT count(*) FROM t4_temp;
-count(*)
-22
-SELECT c1 FROM t1_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t2_temp;
-c1
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t3_temp;
-c1
-5
-6
-7
-8
-9
-10
-13
-14
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-SELECT c1 FROM t4_temp;
-c1
-5
-6
-7
-8
-9
-10
-15
-16
-17
-18
-19
-20
-122
-124
-126
-128
-130
-132
-134
-136
-138
-140
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-connection default;
-DROP PROCEDURE populate_tables;
diff --git a/mysql-test/suite/innodb_zip/t/create_options.test b/mysql-test/suite/innodb_zip/t/create_options.test
index 1a3dbdff90a..86ef141cae8 100644
--- a/mysql-test/suite/innodb_zip/t/create_options.test
+++ b/mysql-test/suite/innodb_zip/t/create_options.test
@@ -63,10 +63,11 @@ SET default_storage_engine=InnoDB;
--disable_query_log
# These values can change during the test
+LET $innodb_file_format_orig=`select @@innodb_file_format`;
LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
--enable_query_log
+SET GLOBAL innodb_file_format=`Barracuda`;
SET GLOBAL innodb_file_per_table=ON;
# The first half of these tests are with strict mode ON.
@@ -242,8 +243,9 @@ SHOW WARNINGS;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
---error 1478
+--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
SET GLOBAL innodb_file_format=Barracuda;
DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
@@ -257,7 +259,7 @@ ALTER TABLE t1 ADD COLUMN f2 INT;
SHOW WARNINGS;
SET GLOBAL innodb_file_format=Barracuda;
---echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
+--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT=COMPRESSED
--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
--echo # innodb_file_per_table=OFF and that they can be set to default
--echo # values during strict mode.
@@ -269,8 +271,10 @@ SHOW WARNINGS;
--error ER_ILLEGAL_HA,1005
CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
---error 1005
CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
+SHOW WARNINGS;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+DROP TABLE t1;
CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
SHOW WARNINGS;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
@@ -287,8 +291,9 @@ SHOW WARNINGS;
--error ER_ILLEGAL_HA_CREATE_OPTION
ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
SHOW WARNINGS;
---error 1478
ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
+SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
+SHOW WARNINGS;
ALTER TABLE t1 ROW_FORMAT=COMPACT;
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
@@ -522,7 +527,6 @@ SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE
DROP TABLE t1;
--disable_query_log
+EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
--enable_query_log
-
diff --git a/mysql-test/suite/innodb_zip/t/disabled.def b/mysql-test/suite/innodb_zip/t/disabled.def
deleted file mode 100644
index 02adb097c9d..00000000000
--- a/mysql-test/suite/innodb_zip/t/disabled.def
+++ /dev/null
@@ -1,14 +0,0 @@
-##############################################################################
-#
-# List the test cases that are to be disabled temporarily.
-#
-# Separate the test case name and the comment with ':'.
-#
-# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
-#
-# Do not use any TAB characters for whitespace.
-#
-##############################################################################
-
-wl6560 : Very long, timeout
-
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.opt b/mysql-test/suite/innodb_zip/t/innochecksum.opt
new file mode 100644
index 00000000000..ac26eca328c
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.opt
@@ -0,0 +1 @@
+--skip-innodb-doublewrite
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test
index 3ef311ed154..0403251bf64 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum.test
@@ -17,8 +17,6 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
-SET GLOBAL innodb_file_per_table=on;
-
CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB;
CREATE INDEX idx1 ON tab1(c2(10));
INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1');
@@ -163,7 +161,7 @@ let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\';
--exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd
--echo # start the server with innodb_checksum_algorithm=InnoDB
---let restart_options= : --innodb_checksum_algorithm=innodb
+--let $restart_parameters= --innodb_checksum_algorithm=innodb
--source include/start_mysqld.inc
INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32');
@@ -181,7 +179,7 @@ SELECT c1,c2 FROM tab1 order by c1,c2;
--exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd
--echo # Start the server with checksum algorithm=none
---let restart_options= : --innodb_checksum_algorithm=none
+--let $restart_parameters= --innodb_checksum_algorithm=none
--source include/start_mysqld.inc
INSERT INTO tab1 VALUES(3, 'Innochecksum None');
@@ -195,7 +193,7 @@ DROP TABLE t1;
--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd
--echo # Restart the DB server with innodb_checksum_algorithm=crc32
---let restart_options= : --innodb_checksum_algorithm=crc32 --innodb_file_per_table=on
+--let $restart_parameters= --innodb_checksum_algorithm=crc32
--source include/start_mysqld.inc
SELECT * FROM tab1;
@@ -209,7 +207,7 @@ SELECT c1,c2 FROM tab1 order by c1,c2;
--exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd
--echo # Restart the DB server with innodb_checksum_algorithm=InnoDB
---let restart_options= : --innodb_checksum_algorithm=innodb --innodb_file_per_table=on
+--let $restart_parameters= --innodb_checksum_algorithm=innodb
--source include/start_mysqld.inc
DELETE FROM tab1 where c1=2;
@@ -236,8 +234,7 @@ let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\';
--remove_file $SEARCH_FILE
# Cleanup
---echo # Restart the server
+--let $restart_parameters=
--source include/start_mysqld.inc
DROP TABLE tab1;
-SET GLOBAL innodb_file_per_table=default;
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.opt b/mysql-test/suite/innodb_zip/t/innochecksum_2.opt
new file mode 100644
index 00000000000..ac26eca328c
--- /dev/null
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.opt
@@ -0,0 +1 @@
+--skip-innodb-doublewrite
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
index a290a9fc449..7f4ad336805 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test
@@ -4,8 +4,7 @@
--source include/have_innodb.inc
--source include/have_innodb_zip.inc
--source include/have_debug.inc
-# Valgrind would complain about memory leaks when we crash on purpose.
---source include/not_valgrind.inc
+--source include/no_valgrind_without_big.inc
# Avoid CrashReporter popup on Mac.
--source include/not_crashrep.inc
diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test
index 60c4b167d9a..7895510b335 100644
--- a/mysql-test/suite/innodb_zip/t/innochecksum_3.test
+++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test
@@ -4,8 +4,7 @@
--source include/have_innodb.inc
--source include/have_innodb_zip.inc
-# Valgrind would complain about memory leaks when we crash on purpose.
---source include/not_valgrind.inc
+--source include/no_valgrind_without_big.inc
# Embedded server does not support crashing.
--source include/not_embedded.inc
@@ -19,8 +18,6 @@ let MYSQLD_DATADIR= `SELECT @@datadir`;
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err;
call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
-SET GLOBAL innodb_file_per_table=on;
-
--echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server.
CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY,
@@ -78,7 +75,7 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
EOF
--echo : start the server with innodb_checksum_algorithm=strict_innodb
---let restart_options= : --innodb_checksum_algorithm=strict_innodb --default_storage_engine=InnoDB
+--let $restart_parameters= --innodb_checksum_algorithm=strict_innodb
--source include/start_mysqld.inc
INSERT INTO tab1 (pk, linestring_key, linestring_nokey)
@@ -118,7 +115,7 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
EOF
--echo # start the server with innodb_checksum_algorithm=strict_crc32
---let restart_options= : --innodb_checksum_algorithm=strict_crc32 --default_storage_engine=InnoDB
+--let $restart_parameters= --innodb_checksum_algorithm=strict_crc32
--source include/start_mysqld.inc
# check the table status is GOOD with DML
@@ -163,7 +160,7 @@ foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) {
}
EOF
---let $restart_parameters = --innodb_checksum_algorithm=strict_none --default_storage_engine=InnoDB
+--let $restart_parameters= --innodb_checksum_algorithm=strict_none
--source include/start_mysqld.inc
--let $restart_parameters=
# check the table status is GOOD with DML
@@ -403,9 +400,6 @@ let SEARCH_PATTERN= Incorrect unsigned integer value: '18446744073709551616';
--remove_file $SEARCH_FILE
# Cleanup
---echo # Restart the server
--source include/start_mysqld.inc
-DROP TABLE tab1;
-DROP TABLE tab2;
-SET GLOBAL innodb_file_per_table=default;
+DROP TABLE tab1,tab2;
diff --git a/mysql-test/suite/innodb_zip/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test
deleted file mode 100644
index aeb22514bf6..00000000000
--- a/mysql-test/suite/innodb_zip/t/innodb-create-options.test
+++ /dev/null
@@ -1,561 +0,0 @@
---source include/have_innodb.inc
-# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE
-# Related bugs;
-# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
-# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error
-# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
-# Rules for interpreting CREATE_OPTIONS
-# 1) Create options on an ALTER are added to the options on the
-# previous CREATE or ALTER statements.
-# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value.
-# If the current ROW_FORMAT has explicitly been set to COMPRESSED,
-# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE
-# will not be used.
-# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT.
-# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to
-# unset or erase the values persisted in the MySQL dictionary and
-# by SHOW CTREATE TABLE.
-# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are
-# both explicitly given, the ROW_FORMAT is always used in non-strict
-# mode.
-# 6) InnoDB will automatically convert a table to COMPRESSED only if a
-# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT
-# or has not been used on a previous CREATE TABLE or ALTER TABLE.
-# 7) InnoDB strict mode is designed to prevent incompatible create
-# options from being used together.
-# 8) The non-strict behavior is intended to permit you to import a
-# mysqldump file into a database that does not support compressed
-# tables, even if the source database contained compressed tables.
-# All invalid values and/or incompatible combinations of ROW_FORMAT
-# and KEY_BLOCK_SIZE are automatically corrected
-#
-# *** innodb_strict_mode=ON ***
-# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC
-# & REDUNDANT. All others are rejected.
-# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected.
-# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'.
-# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC &
-# REDUNDANT.
-# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED and
-# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope
-# and innodb_file_per_table=OFF
-# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED
-# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified
-# as COMPACT, DYNAMIC or REDUNDANT.
-# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the
-# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified.
-#
-# *** innodb_strict_mode=OFF ***
-# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8.
-# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT.
-# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid
-# ROW_FORMAT is specified.
-# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF
-# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will
-# ignore all non-zero KEY_BLOCK_SIZEs.
-#
-# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors"
-# This test case does not try to create tables with KEY_BLOCK_SIZE > 4
-# since they are rejected for InnoDB page sizes of 8k and 16k.
-# See innodb_16k and innodb_8k for those tests.
-
--- source include/have_innodb.inc
-SET default_storage_engine=InnoDB;
-
---disable_query_log
-# These values can change during the test
-LET $innodb_file_format_orig=`select @@innodb_file_format`;
-LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
-LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
---enable_query_log
-
-SET GLOBAL innodb_file_format=`Barracuda`;
-SET GLOBAL innodb_file_per_table=ON;
-
-# The first half of these tests are with strict mode ON.
-SET SESSION innodb_strict_mode = ON;
-
---echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
-DROP TABLE IF EXISTS t1;
---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
---echo # But it is an invalid mode in InnoDB
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
-
---echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
---echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC
-DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
---echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
---echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE
---echo # ALTER with each ROW_FORMAT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2;
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW CREATE TABLE t1;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE.
-DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
-
---echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope
---echo # and that they can be set to default values during strict mode.
-SET GLOBAL innodb_file_format=Antelope;
-DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SET GLOBAL innodb_file_format=Barracuda;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-SET GLOBAL innodb_file_format=Antelope;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW CREATE TABLE t1;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SET GLOBAL innodb_file_format=Barracuda;
-
---echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and
---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with
---echo # innodb_file_per_table=OFF and that they can be set to default
---echo # values during strict mode.
-SET GLOBAL innodb_file_per_table=OFF;
-DROP TABLE IF EXISTS t1;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
---replace_regex / - .*[0-9]*[)]/)/
-SHOW WARNINGS;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
---error ER_ILLEGAL_HA_CREATE_OPTION
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DEFAULT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_per_table=ON;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SET GLOBAL innodb_file_per_table=ON;
-
---echo ##################################################
-SET SESSION innodb_strict_mode = OFF;
-
---echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0
---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified'
---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM.
---echo # It is an invalid mode in InnoDB, use COMPACT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
---echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
---echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT );
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
---echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 KEY_BLOCK_SIZE=4;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT;
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE
---echo # ALTER with each ROW_FORMAT
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SHOW CREATE TABLE t1;
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPRESSED;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-ALTER TABLE t1 ROW_FORMAT=COMPACT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE,
---echo # it defaults to half of the page size.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
---echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT
---echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_format=Antelope;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_format=Barracuda;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_format=Antelope;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_format=Barracuda;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
---echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a
---echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF
---echo and then used again when innodb_file_per_table=ON.
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_per_table=ON;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_per_table=OFF;
-ALTER TABLE t1 ADD COLUMN f1 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-SET GLOBAL innodb_file_per_table=ON;
-ALTER TABLE t1 ADD COLUMN f2 INT;
-SHOW WARNINGS;
-SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1';
-
-
---echo # Cleanup
-DROP TABLE IF EXISTS t1;
-
---disable_query_log
-EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;
-EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
-EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
---enable_query_log
-
diff --git a/mysql-test/suite/innodb_zip/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test
index 1c7c7c8c419..8a201cb37ae 100644
--- a/mysql-test/suite/innodb_zip/t/innodb-zip.test
+++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test
@@ -1,10 +1,5 @@
-- source include/have_innodb.inc
-
---disable_warnings
-DROP DATABASE IF EXISTS mysqltest_innodb_zip;
---enable_warnings
-
CREATE DATABASE mysqltest_innodb_zip;
USE mysqltest_innodb_zip;
SELECT table_name, row_format, data_length, index_length
@@ -18,14 +13,13 @@ let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
-
--let $query_i_s = SELECT table_schema, table_name, row_format, data_length, index_length FROM information_schema.tables WHERE engine='innodb' AND table_schema != 'mysql'
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
SET @@global.innodb_stats_on_metadata=ON;
-
+
create table t0(a int primary key) engine=innodb row_format=compressed;
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
@@ -280,21 +274,18 @@ show warnings;
create table t6 (id int primary key) engine = innodb row_format = compressed;
--replace_regex / - .*[0-9]*[)]/)/
show warnings;
---replace_regex / - .*[0-9]*[)]/)/
---error ER_CANT_CREATE_TABLE
create table t7 (id int primary key) engine = innodb row_format = dynamic;
---replace_regex / - .*[0-9]*[)]/)/
show warnings;
create table t8 (id int primary key) engine = innodb row_format = compact;
create table t9 (id int primary key) engine = innodb row_format = redundant;
--replace_result 16384 {valid} 8192 {valid} 4096 {valid}
--eval $query_i_s
-drop table t8, t9;
+drop table t7, t8, t9;
#test valid values with innodb_file_format unset
set global innodb_file_per_table = on;
-set global innodb_file_format = `0`;
+set global innodb_file_format = `0`;
--replace_regex / - .*[0-9]*[)]/)/
--error ER_CANT_CREATE_TABLE
@@ -369,6 +360,4 @@ eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
--enable_query_log
-USE test;
DROP DATABASE mysqltest_innodb_zip;
-
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
index 1d82b95a602..93051d56639 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
@@ -6,11 +6,6 @@
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size .* for a record on index leaf page.");
-let $file_format=`select @@innodb_file_format`;
-let $file_per_table=`select @@innodb_file_per_table`;
-SET GLOBAL innodb_file_format='Barracuda';
-SET GLOBAL innodb_file_per_table=ON;
-
#
# The following is copied from http://bugs.mysql.com/36169
# (http://bugs.mysql.com/file.php?id=9121)
@@ -1156,6 +1151,3 @@ DROP TABLE IF EXISTS table3;
DROP TABLE IF EXISTS table4;
DROP TABLE IF EXISTS table5;
DROP TABLE IF EXISTS table6;
-
-EVAL SET GLOBAL innodb_file_format=$file_format;
-EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
index 015f461e532..622e0c56b15 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
@@ -14,17 +14,9 @@ SET storage_engine=InnoDB;
-- disable_query_log
-- disable_result_log
-let $file_format=`select @@innodb_file_format`;
-let $file_per_table=`select @@innodb_file_per_table`;
-SET GLOBAL innodb_file_format='Barracuda';
-SET GLOBAL innodb_file_per_table=on;
-
-DROP TABLE IF EXISTS `table0`;
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
CHECK TABLE table0 EXTENDED;
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
CHECK TABLE table0 EXTENDED;
DROP TABLE table0;
-EVAL SET GLOBAL innodb_file_format=$file_format;
-EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
index 3c5d79826f0..fe7bdbae42d 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
@@ -1,10 +1,5 @@
-- source include/have_innodb.inc
-let $file_format=`select @@innodb_file_format`;
-let $file_per_table=`select @@innodb_file_per_table`;
-SET GLOBAL innodb_file_format='Barracuda';
-SET GLOBAL innodb_file_per_table=on;
-
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
@@ -102,6 +97,3 @@ col90=repeat('gale',48);
SHOW WARNINGS;
DROP TABLE bug52745;
-
-EVAL SET GLOBAL innodb_file_format=$file_format;
-EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
index 6c80165f6eb..1366e0e43ac 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test
@@ -1,10 +1,5 @@
-- source include/have_innodb.inc
-let $file_format=`select @@innodb_file_format`;
-let $file_per_table=`select @@innodb_file_per_table`;
-
-SET GLOBAL innodb_file_format='Barracuda';
-SET GLOBAL innodb_file_per_table=on;
SET GLOBAL innodb_strict_mode=on;
set old_alter_table=0;
@@ -18,6 +13,4 @@ SHOW WARNINGS;
DROP TABLE bug53591;
-EVAL SET GLOBAL innodb_file_format=$file_format;
-EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
SET GLOBAL innodb_strict_mode=DEFAULT;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test
index f592bd16942..4e73b1fce0f 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test
@@ -4,8 +4,6 @@
#
-- disable_query_log
SET @tx_isolation_orig = @@tx_isolation;
-SET @innodb_file_per_table_orig = @@innodb_file_per_table;
-SET @innodb_file_format_orig = @@innodb_file_format;
# The flag innodb_change_buffering_debug is only available in debug builds.
# It instructs InnoDB to try to evict pages from the buffer pool when
# change buffering is possible, so that the change buffer will be used
@@ -16,8 +14,6 @@ SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug;
SET GLOBAL innodb_change_buffering_debug = 1;
-- enable_query_log
SET GLOBAL tx_isolation='REPEATABLE-READ';
-SET GLOBAL innodb_file_format=Barracuda;
-SET GLOBAL innodb_file_per_table=on;
CREATE TABLE bug56680(
a INT AUTO_INCREMENT PRIMARY KEY,
@@ -133,7 +129,5 @@ DROP TABLE bug56680;
-- disable_query_log
SET GLOBAL tx_isolation = @tx_isolation_orig;
-SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig;
-SET GLOBAL innodb_file_format = @innodb_file_format_orig;
-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE
SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig;
diff --git a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
index 8af2bc7ffc7..72890a933f2 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
@@ -6,12 +6,8 @@ SET default_storage_engine=InnoDB;
call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
-let $innodb_file_format_orig=`select @@innodb_file_format`;
-let $innodb_file_per_table_orig=`select @@innodb_file_per_table`;
let $innodb_large_prefix_orig=`select @@innodb_large_prefix`;
-set global innodb_file_format="Barracuda";
-set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
set global innodb_strict_mode=1;
@@ -391,11 +387,13 @@ update worklog5743 set a = (repeat("x", 25000));
select @@session.tx_isolation;
--connection con1
select a = repeat("a", 20000) from worklog5743;
+--disconnect con1
--connection con2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select @@session.tx_isolation;
select a = repeat("x", 25000) from worklog5743;
+--disconnect con2
--connection default
rollback;
@@ -427,16 +425,5 @@ create index idx on worklog5743(a(768));
create index idx2 on worklog5743(a(767));
drop table worklog5743;
-
-eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
-eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig;
eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig;
SET GLOBAL innodb_strict_mode = DEFAULT;
---connection con1
---disconnect con1
---source include/wait_until_disconnected.inc
---connection con2
---disconnect con2
---source include/wait_until_disconnected.inc
---connection default
-
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test
index eb4c23aa66e..3ec990b4715 100644
--- a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test
@@ -21,6 +21,5 @@
let $wl6501_file_per_table = 1;
let $wl6501_row_fmt = compressed;
let $wl6501_kbs = 16;
-let $wl6501_file_format = 'Barracuda';
--source suite/innodb/include/innodb_wl6501_crash.inc
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test
index 870af3dfc94..f54df3c128c 100644
--- a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test
@@ -21,9 +21,7 @@
let $wl6501_file_per_table = 1;
let $wl6501_row_fmt = compressed;
let $wl6501_kbs = 4;
-let $wl6501_file_format = 'Barracuda';
--source suite/innodb/include/innodb_wl6501_crash.inc
let $wl6501_temp = temporary;
--source suite/innodb/include/innodb_wl6501_crash_temp.inc
-
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test
index 3432a5a5c76..2f9847ae5fb 100644
--- a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test
+++ b/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test
@@ -21,6 +21,5 @@
let $wl6501_file_per_table = 1;
let $wl6501_row_fmt = compressed;
let $wl6501_kbs = 8;
-let $wl6501_file_format = 'Barracuda';
--source suite/innodb/include/innodb_wl6501_crash.inc
diff --git a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test
index 8c746fe8abf..e6392759d5e 100644
--- a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test
+++ b/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test
@@ -22,20 +22,16 @@
let $wl6501_file_per_table = 1;
let $wl6501_row_fmt = compact;
let $wl6501_kbs = 16;
-let $wl6501_file_format = 'Antelope';
--source suite/innodb_zip/include/innodb_wl6501_scale.inc
# Single-Tablespace/Compressed
let $wl6501_file_per_table = 1;
let $wl6501_row_fmt = compressed;
let $wl6501_kbs = 16;
-let $wl6501_file_format = 'Barracuda';
--source suite/innodb_zip/include/innodb_wl6501_scale.inc
# System-Tablespace/Non-Compressed
let $wl6501_file_per_table = 0;
let $wl6501_row_fmt = compact;
let $wl6501_kbs = 16;
-let $wl6501_file_format = 'Antelope';
--source suite/innodb_zip/include/innodb_wl6501_scale.inc
-
diff --git a/mysql-test/suite/innodb_zip/t/wl6560.test b/mysql-test/suite/innodb_zip/t/wl6560.test
deleted file mode 100644
index 55d36747938..00000000000
--- a/mysql-test/suite/innodb_zip/t/wl6560.test
+++ /dev/null
@@ -1,422 +0,0 @@
-#
-# WL#6560: InnoDB: separate tablespace for innodb-temp-tables.
-#
-
---source include/have_innodb.inc
---source include/have_innodb_zip.inc
-# Embedded server does not restart of server
---source include/not_embedded.inc
--- source include/big_test.inc
-
---disable_query_log
-call mtr.add_suppression("Tablespace innodb_temporary ran out of space. Please add another file or use 'autoextend' for the last file in setting innodb_temp_data_file_path.");
-call mtr.add_suppression("The table 't1' is full");
---enable_query_log
-
-################################################################################
-#
-# Will test following scenarios:
-# 1. creation of shared temp-tablespace.
-# 2. ddl + dml operation involving temp-tablespace.
-# insert/delete/update/select
-# create/drop/alter/truncate/import-discard (though blocked).
-# 3. ddl + dml operation on compressed table.
-# (table doesn't reside in shared temp-tablespace).
-# 4. Test bulk-loading that result in auto-extension of temp-tablespace.
-# 5. re-creation of temp-tablespace on re-start.
-# also to ensure non-existence of existing temp-table.
-# 6. restart server in innodb-read-only mode. this will also
-# block creation of temp-tables.
-# 7. try starting server with shared and temp-tablespace filename same.
-# 8. try re-starting server with param so that temp-tablespace can't be
-# expanded and insert enough data to make it full.
-# 9. tests for different row format types and key block sizes for
-# compressed tables.
-# 10. try restarting server with raw device specified for temp-tablespace.
-# 11. try restarting server with temp-tablespace less than min. threshold
-# 12. no file specified for temp-tablespace.
-################################################################################
-
-#-----------------------------------------------------------------------------
-#
-# create test-bed
-#
-let $per_table = `select @@innodb_file_per_table`;
-
-set global innodb_file_per_table = off;
-let $MYSQL_TMP_DIR = `select @@tmpdir`;
-let $MYSQL_DATA_DIR = `select @@datadir`;
-let SEARCH_FILE = $MYSQLTEST_VARDIR/log/my_restart.err;
-let $args = --loose-console --core-file > $SEARCH_FILE 2>&1;
-let crash = --loose-console > $SEARCH_FILE 2>&1 --innodb-force-recovery-crash;
-let readonly = $args --innodb_read_only;
-let nameconflicts = $args --innodb_data_file_path="ibdata1:12M:autoextend:max:134217728" --innodb_temp_data_file_path="ibdata1:12M:autoextend";
-let rawdevice1 = $args --innodb_temp_data_file_path="/dev/hdd1:3Gnewraw;/dev/hdd2:2Gnewraw";
-let rawdevice2 = $args --innodb_temp_data_file_path="/dev/hdd1:3Graw;/dev/hdd2:2Graw";
-let sizeoftempfile1 = $args --innodb_temp_data_file_path="ibtmp1:2M:autoextend";
-let sizeoftempfile2 = $args --innodb_data_file_path="ibdata1:2M:autoextend";
-let notemptablespacefile = $args --innodb_temp_data_file_path="";
-
-#-----------------------------------------------------------------------------
-#
-# 1. creation of shared temp-tablespace.
-#
---echo # files in MYSQL_DATA_DIR
---list_files $MYSQL_DATA_DIR/ ibtmp*
-
-
-#-----------------------------------------------------------------------------
-#
-# 2. ddl + dml operation involving temp-tablespace.
-# insert/delete/update/select
-# create/drop/alter/truncate/import-discard (though blocked).
-#
-select @@global.innodb_file_per_table;
-create temporary table t1 (i int, f float, c char(100)) engine=innodb;
-#
---source suite/innodb_zip/include/innodb_temp_table_dml.inc
-#
-# alter table
---error ER_CANNOT_DISCARD_TEMPORARY_TABLE
-alter table t1 discard tablespace;
---error ER_CANNOT_DISCARD_TEMPORARY_TABLE
-alter table t1 import tablespace;
-#
-# drop table
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 3. ddl + dml operation on compressed table.
-# (table doesn't reside in shared temp-tablespace).
-#
---echo #files in MYSQL_TMP_DIR
---list_files $MYSQL_TMP_DIR/ *.ibd
-set global innodb_file_per_table = 1;
-select @@global.innodb_file_per_table;
-create temporary table t1
- (i int, f float, c char(100)) engine = innodb key_block_size = 4;
-show create table t1;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-#
---source suite/innodb_zip/include/innodb_temp_table_dml.inc
-#
-# alter table
---error ER_CANNOT_DISCARD_TEMPORARY_TABLE
-alter table t1 discard tablespace;
-#
-# drop table
-drop table t1;
-set global innodb_file_per_table = off;
-
-#-----------------------------------------------------------------------------
-#
-# 4. Test bulk-loading that result in auto-extension of temp-tablespace.
-#
-create temporary table t1
- (keyc int, c1 char(100), c2 char(100),
- primary key(keyc)) engine = innodb;
-delimiter |;
-CREATE PROCEDURE populate_t1()
-BEGIN
- DECLARE i INT DEFAULT 1;
- while (i <= 20000) DO
- insert into t1 values (i, 'a', 'b');
- SET i = i + 1;
- END WHILE;
-END|
-delimiter ;|
-set autocommit=0;
-select count(*) from t1;
-call populate_t1();
-select count(*) from t1;
-select * from t1 limit 10;
-set autocommit=1;
-truncate table t1;
-select count(*) from t1;
-#
-drop procedure populate_t1;
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 5. re-creation of temp-tablespace on re-start.
-# also to ensure non-existence of existing temp-table.
-#
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-insert into t1 values (1, 'c', 'b');
-select * from t1;
-#
---source include/restart_mysqld.inc
-#
---echo # files in MYSQL_DATA_DIR
---list_files $MYSQL_DATA_DIR/ ibtmp*
-use test;
---error ER_NO_SUCH_TABLE
-select * from t1;
-
-#-----------------------------------------------------------------------------
-#
-# 6. restart server in innodb-read-only mode. this will also
-# block creation of temp-tables.
-#
-#
---echo "testing temp-table creation in --innodb_read_only mode"
-let $restart_parameters=--innodb-read-only;
---source include/restart_mysqld.inc
-#
-use test;
-show tables;
---error ER_INNODB_READ_ONLY, 1005
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-
-#-----------------------------------------------------------------------------
-#
-# 7. try starting server with shared and temp-tablespace filename same.
-#
---source include/shutdown_mysqld.inc
---echo "testing system and temp tablespace name conflict"
---error 1
---exec $MYSQLD_CMD $nameconflicts
-let SEARCH_PATTERN = innodb_temporary and innodb_system file names seem to be the same;
---source ./include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
---echo "restarting server in normal mode"
---enable_reconnect
-let $restart_parameters = restart;
---source include/start_mysqld.inc
-#
-show tables;
-create temporary table t1 (keyc int, c1 char(100), c2 char(100)) engine = innodb;
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 8. try re-starting server with param so that temp-tablespace can't be expanded
-# and insert enough data to make it full.
-#
---echo # test condition of full-temp-tablespace
-let $restart_parameters=--innodb_temp_data_file_path=ibtmp1:12M;
---source include/restart_mysqld.inc
-#
-create temporary table t1
- (keyc int, c1 char(100), c2 char(100),
- primary key(keyc)) engine = innodb;
-delimiter |;
-CREATE PROCEDURE populate_t1()
-BEGIN
- DECLARE i INT DEFAULT 1;
- while (i <= 20000) DO
- insert into t1 values (i, 'a', 'b');
- SET i = i + 1;
- END WHILE;
-END|
-delimiter ;|
-set autocommit=0;
-select count(*) from t1;
---error ER_RECORD_FILE_FULL
-call populate_t1();
-#
-drop procedure populate_t1;
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 9. tests for different row format types and key block sizes for
-# compressed tables.
-#
-set innodb_strict_mode = off;
---disable_warnings
-set global innodb_file_per_table = 0;
-set global innodb_file_format = 'Antelope';
-create temporary table t (
- i int)
- engine = innodb row_format = compressed;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
-drop table t;
-#
-create temporary table t (
- i int)
- engine = innodb row_format = compressed key_block_size = 8;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
-#
-drop table t;
-set global innodb_file_per_table = 1;
-create temporary table t (
- i int)
- engine = innodb row_format = compressed key_block_size = 8;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
-drop table t;
-#
-create temporary table t (
- i int)
- engine = innodb row_format = dynamic;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-set innodb_strict_mode = on;
-create temporary table t (
- i int)
- engine = innodb row_format = dynamic;
---replace_regex /[0-9]+/NUMBER/
-drop table t;
-#
-set global innodb_file_format = 'Barracuda';
-set innodb_strict_mode = off;
-create temporary table t (
- i int)
- engine = innodb row_format = compressed key_block_size = 8;
---replace_regex /[0-9]+/NUMBER/
-# explicitly disabling it else it will generate warning of ignoring
-# key_block_size when suite is run with innodb-page-size=4k
-#show warnings;
-set innodb_strict_mode = default;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-#
-drop table t;
-create temporary table t (
- i int)
- engine = innodb row_format = compressed;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-create temporary table t (
- i int)
- engine = innodb row_format = dynamic;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-set innodb_strict_mode = on;
-create temporary table t (
- i int)
- engine = innodb row_format = dynamic;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
-drop table t;
-set innodb_strict_mode = off;
-#
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-create temporary table t (
- i int)
- engine = innodb row_format = dynamic key_block_size = 4;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-create temporary table t (
- i int)
- engine = innodb row_format = compact;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-create temporary table t (
- i int)
- engine = innodb key_block_size = 4;
---replace_regex /[0-9]+/NUMBER/
-show warnings;
---echo #files in MYSQL_TMP_DIR
---replace_regex /#sql[0-9a-f_]*/#sql<temporary>/
---list_files $MYSQL_TMP_DIR/ *.ibd
-drop table t;
-#
-
-#-----------------------------------------------------------------------------
-#
-# 10. try restarting server with raw device specified for temp-tablespace.
-#
---source include/shutdown_mysqld.inc
---echo "testing temp tablespace non-support for raw device"
---error 1
---exec $MYSQLD_CMD $rawdevice1
-let SEARCH_PATTERN = support raw device;
---source include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
---echo "testing temp tablespace non-support for raw device"
---error 1
---exec $MYSQLD_CMD $rawdevice2
-let SEARCH_PATTERN = support raw device;
---source include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
-
---source include/start_mysqld.inc
-
-show tables;
-create temporary table t1 (
- keyc int, c1 char(100), c2 char(100)
- ) engine = innodb;
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 11. try restarting server with temp-tablespace less than min. threshold
-#
---source include/shutdown_mysqld.inc
---echo "try starting server with temp-tablespace size < min. threshold"
---error 1
---exec $MYSQLD_CMD $sizeoftempfile1
-let SEARCH_PATTERN = Tablespace size must be at least;
---source ./include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
---echo "try starting server with sys-tablespace size < min. threshold"
---error 1
---exec $MYSQLD_CMD $sizeoftempfile2
-let SEARCH_PATTERN = Tablespace size must be at least;
---source ./include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
-
---source include/start_mysqld.inc
-
-show tables;
-create temporary table t1 (
- keyc int, c1 char(100), c2 char(100)
- ) engine = innodb;
-drop table t1;
-
-#-----------------------------------------------------------------------------
-#
-# 12. no file specified for temp-tablespace.
-#
---source include/shutdown_mysqld.inc
-
---echo "try starting server with no file specified for temp-tablespace"
---error 1
---exec $MYSQLD_CMD $notemptablespacefile
-let SEARCH_PATTERN = init function returned error;
---source ./include/search_pattern_in_file.inc
---remove_file $SEARCH_FILE
-
---source include/start_mysqld.inc
-
-show tables;
-create temporary table t1 (
- keyc int, c1 char(100), c2 char(100)
- ) engine = innodb;
-drop table t1;
diff --git a/mysql-test/suite/innodb_zip/t/wl6915_1.test b/mysql-test/suite/innodb_zip/t/wl6915_1.test
deleted file mode 100644
index 7f0f734d16a..00000000000
--- a/mysql-test/suite/innodb_zip/t/wl6915_1.test
+++ /dev/null
@@ -1,650 +0,0 @@
---source include/have_innodb.inc
---source include/have_innodb_zip.inc
---source include/have_no_undo_tablespaces.inc
---source include/big_test.inc
-
-# Embedded server does not support restarting
---source include/not_embedded.inc
-# Avoid CrashReporter popup on Mac
---source include/not_crashrep.inc
-
-####################################################################
-# TC to test temp-table undolog changes correctness #
-# Sceanrio covered in single testcase : #
-# - Tables with row format(redundant,compressed,dynamic,compact #
-# - Table with primary,composite,prefix,secondary INDEX #
-# - Insert/delete/update with transactioons #
-# - Transaction with COMMIT,rollback,savepoint statements #
-# - Transaction having temporary table and normal table #
-# - Concurrency by execution of two clients creating tables with #
-# same names #
-# - Inserting data using #
-# - Insert into .. , Load data infile..,insert ignore #
-# - Insert into .. on duplicate update #
-# - Check basic delete and upadte [ignore] #
-# - Check constraints like duplicate key,default value #
-# - Alter ADD COLUMN , ADD PRIMARY KEY #
-# - Flush Tables, logs command #
-# - Vary innodb_undo_tablespaces=0,innodb_undo_logs #
-# innodb_log_files_in_group #
-# - Verify rseg message from server log #
-####################################################################
-
-# run for page size >= 8k
---disable_warnings
-if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value >= 8192`)
-{
- --skip Test requires InnoDB with page size >= 8k.
-}
---enable_warnings
-
-call mtr.ADD_suppression(".*Resizing redo log.*");
-call mtr.ADD_suppression(".*Starting to delete and rewrite log files.*");
-call mtr.ADD_suppression(".*New log files created.*");
-# Save initial VALUES of server variable
---disable_query_log
-let $innodb_file_per_table_orig=`SELECT @@innodb_file_per_table`;
---enable_query_log
-
-SELECT @@global.innodb_undo_tablespaces;
-
-# Create procedure to perform
-# 1. Create temp table with row types , INDEX , sufficent data types
-# 2. Perform DML with transaction
-delimiter |;
-CREATE PROCEDURE populate_tables(IN id VARCHAR(10))
- begin
- declare n int default 20;
- set global innodb_file_per_table=on;
- DROP TABLE IF EXISTS t1,t2,t3,t4;
-
- CREATE TEMPORARY TABLE t1_temp(c1 int NOT NULL,
- c2 int NOT NULL,
- c3 char(255) NOT NULL,
- c4 text(600) NOT NULL,
- c5 blob(600) NOT NULL,
- c6 varchar(600) NOT NULL,
- c7 varchar(600) NOT NULL,
- c8 datetime,
- c9 decimal(6,3),
- PRIMARY KEY (c1),
- INDEX (c3,c4(50),c5(50)),
- INDEX (c2))
- ENGINE=InnoDB ROW_FORMAT=redundant;
-
- set @s = concat("CREATE TABLE t1",id," ( c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=redundant;");
- PREPARE createTable FROM @s;
- EXECUTE createTable;
- DEALLOCATE PREPARE createTable;
-
-
- CREATE TEMPORARY TABLE t2_temp(c1 int NOT NULL,
- c2 int NOT NULL,
- c3 char(255) NOT NULL,
- c4 text(600) NOT NULL,
- c5 blob(600) NOT NULL,
- c6 varchar(600) NOT NULL,
- c7 varchar(600) NOT NULL,
- c8 datetime,
- c9 decimal(6,3),
- PRIMARY KEY (c1),
- INDEX (c3,c4(50),c5(50)),
- INDEX (c2))
- ENGINE=InnoDB ROW_FORMAT=compact;
-
- set @s = concat("CREATE TABLE t2",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compact;");
- PREPARE createTable FROM @s;
- EXECUTE createTable;
- DEALLOCATE PREPARE createTable;
-
- CREATE TEMPORARY TABLE t3_temp(c1 int NOT NULL,
- c2 int NOT NULL,
- c3 char(255) NOT NULL,
- c4 text(600) NOT NULL,
- c5 blob(600) NOT NULL,
- c6 varchar(600) NOT NULL,
- c7 varchar(600) NOT NULL,
- c8 datetime,
- c9 decimal(6,3),
- PRIMARY KEY (c1),
- INDEX (c3,c4(50),c5(50)),
- INDEX (c2))
- ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;
-
- set @s = concat("CREATE TABLE t3",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=compressed key_block_size=4;");
- PREPARE createTable FROM @s;
- EXECUTE createTable;
- DEALLOCATE PREPARE createTable;
-
- CREATE TEMPORARY TABLE t4_temp(c1 int NOT NULL,
- c2 int NOT NULL,
- c3 char(255) NOT NULL,
- c4 text(600) NOT NULL,
- c5 blob(600) NOT NULL,
- c6 varchar(600) NOT NULL,
- c7 varchar(600) NOT NULL,
- c8 datetime,
- c9 decimal(6,3),
- PRIMARY KEY (c1),
- INDEX (c3,c4(50),c5(50)),
- INDEX (c2))
- ENGINE=InnoDB ROW_FORMAT=dynamic;
-
- set @s = concat("CREATE TABLE t4",id," (c1 int NOT NULL, c2 int NOT NULL, c3 char(255) NOT NULL, c4 text(600) NOT NULL, c5 blob(600) NOT NULL, c6 varchar(600) NOT NULL, c7 varchar(600) NOT NULL, c8 datetime, c9 decimal(6,3), PRIMARY KEY (c1), INDEX (c3,c4(50),c5(50)), INDEX (c2)) ENGINE=InnoDB ROW_FORMAT=dynamic;");
- PREPARE createTable FROM @s;
- EXECUTE createTable;
- DEALLOCATE PREPARE createTable;
-
- while (n > 0) do
- START TRANSACTION;
- set @s = concat("INSERT INTO t1",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t1_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
- REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
- REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
- NOW(),(100.55+n));
-
- set @s = concat("INSERT INTO t2",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
-
- INSERT INTO t2_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
- REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
- REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
- NOW(),(100.55+n));
-
- savepoint a;
-
- set @s = concat("INSERT INTO t3",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
-
- INSERT INTO t3_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
- REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
- REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
- NOW(),(100.55+n));
-
- savepoint b;
-
- set @s = concat("INSERT INTO t4",id," VALUES(",n,",",n,",REPEAT(concat(' tc3_',",n,"),30), REPEAT(concat(' tc4_',",n,"),70),REPEAT(concat(' tc_',",n,"),70), REPEAT(concat(' tc6_',",n,"),70),REPEAT(concat(' tc7_',",n,"),70), NOW(),(100.55+",n,"));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
-
- INSERT INTO t4_temp VALUES(n,n,REPEAT(concat(' tc3_',n),30),
- REPEAT(concat(' tc4_',n),70),REPEAT(concat(' tc_',n),70),
- REPEAT(concat(' tc6_',n),70),REPEAT(concat(' tc7_',n),70),
- NOW(),(100.55+n));
-
-
- if (n > 10) then
- if (n > 10 and n <=12) then
- ROLLBACK TO SAVEPOINT a;
- COMMIT;
- end if;
- if (n > 12 and n < 15) then
- ROLLBACK TO SAVEPOINT b;
- COMMIT;
- end if;
- if (n > 15) then
- COMMIT;
- end if;
-
- else
- if (n > 5) then
- START TRANSACTION;
- DELETE FROM t1_temp WHERE c1 > 10 ;
- DELETE FROM t2_temp WHERE c1 > 10 ;
- DELETE FROM t3_temp WHERE c1 > 10 ;
- DELETE FROM t4_temp WHERE c1 > 10 ;
-
- rollback;
- START TRANSACTION;
- update t1_temp set c1 = c1 + 1000 WHERE c1 > 10;
- update t2_temp set c1 = c1 + 1000 WHERE c1 > 10;
- update t3_temp set c1 = c1 + 1000 WHERE c1 > 10;
- update t4_temp set c1 = c1 + 1000 WHERE c1 > 10;
- rollback;
- end if;
- end if;
-
- if (n < 5) then
- rollback;
- end if;
-
- FLUSH logs;
- ALTER TABLE t1_temp DROP PRIMARY KEY;
- ALTER TABLE t1_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
- ALTER TABLE t2_temp DROP PRIMARY KEY;
- ALTER TABLE t2_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
- ALTER TABLE t3_temp DROP PRIMARY KEY;
- ALTER TABLE t3_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
- ALTER TABLE t4_temp DROP PRIMARY KEY;
- ALTER TABLE t4_temp ADD PRIMARY KEY (c1,c3(10),c4(10));
- FLUSH tables;
-
- START TRANSACTION;
- set @s = concat("INSERT INTO t1",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t1_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t2",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t2_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t3",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t3_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t4",id," VALUES(",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t4_temp VALUES(n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
-
-
- DELETE FROM t1_temp WHERE c1 between 100 and 110;
- DELETE FROM t2_temp WHERE c1 between 100 and 110;
- DELETE FROM t3_temp WHERE c1 between 100 and 110;
- DELETE FROM t4_temp WHERE c1 between 100 and 110;
-
- update t1_temp set c1 = c1+1 WHERE c1>110;
- update t2_temp set c1 = c1+1 WHERE c1>110;
- update t3_temp set c1 = c1+1 WHERE c1>110;
- update t4_temp set c1 = c1+1 WHERE c1>110;
-
- savepoint a;
-
- set @s = concat("INSERT INTO t1",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t1_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t2",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t2_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t3",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t3_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t4",id," VALUES(300+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t4_temp VALUES(300+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- savepoint b;
-
- set @s = concat("INSERT INTO t1",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t1_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t2",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t2_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t3",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t3_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- set @s = concat("INSERT INTO t4",id," VALUES(400+",n,"+100,",n,"+100,REPEAT(concat(' tc3_',",n,"+100),30), REPEAT(concat(' tc4_',",n,"+100),70),REPEAT(concat(' tc_',",n,"+100),70), REPEAT(concat(' tc6_',",n,"+100),60),REPEAT(concat(' tc7_',",n,"+100),60), NOW(),(100.55+",n,"+100));");
- PREPARE insertIntoTable FROM @s;
- EXECUTE insertIntoTable;
- DEALLOCATE PREPARE insertIntoTable;
- INSERT INTO t4_temp VALUES(400+n+100,n+100,REPEAT(concat(' tc3_',n+100),30),
- REPEAT(concat(' tc4_',n+100),70),REPEAT(concat(' tc_',n+100),70),
- REPEAT(concat(' tc6_',n+100),60),REPEAT(concat(' tc7_',n+100),60),
- NOW(),(100.55+n+100));
- savepoint c;
- rollback to b;
- rollback to a;
- COMMIT;
- COMMIT;
- rollback;
- set n = n - 1;
- end while;
-end|
-delimiter ;|
-
-# Create two client for concurrent execution
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-
---echo #---client 1 : dml operation ---"
-connection con1;
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
-
--- enable_query_log
--- disable_query_log
-# call procedure
---send call populate_tables('_1');
--- enable_query_log
-
---echo #---client 2 : dml operation ---"
-connection con2;
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
--- enable_query_log
--- disable_query_log
-# call procedure
---send call populate_tables('_2');
-
--- enable_query_log
-
-# check data of client connection 1
---echo # In connection 1
-connection con1;
---reap
-# 20 rows exepceted in 5 tables
-SELECT count(*) FROM t1_1;
-SELECT count(*) FROM t2_1;
-SELECT count(*) FROM t3_1;
-SELECT count(*) FROM t4_1;
-SELECT c1 FROM t1_1;
-SELECT c1 FROM t2_1;
-SELECT c1 FROM t3_1;
-SELECT c1 FROM t4_1;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-# check data of client connection 2
---echo # In connection 2
-connection con2;
---reap
-# 20 rows exepceted in 5 tables
-SELECT count(*) FROM t1_2;
-SELECT count(*) FROM t2_2;
-SELECT count(*) FROM t3_2;
-SELECT count(*) FROM t4_2;
-SELECT c1 FROM t1_2;
-SELECT c1 FROM t2_2;
-SELECT c1 FROM t3_2;
-SELECT c1 FROM t4_2;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-
---echo # In connection 1
-connection con1;
-
-set AUTOCOMMIT = 0;
-ALTER TABLE t1_temp DROP PRIMARY KEY;
-ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t2_temp DROP PRIMARY KEY;
-ALTER TABLE t2_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t3_temp DROP PRIMARY KEY;
-ALTER TABLE t3_temp ADD PRIMARY KEY (c1);
-ALTER TABLE t4_temp DROP PRIMARY KEY;
-ALTER TABLE t4_temp ADD PRIMARY KEY (c1);
-# Check duplicate key constraint + insert ignore
---error ER_DUP_ENTRY
-INSERT INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-insert ignore into t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-insert ignore into t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-insert ignore into t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-insert ignore into t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-
-# check rollback due to duplicate value in second record of insert
---error ER_DUP_ENTRY
-INSERT INTO t1_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t2_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t3_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
---error ER_DUP_ENTRY
-INSERT INTO t4_temp VALUES (1,1,'a','a','a','a','a',NOW(),100.55),
-(20,1,'a','a','a','a','a',NOW(),100.55);
-
-set AUTOCOMMIT = 1;
-
-SELECT c1,c2 FROM t1_temp WHERE c1 in (20,1);
-SELECT c1,c2 FROM t2_temp WHERE c1 in (20,1);
-SELECT c1,c2 FROM t3_temp WHERE c1 in (20,1);
-SELECT c1,c2 FROM t4_temp WHERE c1 in (20,1);
-
-#replace statement
-REPLACE INTO t1_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t2_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t3_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-REPLACE INTO t4_temp VALUES (20,1,'a','a','a','a','a',NOW(),100.55);
-# verify row is replaced FROM (20,20) to (20,1)
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t1_temp WHERE c1 = 20;
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t2_temp WHERE c1 = 20;
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t3_temp WHERE c1 = 20;
-SELECT c1,c2,c3,c4,c5,c6,c7,c9 FROM t4_temp WHERE c1 = 20;
-
-# Update ignore. statement is gonored as 20 value exits
-update ignore t1_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t2_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t3_temp set c1 = 20 WHERE c1 = 140 ;
-update ignore t4_temp set c1 = 20 WHERE c1 = 140 ;
-# see record 140 is present as last update ignored
-SELECT count(*) FROM t1_temp WHERE c1 = 140;
-SELECT count(*) FROM t2_temp WHERE c1 = 140;
-SELECT count(*) FROM t3_temp WHERE c1 = 140;
-SELECT count(*) FROM t4_temp WHERE c1 = 140;
-
-# Alter table to ADD COLUMN and PRIMARY KEY
-ALTER TABLE t1_temp ADD COLUMN c10 int default 99 ,
-ADD COLUMN c11 varchar(100) default 'test';
-ALTER TABLE t1_temp DROP PRIMARY KEY;
-ALTER TABLE t1_temp ADD PRIMARY KEY (c1);
-INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55);
-SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
-SELECT count(*) FROM t1_temp WHERE c10 = 99 and c11 like 'test';
-# insert on duplicate key update
-INSERT INTO t1_temp (c1,c2,c3,c4,c5,c6,c7,c8,c9) VALUES (-1,-1,'a','a','a','a','a',NOW(),100.55)
-ON DUPLICATE KEY UPDATE c1=-2,c2=-2;
-SELECT c1,c2,c3,c4,c5,c6,c7,c9,c10,c11 FROM t1_temp WHERE c1 < 0;
-
-#
-
-#cleanup
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
-
-connection con2;
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-
-
-connection default;
-#
-## trying with VALUES innodb_undo_tablespaces, innodb_undo_logs ,innodb_log_files_in_group
-##
-let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=20 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
---source include/restart_mysqld.inc
-
-# Create two client for concurrent execution
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-#
-#
-connection con1;
---send call populate_tables('_1');
-connection con2;
---send call populate_tables('_2');
---echo "#connection 1 - verify tables"
-connection con1;
---reap
-SELECT count(*) FROM t1_1;
-SELECT count(*) FROM t2_1;
-SELECT count(*) FROM t3_1;
-SELECT count(*) FROM t4_1;
-SELECT c1 FROM t1_1;
-SELECT c1 FROM t2_1;
-SELECT c1 FROM t3_1;
-SELECT c1 FROM t4_1;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
---echo "#connection 2 - verify tables"
-connection con2;
---reap
-SELECT count(*) FROM t1_2;
-SELECT count(*) FROM t2_2;
-SELECT count(*) FROM t3_2;
-SELECT count(*) FROM t4_2;
-SELECT c1 FROM t1_2;
-SELECT c1 FROM t2_2;
-SELECT c1 FROM t3_2;
-SELECT c1 FROM t4_2;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-
-connection default;
-# innodb_undo_logs > non redo rsegment
-let $restart_parameters=--innodb_undo_tablespaces=0 --innodb_rollback_segments=30 --innodb_undo_logs=20 --innodb_log_files_in_group=4;
---source include/restart_mysqld.inc
-
-connect (con1,localhost,root,,);
-connect (con2,localhost,root,,);
-
-connection con1;
---send call populate_tables('_1');
-connection con2;
---send call populate_tables('_2');
---echo "#connection 1 - verify tables"
-connection con1;
---reap
-SELECT count(*) FROM t1_1;
-SELECT count(*) FROM t2_1;
-SELECT count(*) FROM t3_1;
-SELECT count(*) FROM t4_1;
-SELECT c1 FROM t1_1;
-SELECT c1 FROM t2_1;
-SELECT c1 FROM t3_1;
-SELECT c1 FROM t4_1;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-DROP TABLE t1_1 ,t2_1 ,t3_1,t4_1;
-disconnect con1;
---echo "#connection 2 - verify tables"
-connection con2;
---reap
-SELECT count(*) FROM t1_2;
-SELECT count(*) FROM t2_2;
-SELECT count(*) FROM t3_2;
-SELECT count(*) FROM t4_2;
-SELECT c1 FROM t1_2;
-SELECT c1 FROM t2_2;
-SELECT c1 FROM t3_2;
-SELECT c1 FROM t4_2;
-SELECT count(*) FROM t1_temp;
-SELECT count(*) FROM t2_temp;
-SELECT count(*) FROM t3_temp;
-SELECT count(*) FROM t4_temp;
-SELECT c1 FROM t1_temp;
-SELECT c1 FROM t2_temp;
-SELECT c1 FROM t3_temp;
-SELECT c1 FROM t4_temp;
-DROP TABLE t1_2 ,t2_2 ,t3_2,t4_2;
-disconnect con2;
-
-#
-
-connection default;
-DROP PROCEDURE populate_tables;
-
-# check message in log
-let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
-let SEARCH_FILE= $error_log;
-# We get depending on the platform either "./ibdata1" or ".\ibdata1".
-let SEARCH_PATTERN=redo rollback segment.*found.*redo rollback segment.*active
---source include/search_pattern_in_file.inc
-let SEARCH_PATTERN=non-redo rollback.*active
---source include/search_pattern_in_file.inc
-
-
-SHOW TABLES;
-
--- disable_query_log
-eval set global innodb_file_per_table=$innodb_file_per_table_orig;
--- enable_query_log
-
diff --git a/mysql-test/suite/json/r/json_no_table.result b/mysql-test/suite/json/r/json_no_table.result
new file mode 100644
index 00000000000..97148bdad43
--- /dev/null
+++ b/mysql-test/suite/json/r/json_no_table.result
@@ -0,0 +1,3622 @@
+SELECT CAST(0.0e0 AS JSON) = -0.0e0;
+CAST(0.0e0 AS JSON) = -0.0e0
+1
+SELECT CAST(CAST(0 AS DECIMAL) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+CAST(CAST(0 AS DECIMAL) AS JSON) = CAST(-0.0e0 AS DECIMAL)
+1
+SELECT CAST(0.0e0 AS JSON) = CAST(-0.0e0 AS DECIMAL);
+CAST(0.0e0 AS JSON) = CAST(-0.0e0 AS DECIMAL)
+1
+SELECT CAST(CAST(0 AS DECIMAL) AS JSON) = -0.0e0;
+CAST(CAST(0 AS DECIMAL) AS JSON) = -0.0e0
+1
+SELECT CAST(CAST(0 AS SIGNED) AS JSON) = -0.0e0;
+CAST(CAST(0 AS SIGNED) AS JSON) = -0.0e0
+1
+SELECT CAST(CAST(0 AS SIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+CAST(CAST(0 AS SIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL)
+1
+SELECT CAST(CAST(0 AS UNSIGNED) AS JSON) = -0.0e0;
+CAST(CAST(0 AS UNSIGNED) AS JSON) = -0.0e0
+1
+SELECT CAST(CAST(0 AS UNSIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+CAST(CAST(0 AS UNSIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL)
+1
+select cast('"abc"' as json);
+cast('"abc"' as json)
+"abc"
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select cast('abc' as json);
+cast('abc' as json)
+abc
+
+# String literal - valid JSON
+select JSON_VALID('123');
+JSON_VALID('123')
+1
+select JSON_VALID('-123');
+JSON_VALID('-123')
+1
+select JSON_VALID('5000000000');
+JSON_VALID('5000000000')
+1
+select JSON_VALID('-5000000000');
+JSON_VALID('-5000000000')
+1
+select JSON_VALID('1.23');
+JSON_VALID('1.23')
+1
+select JSON_VALID('"123"');
+JSON_VALID('"123"')
+1
+select JSON_VALID('true');
+JSON_VALID('true')
+1
+select JSON_VALID('false');
+JSON_VALID('false')
+1
+select JSON_VALID('null');
+JSON_VALID('null')
+1
+select JSON_VALID('{"address": "Trondheim"}');
+JSON_VALID('{"address": "Trondheim"}')
+1
+
+# String literal - not valid JSON
+select JSON_VALID('12 3');
+JSON_VALID('12 3')
+0
+
+# String literal not in UTF-8
+set names 'ascii';
+select JSON_VALID('123');
+JSON_VALID('123')
+1
+set names 'utf8';
+
+# Json expression
+select JSON_VALID(cast('[123]' as JSON ));
+JSON_VALID(cast('[123]' as JSON ))
+1
+
+# Json expression NULL
+select JSON_VALID(cast(NULL as JSON ));
+JSON_VALID(cast(NULL as JSON ))
+NULL
+
+# Bare NULL
+select JSON_VALID( NULL );
+JSON_VALID( NULL )
+NULL
+
+# Function result - string
+select JSON_VALID( UPPER('"abc"') );
+JSON_VALID( UPPER('"abc"') )
+1
+set names 'latin1';
+
+# Function result - string
+select JSON_VALID( UPPER('"abc"') );
+JSON_VALID( UPPER('"abc"') )
+1
+set names 'utf8';
+
+# Function result - date, not valid as JSON without CAST
+select JSON_VALID( CAST('2015-01-15' AS DATE) );
+JSON_VALID( CAST('2015-01-15' AS DATE) )
+0
+
+# The date string doesn't parse as JSON text, so wrong:
+select JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') );
+JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') )
+0
+# OK, though:
+select JSON_VALID( CAST(CURDATE() as JSON) );
+JSON_VALID( CAST(CURDATE() as JSON) )
+0
+
+# Function result - NULL
+select JSON_VALID( UPPER(NULL) );
+JSON_VALID( UPPER(NULL) )
+NULL
+select JSON_VALID( UPPER(CAST(NULL as CHAR)) );
+JSON_VALID( UPPER(CAST(NULL as CHAR)) )
+NULL
+SELECT JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' );
+JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' )
+1
+SELECT JSON_VALID( '3' );
+JSON_VALID( '3' )
+1
+SELECT JSON_VALID( null );
+JSON_VALID( null )
+NULL
+# ----------------------------------------------------------------------
+# Test of JSON_CONTAINS_PATH function.
+# ----------------------------------------------------------------------
+select json_contains_path();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path'
+select json_contains_path('{ "a": true }' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path'
+select json_contains_path('{ "a": true }', 'all' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_contains_path'
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_contains_path('{ "a": tru }', 'all', '$' );
+json_contains_path('{ "a": tru }', 'all', '$' )
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_contains_path' at position 10
+error ER_INVALID_JSON_PATH
+select json_contains_path('{ "a": true }', 'all', '$[' );
+json_contains_path('{ "a": true }', 'all', '$[' )
+NULL
+Warnings:
+Warning 4041 Unexpected end of JSON path in argument 3 to function 'json_contains_path'
+error ER_INVALID_JSON_PATH
+select json_contains_path('{ "a": true }', 'all', '$a.***[3]' );
+json_contains_path('{ "a": true }', 'all', '$a.***[3]' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 3 to function 'json_contains_path' at position 2
+error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_contains_path('{ "a": true }', 'foo', '$.a' );
+json_contains_path('{ "a": true }', 'foo', '$.a' )
+NULL
+Warnings:
+Warning 4046 Argument 2 to function 'json_contains_path' must be "one" or "all".
+error ER_INVALID_JSON_CHARSET
+select json_contains_path('{}', 'all', cast('$' as binary));
+json_contains_path('{}', 'all', cast('$' as binary))
+1
+select json_contains_path(null, 'all', '$.a' );
+json_contains_path(null, 'all', '$.a' )
+NULL
+select json_contains_path('{ "a": true }', null, '$.a' );
+json_contains_path('{ "a": true }', null, '$.a' )
+NULL
+select json_contains_path('{ "a": true }', 'all', null );
+json_contains_path('{ "a": true }', 'all', null )
+NULL
+select json_contains_path('{ "a": true }', 'all', '$' );
+json_contains_path('{ "a": true }', 'all', '$' )
+1
+select json_contains_path('{ "a": true }', 'all', '$.a' );
+json_contains_path('{ "a": true }', 'all', '$.a' )
+1
+select json_contains_path('{ "a": true }', 'one', '$.a' );
+json_contains_path('{ "a": true }', 'one', '$.a' )
+1
+select json_contains_path('{ "a": true }', 'all', '$.b' );
+json_contains_path('{ "a": true }', 'all', '$.b' )
+0
+select json_contains_path('{ "a": true }', 'one', '$.b' );
+json_contains_path('{ "a": true }', 'one', '$.b' )
+0
+select json_contains_path('{ "a": true }', 'all', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'all', '$.a', '$.b' )
+0
+select json_contains_path('{ "a": true }', 'all', '$.b', '$.a' );
+json_contains_path('{ "a": true }', 'all', '$.b', '$.a' )
+0
+select json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' )
+0
+select json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' )
+0
+select json_contains_path('{ "a": true }', 'one', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'one', '$.a', '$.b' )
+1
+select json_contains_path('{ "a": true }', 'one', '$.b', '$.a' );
+json_contains_path('{ "a": true }', 'one', '$.b', '$.a' )
+1
+select json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' )
+1
+select json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' );
+json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' )
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' );
+json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' )
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' );
+json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' )
+0
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' );
+json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' )
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' );
+json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' )
+0
+select json_contains_path('{"a":1, "b":2}', 'one', '$.*');
+json_contains_path('{"a":1, "b":2}', 'one', '$.*')
+1
+select json_contains_path('[1,2,3]', 'one', '$.*');
+json_contains_path('[1,2,3]', 'one', '$.*')
+0
+select json_contains_path('{}', 'one', '$[*]');
+json_contains_path('{}', 'one', '$[*]')
+0
+SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'one', '$**.a.*');
+JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'one', '$**.a.*')
+1
+SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'all', '$**.a.*');
+JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'all', '$**.a.*')
+1
+SELECT JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]');
+JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]')
+1
+SELECT JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]');
+JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]')
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' )
+0
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' )
+0
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' )
+0
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' )
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' )
+1
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' );
+json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' )
+1
+SELECT JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'all',
+'$.a.c',
+'$.b[1]'
+);
+JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'all',
+'$.a.c',
+'$.b[1]'
+)
+0
+SELECT JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'one',
+'$.a.c',
+'$.b[1]'
+);
+JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'one',
+'$.a.c',
+'$.b[1]'
+)
+1
+SELECT JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'all',
+'$.c'
+);
+JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'all',
+'$.c'
+)
+0
+SELECT JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }',
+'all',
+'$.b[1].c.d'
+);
+JSON_CONTAINS_PATH
+(
+'{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }',
+'all',
+'$.b[1].c.d'
+)
+1
+select json_length( null );
+json_length( null )
+NULL
+select json_length( '1' );
+json_length( '1' )
+1
+
+# invalid json text
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_length( 'abc' );
+json_length( 'abc' )
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_length' at position 1
+select json_length( '"abc"' );
+json_length( '"abc"' )
+1
+select json_length( 'true' );
+json_length( 'true' )
+1
+select json_length( 'false' );
+json_length( 'false' )
+1
+select json_length( 'null' );
+json_length( 'null' )
+1
+select json_length( '{}' );
+json_length( '{}' )
+0
+select json_length( '{ "a" : 100, "b" : 200 }' );
+json_length( '{ "a" : 100, "b" : 200 }' )
+2
+select json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' );
+json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' )
+2
+select json_length( '[]' );
+json_length( '[]' )
+0
+select json_length( '[ null, "foo", true, 1.1 ]' );
+json_length( '[ null, "foo", true, 1.1 ]' )
+4
+select json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' );
+json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' )
+4
+select json_length( '"foo"' );
+json_length( '"foo"' )
+1
+select json_length( '1.2' );
+json_length( '1.2' )
+1
+
+# invalid json path
+error ER_INVALID_JSON_PATH
+select json_length( 'true', 'c$' );
+json_length( 'true', 'c$' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 2 to function 'json_length' at position 1
+
+# invalid json path
+error ER_INVALID_JSON_PATH
+select json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' );
+json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 2 to function 'json_length' at position 7
+
+# wildcards not allowed in path expressions for this function
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_length( 'true', '$.*' );
+json_length( 'true', '$.*' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_length'
+
+# wildcards not allowed in path expressions for this function
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_length( 'true', '$.foo**.bar' );
+json_length( 'true', '$.foo**.bar' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_length'
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' );
+json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' )
+1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' );
+json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' )
+3
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' );
+json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' )
+1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' );
+json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' )
+1
+select json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' );
+json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' )
+1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' );
+json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' )
+NULL
+select json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' );
+json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' )
+3
+SELECT JSON_LENGTH
+(
+'{}'
+);
+JSON_LENGTH
+(
+'{}'
+)
+0
+SELECT JSON_LENGTH
+(
+'3'
+);
+JSON_LENGTH
+(
+'3'
+)
+1
+SELECT JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }'
+);
+JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }'
+)
+2
+SELECT JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+'$.b'
+);
+JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+'$.b'
+)
+3
+SELECT JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+'$.c'
+);
+JSON_LENGTH
+(
+'{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+'$.c'
+)
+NULL
+# ----------------------------------------------------------------------
+# Test of JSON_DEPTH function.
+# ----------------------------------------------------------------------
+select json_depth(null);
+json_depth(null)
+NULL
+select json_depth(cast(null as json));
+json_depth(cast(null as json))
+NULL
+select json_depth(cast('[]' as json)),
+json_depth(cast('{}' as json)),
+json_depth(cast('null' as json)),
+json_depth(json_quote('foo'));
+json_depth(cast('[]' as json)) json_depth(cast('{}' as json)) json_depth(cast('null' as json)) json_depth(json_quote('foo'))
+1 1 1 1
+select json_depth(cast('[[2], 3, [[[4]]]]' as json));
+json_depth(cast('[[2], 3, [[[4]]]]' as json))
+5
+select json_depth(cast('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}' as json));
+json_depth(cast('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}' as json))
+6
+SELECT JSON_DEPTH
+(
+'{}'
+);
+JSON_DEPTH
+(
+'{}'
+)
+1
+SELECT JSON_DEPTH
+(
+'[]'
+);
+JSON_DEPTH
+(
+'[]'
+)
+1
+SELECT JSON_DEPTH( '"abc"' );
+JSON_DEPTH( '"abc"' )
+1
+SELECT JSON_DEPTH( CAST( '"abc"' AS JSON ) );
+JSON_DEPTH( CAST( '"abc"' AS JSON ) )
+1
+error ER_INVALID_TYPE_FOR_JSON
+SELECT JSON_DEPTH( 1 );
+JSON_DEPTH( 1 )
+1
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_DEPTH( 'abc' );
+JSON_DEPTH( 'abc' )
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_depth' at position 1
+SELECT JSON_DEPTH( CAST( 1 AS JSON ) );
+JSON_DEPTH( CAST( 1 AS JSON ) )
+1
+SELECT JSON_DEPTH
+(
+'{ "a" : true, "b" : false, "c" : null }'
+);
+JSON_DEPTH
+(
+'{ "a" : true, "b" : false, "c" : null }'
+)
+2
+SELECT JSON_DEPTH
+(
+'[ "a", true, "b" , false, "c" , null ]'
+);
+JSON_DEPTH
+(
+'[ "a", true, "b" , false, "c" , null ]'
+)
+2
+SELECT JSON_DEPTH
+(
+'{ "a" : true, "b" : {}, "c" : null }'
+);
+JSON_DEPTH
+(
+'{ "a" : true, "b" : {}, "c" : null }'
+)
+2
+SELECT JSON_DEPTH
+(
+'[ "a", true, "b" , {}, "c" , null ]'
+);
+JSON_DEPTH
+(
+'[ "a", true, "b" , {}, "c" , null ]'
+)
+2
+SELECT JSON_DEPTH
+(
+'{ "a" : true, "b" : { "e" : false }, "c" : null }'
+);
+JSON_DEPTH
+(
+'{ "a" : true, "b" : { "e" : false }, "c" : null }'
+)
+3
+SELECT JSON_DEPTH
+(
+'[ "a", true, "b" , { "e" : false }, "c" , null ]'
+);
+JSON_DEPTH
+(
+'[ "a", true, "b" , { "e" : false }, "c" , null ]'
+)
+3
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_DEPTH
+(
+'[ "a", true, "b" , { "e" : false }, "c" , null'
+);
+JSON_DEPTH
+(
+'[ "a", true, "b" , { "e" : false }, "c" , null'
+)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_depth'
+# ----------------------------------------------------------------------
+# Test of JSON_REMOVE function.
+# ----------------------------------------------------------------------
+select json_remove( null, '$[1]' );
+json_remove( null, '$[1]' )
+NULL
+select json_remove( null, '$[1]' ) is null;
+json_remove( null, '$[1]' ) is null
+1
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null )
+NULL
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null;
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null
+1
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null )
+NULL
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null;
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null
+1
+
+# not enough args
+select json_remove();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_remove'
+
+# not enough args
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_remove'
+
+# not enough args
+select json_remove( '$[1]' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_remove'
+
+# invalid json text
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' )
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_remove'
+
+# invalid json path
+error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' )
+NULL
+Warnings:
+Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_remove'
+
+# invalid json path
+error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' )
+NULL
+Warnings:
+Warning 4041 Unexpected end of JSON path in argument 3 to function 'json_remove'
+
+# Vacuous path expression
+error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$' );
+json_remove( '[ 1, 2, 3 ]', '$' )
+NULL
+Warnings:
+Warning 4051 Path expression '$' is not allowed in argument 2 to function 'json_remove'.
+
+# Vacuous path expression
+error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$', '$[2]' );
+json_remove( '[ 1, 2, 3 ]', '$', '$[2]' )
+NULL
+Warnings:
+Warning 4051 Path expression '$' is not allowed in argument 2 to function 'json_remove'.
+
+# Vacuous path expression
+error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$[1]', '$' );
+json_remove( '[ 1, 2, 3 ]', '$[1]', '$' )
+NULL
+Warnings:
+Warning 4051 Path expression '$' is not allowed in argument 3 to function 'json_remove'.
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[*]' );
+json_remove( '[ 1, 2, 3 ]', '$[*]' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$**[2]' );
+json_remove( '[ 1, 2, 3 ]', '$**[2]' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' );
+json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 3 to function 'json_remove'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' );
+json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 3 to function 'json_remove'
+select json_remove( '[ 1, 2, 3 ]', '$[0]' );
+json_remove( '[ 1, 2, 3 ]', '$[0]' )
+[ 2, 3 ]
+select json_remove( '[ 1, 2, 3 ]', '$[1]' );
+json_remove( '[ 1, 2, 3 ]', '$[1]' )
+[ 1, 3 ]
+select json_remove( '[ 1, 2, 3 ]', '$[2]' );
+json_remove( '[ 1, 2, 3 ]', '$[2]' )
+[ 1, 2]
+select json_remove( '[ 1, 2, 3 ]', '$[3]' );
+json_remove( '[ 1, 2, 3 ]', '$[3]' )
+[ 1, 2, 3 ]
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' );
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' )
+[ 1, 5 ]
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ { "a": { "a": true } } ]', '$**.a' );
+json_remove( '[ { "a": { "a": true } } ]', '$**.a' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove'
+select json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' );
+json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' )
+[ { }, { "b": false }, { }, { "a": null } ]
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' );
+json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' )
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_remove'
+select json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' );
+json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' )
+{"id": 123, "name": "systemQA", "array": [1, 2, 3]}
+SELECT JSON_REMOVE
+(
+'{"a" : "foo", "b" : [true, {"c" : 123}]}',
+'$.b[ 1 ]'
+);
+JSON_REMOVE
+(
+'{"a" : "foo", "b" : [true, {"c" : 123}]}',
+'$.b[ 1 ]'
+)
+{"a" : "foo", "b" : [true, {"c" : 123}]}
+SELECT JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c'
+);
+JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c'
+)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_remove'
+SELECT JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c'
+);
+JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c'
+)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_remove'
+SELECT JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }',
+'$.b[ 1 ].e'
+);
+JSON_REMOVE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }',
+'$.b[ 1 ].e'
+)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_remove'
+# ----------------------------------------------------------------------
+# Test of JSON_MERGE function.
+# ----------------------------------------------------------------------
+
+# not enough args
+select json_merge();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_merge'
+
+# not enough args
+select json_merge( '[ 1, 2, 3 ]' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_merge'
+select json_merge( null, null );
+json_merge( null, null )
+NULL
+select json_merge( null, '[ 1, 2, 3 ]' );
+json_merge( null, '[ 1, 2, 3 ]' )
+NULL
+select json_merge( '[ 1, 2, 3 ]', null );
+json_merge( '[ 1, 2, 3 ]', null )
+NULL
+select json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' );
+json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' )
+NULL
+select json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' );
+json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' )
+NULL
+select json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null );
+json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null )
+NULL
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_merge( '[1, 2]', '[3, 4' );
+json_merge( '[1, 2]', '[3, 4' )
+[1, 2, 3, 4
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_merge( '[1, 2', '[3, 4]' );
+json_merge( '[1, 2', '[3, 4]' )
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_merge'
+select json_merge( '1', '2' );
+json_merge( '1', '2' )
+[1, 2]
+select json_merge( '1', '[2, 3]' );
+json_merge( '1', '[2, 3]' )
+[1, 2, 3]
+select json_merge( '[1, 2]', '3' );
+json_merge( '[1, 2]', '3' )
+[1, 2, 3]
+select json_merge( '1', '{ "a": 2 }' );
+json_merge( '1', '{ "a": 2 }' )
+[1, { "a": 2 }]
+select json_merge( '{ "a": 2 }', '1' );
+json_merge( '{ "a": 2 }', '1' )
+[{ "a": 2 }, 1]
+select json_merge( '[1, 2]', '[3, 4]' );
+json_merge( '[1, 2]', '[3, 4]' )
+[1, 2, 3, 4]
+select json_merge( '{ "a": 2 }', '{ "b": 3}' );
+json_merge( '{ "a": 2 }', '{ "b": 3}' )
+{ "a": 2 , "b": 3}
+select json_merge( '[1, 2]', '{ "a": 2 }' );
+json_merge( '[1, 2]', '{ "a": 2 }' )
+[1, 2, { "a": 2 }]
+select json_merge( '{ "a": 2 }', '[1, 2]' );
+json_merge( '{ "a": 2 }', '[1, 2]' )
+[{ "a": 2 }, 1, 2]
+select json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' );
+json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' )
+{"a": 1, "b": 2 , "b": 3, "d": 4 }
+select json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' );
+json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' )
+{"a": 1, "b": 2 , "b": [3, 4], "d": 4 }
+select json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' );
+json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' )
+{"a": 1, "b": [2, 3] , "b": 4, "d": 4 }
+select json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' );
+json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' )
+{"a": 1, "b": 2 , "b": {"e": 7, "f": 8}, "d": 4 }
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' );
+json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' )
+{"b": {"e": 7, "f": 8}, "d": 4 , "a": 1, "b": 2 }
+select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' );
+json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' )
+{"a": 1, "b": [2, 9] , "b": [10, 11], "d": 4 }
+select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' );
+json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' )
+{"a": 1, "b": [2, 9] , "b": {"e": 7, "f": 8}, "d": 4 }
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' );
+json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' )
+{"b": {"e": 7, "f": 8}, "d": 4 , "a": 1, "b": [2, 9] }
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' );
+json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' )
+{"b": {"e": 7, "f": 8}, "d": 4 , "a": 1, "b": {"e": 20, "g": 21 } }
+select json_merge( '1', '2', '3' );
+json_merge( '1', '2', '3' )
+[1, 2, 3]
+select json_merge( '[1, 2 ]', '3', '[4, 5]' );
+json_merge( '[1, 2 ]', '3', '[4, 5]' )
+[1, 2 , 3, 4, 5]
+select json_merge
+(
+'{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }',
+'{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }',
+'{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }'
+);
+json_merge
+(
+'{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }',
+'{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }',
+'{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }'
+)
+{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] , "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] , "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }
+SELECT JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'[ 5, 6]'
+);
+JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'[ 5, 6]'
+)
+[{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }, 5, 6]
+SELECT JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'{ "b": [ false, 34 ] }'
+);
+JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'{ "b": [ false, 34 ] }'
+)
+{ "a" : "foo", "b" : [ true, { "c" : 123 } ] , "b": [ false, 34 ] }
+SELECT JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'{ "b": "bar" }'
+);
+JSON_MERGE
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'{ "b": "bar" }'
+)
+{ "a" : "foo", "b" : [ true, { "c" : 123 } ] , "b": "bar" }
+SELECT JSON_MERGE
+(
+'{ "a" : { "b" : 1 } }',
+'{ "a" : { "c" : 1 } }'
+);
+JSON_MERGE
+(
+'{ "a" : { "b" : 1 } }',
+'{ "a" : { "c" : 1 } }'
+)
+{ "a" : { "b" : 1 } , "a" : { "c" : 1 } }
+# ----------------------------------------------------------------------
+# Test of JSON_TYPE function.
+# ----------------------------------------------------------------------
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_type('abc');
+json_type('abc')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 1
+select json_type('{"a": 2}');
+json_type('{"a": 2}')
+OBJECT
+select json_type('[1,2]');
+json_type('[1,2]')
+ARRAY
+select json_type('"scalar string"');
+json_type('"scalar string"')
+STRING
+select json_type('true');
+json_type('true')
+BOOLEAN
+select json_type('false');
+json_type('false')
+BOOLEAN
+select json_type('null');
+json_type('null')
+NULL
+select json_type('1');
+json_type('1')
+INTEGER
+select json_type('-0');
+json_type('-0')
+INTEGER
+select json_type('-0.0');
+json_type('-0.0')
+DOUBLE
+error ER_INVALID_TYPE_FOR_JSON
+select json_type(-1);
+json_type(-1)
+INTEGER
+error ER_INVALID_TYPE_FOR_JSON
+select json_type(CAST(1 AS UNSIGNED));
+json_type(CAST(1 AS UNSIGNED))
+INTEGER
+select json_type('32767');
+json_type('32767')
+INTEGER
+error ER_INVALID_TYPE_FOR_JSON
+select json_type(PI());
+json_type(PI())
+DOUBLE
+select json_type('3.14');
+json_type('3.14')
+DOUBLE
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8'));
+json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8'))
+INTEGER
+# ----------------------------------------------------------------------
+# Test of CAST(literal AS JSON)
+# ----------------------------------------------------------------------
+select json_type(cast(cast('2014-11-25 18:00' as datetime) as json));
+json_type(cast(cast('2014-11-25 18:00' as datetime) as json))
+INTEGER
+select json_type(cast(cast('2014-11-25' as date) as json));
+json_type(cast(cast('2014-11-25' as date) as json))
+INTEGER
+select json_type(cast(cast('18:00:59' as time) as json));
+json_type(cast(cast('18:00:59' as time) as json))
+INTEGER
+select json_type(cast(127 as json));
+json_type(cast(127 as json))
+INTEGER
+select json_type(cast(255 as json));
+json_type(cast(255 as json))
+INTEGER
+select json_type(cast(32767 as json));
+json_type(cast(32767 as json))
+INTEGER
+select json_type(cast(65535 as json));
+json_type(cast(65535 as json))
+INTEGER
+select json_type(cast(8388607 as json));
+json_type(cast(8388607 as json))
+INTEGER
+select json_type(cast(16777215 as json));
+json_type(cast(16777215 as json))
+INTEGER
+select json_type(cast(2147483647 as json));
+json_type(cast(2147483647 as json))
+INTEGER
+select json_type(cast(4294967295 as json));
+json_type(cast(4294967295 as json))
+INTEGER
+select json_type(cast(9223372036854775807 as json));
+json_type(cast(9223372036854775807 as json))
+INTEGER
+select json_type(cast(18446744073709551615 as json));
+json_type(cast(18446744073709551615 as json))
+INTEGER
+select json_type(cast(true as json));
+json_type(cast(true as json))
+INTEGER
+select json_type(cast(b'10101' as json));
+json_type(cast(b'10101' as json))
+NULL
+Warnings:
+Warning 4036 Character disallowd in JSON in argument 1 to function 'json_type' at position 1
+select json_type(cast(cast(3.14 as decimal(5,2)) as json));
+json_type(cast(cast(3.14 as decimal(5,2)) as json))
+DOUBLE
+select json_type(cast(3.14 as json));
+json_type(cast(3.14 as json))
+DOUBLE
+select json_type(cast(3.14E30 as json));
+json_type(cast(3.14E30 as json))
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_type' at position 7
+select json_type(cast(cast('10101abcde' as binary) as json));
+json_type(cast(cast('10101abcde' as binary) as json))
+INTEGER
+select json_type(cast(ST_GeomFromText('POINT(1 1)') as json));
+json_type(cast(ST_GeomFromText('POINT(1 1)') as json))
+NULL
+Warnings:
+Warning 4036 Character disallowd in JSON in argument 1 to function 'json_type' at position 1
+select json_type(cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json));
+json_type(cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json))
+NULL
+Warnings:
+Warning 4036 Character disallowd in JSON in argument 1 to function 'json_type' at position 1
+select json_type(cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json));
+json_type(cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json))
+NULL
+Warnings:
+Warning 4036 Character disallowd in JSON in argument 1 to function 'json_type' at position 1
+select json_type(cast(null as json));
+json_type(cast(null as json))
+NULL
+select json_type(cast(null as json)) is null;
+json_type(cast(null as json)) is null
+1
+select json_type(null) is null;
+json_type(null) is null
+1
+select cast(cast('2014-11-25 18:00' as datetime) as json);
+cast(cast('2014-11-25 18:00' as datetime) as json)
+2014-11-25 18:00:00
+select cast(cast('2014-11-25' as date) as json);
+cast(cast('2014-11-25' as date) as json)
+2014-11-25
+select cast(cast('18:00:59' as time) as json);
+cast(cast('18:00:59' as time) as json)
+18:00:59
+select cast(127 as json);
+cast(127 as json)
+127
+select cast(255 as json);
+cast(255 as json)
+255
+select cast(32767 as json);
+cast(32767 as json)
+32767
+select cast(65535 as json);
+cast(65535 as json)
+65535
+select cast(8388607 as json);
+cast(8388607 as json)
+8388607
+select cast(16777215 as json);
+cast(16777215 as json)
+16777215
+select cast(2147483647 as json);
+cast(2147483647 as json)
+2147483647
+select cast(4294967295 as json);
+cast(4294967295 as json)
+4294967295
+select cast(9223372036854775807 as json);
+cast(9223372036854775807 as json)
+9223372036854775807
+select cast(18446744073709551615 as json);
+cast(18446744073709551615 as json)
+18446744073709551615
+select cast(true as json);
+cast(true as json)
+1
+select cast(b'10101' as json);
+cast(b'10101' as json)
+
+select cast(cast(3.14 as decimal(5,2)) as json);
+cast(cast(3.14 as decimal(5,2)) as json)
+3.14
+select cast(3.14 as json);
+cast(3.14 as json)
+3.14
+select cast(3.14e0 as json);
+cast(3.14e0 as json)
+3.14
+select cast(cast('10101abcde' as binary) as json);
+cast(cast('10101abcde' as binary) as json)
+10101abcde
+select cast(ST_GeomFromText('POINT(1 1)') as json);
+cast(ST_GeomFromText('POINT(1 1)') as json)
+
+select cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json);
+cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json)
+
+select cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json);
+cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json)
+
+select cast(null as json);
+cast(null as json)
+NULL
+select cast(null as json) is null;
+cast(null as json) is null
+1
+# ----------------------------------------------------------------------
+# Test of JSON_KEYS function.
+# ----------------------------------------------------------------------
+select json_keys(NULL);
+json_keys(NULL)
+NULL
+select json_keys(NULL, '$.b');
+json_keys(NULL, '$.b')
+NULL
+select json_keys(NULL, NULL);
+json_keys(NULL, NULL)
+NULL
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a');
+json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a')
+NULL
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL);
+json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL)
+NULL
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}');
+json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}')
+["a", "b"]
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b');
+json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b')
+["e", "b"]
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b');
+json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b')
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_keys'
+# returns [ "a", "b" ]
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }');
+JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }')
+["a", "b"]
+# returns []
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.b[1].c');
+JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.b[1].c')
+[]
+# returns NULL
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.a.b[2]');
+JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.a.b[2]')
+NULL
+error ER_INVALID_JSON_PATH
+SELECT JSON_KEYS('{"a":1}', '1010');
+JSON_KEYS('{"a":1}', '1010')
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 2 to function 'json_keys' at position 1
+error ER_INVALID_JSON_PATH
+SELECT JSON_KEYS('{"a":1}', '1010') IS NULL;
+JSON_KEYS('{"a":1}', '1010') IS NULL
+0
+SELECT JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }'
+);
+JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }'
+)
+["a", "b"]
+SELECT JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.b[1].c'
+);
+JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.b[1].c'
+)
+[]
+SELECT JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.a.b[2]'
+);
+JSON_KEYS
+(
+'{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+'$.a.b[2]'
+)
+NULL
+SELECT JSON_KEYS();
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_KEYS'
+SELECT JSON_KEYS('{}', '$', '$');
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_KEYS'
+# ----------------------------------------------------------------------
+# CAST(<json> AS CHAR). See also 'json_conversions.test' for other
+# conversion tests.
+# ----------------------------------------------------------------------
+select cast(json_keys('{"a": 1}') as char);
+cast(json_keys('{"a": 1}') as char)
+["a"]
+select cast(cast(1 as json) as char);
+cast(cast(1 as json) as char)
+1
+select cast(json_keys(NULL) as char);
+cast(json_keys(NULL) as char)
+NULL
+# ----------------------------------------------------------------------
+# Path matching with double-quotes
+# ----------------------------------------------------------------------
+select json_extract( '{ "one potato" : 1 }', '$."one potato"' );
+json_extract( '{ "one potato" : 1 }', '$."one potato"' )
+NULL
+select json_extract( '{ "a.b" : 1 }', '$."a.b"' );
+json_extract( '{ "a.b" : 1 }', '$."a.b"' )
+NULL
+select json_extract( '{ "\\"a\\"": 1}', '$."a"' );
+json_extract( '{ "\\"a\\"": 1}', '$."a"' )
+NULL
+select json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' );
+json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 2 to function 'json_extract' at position 7
+select json_extract( '{ "a": 1}', '$."a"' );
+json_extract( '{ "a": 1}', '$."a"' )
+NULL
+select json_extract( '{ "a": 1}', '$.a' );
+json_extract( '{ "a": 1}', '$.a' )
+1
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' )
+[ 3, 2 ]
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' )
+2
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' )
+[ { "c" : "d" }, 1 ]
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' )
+{ "c" : "d" }
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' )
+"d"
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' )
+NULL
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' )
+6
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' );
+json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' )
+NULL
+# ----------------------------------------------------------------------
+# Test of JSON_EXTRACT function.
+# ----------------------------------------------------------------------
+select json_extract(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_extract'
+select json_extract('$.b');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_extract'
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_extract'
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}');
+json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}')
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 2 to function 'json_extract' at position 1
+select json_extract(NULL, '$.b');
+json_extract(NULL, '$.b')
+NULL
+select json_extract(NULL, NULL);
+json_extract(NULL, NULL)
+NULL
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a');
+json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a')
+1
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*');
+json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*')
+[1, {"e": "foo", "b": 3}]
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e');
+json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e')
+[1, "foo"]
+select json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]');
+json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]')
+3
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL);
+json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL)
+NULL
+# returns a JSON value containing just the string "123"
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+'$.b[ 1 ].c');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+'$.b[ 1 ].c')
+NULL
+# returns a JSON value containing just the number 123
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c')
+NULL
+# raises an error because the document is not valid
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('{ "a" : [ }',
+'$.b[ 1 ].c');
+JSON_EXTRACT('{ "a" : [ }',
+'$.b[ 1 ].c')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 11
+# raises an error because the path is invalid
+error ER_INVALID_JSON_PATH
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].')
+NULL
+Warnings:
+Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_extract'
+# returns a JSON value containing the number 123 (because of
+# auto-wrapping the scalar)
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 0 ]');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 0 ]')
+NULL
+# returns a JSON value containing the object because of auto-wrapping
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }',
+'$.b[ 1 ].c[ 0 ]');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }',
+'$.b[ 1 ].c[ 0 ]')
+NULL
+# returns null because the path, although valid, does not identify a value
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 1 ]');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 1 ]')
+NULL
+# returns a JSON value containing the number 123 (due to normalization)
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c')
+NULL
+# returns a JSON array [ "foo", true ]
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.a', '$.b[0]');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.a', '$.b[0]')
+["foo", true]
+# returns a JSON array [ true ]
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.d', '$.b[0]');
+JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.d', '$.b[0]')
+[true]
+select json_extract( '[1]', '$[0][0]' );
+json_extract( '[1]', '$[0][0]' )
+NULL
+select json_extract( '[1]', '$**[0]' );
+json_extract( '[1]', '$**[0]' )
+[1]
+select json_extract( '{ "a": 1 }', '$.a[0]' );
+json_extract( '{ "a": 1 }', '$.a[0]' )
+NULL
+select json_extract( '{ "a": 1 }', '$**[0]' );
+json_extract( '{ "a": 1 }', '$**[0]' )
+NULL
+select json_extract( '{ "a": 1 }', '$[0].a' );
+json_extract( '{ "a": 1 }', '$[0].a' )
+NULL
+select json_extract( '{ "a": 1 }', '$**.a' );
+json_extract( '{ "a": 1 }', '$**.a' )
+[1]
+select json_extract( '{ "a": 1 }', '$[0].a[0]' );
+json_extract( '{ "a": 1 }', '$[0].a[0]' )
+NULL
+select json_extract( '{ "a": 1 }', '$**[0]' );
+json_extract( '{ "a": 1 }', '$**[0]' )
+NULL
+select json_extract( '{ "a": 1 }', '$[0].a' );
+json_extract( '{ "a": 1 }', '$[0].a' )
+NULL
+select json_extract( '{ "a": 1 }', '$**.a' );
+json_extract( '{ "a": 1 }', '$**.a' )
+[1]
+select json_extract( '{ "a": 1 }', '$[0][0].a' );
+json_extract( '{ "a": 1 }', '$[0][0].a' )
+NULL
+select json_extract( '{ "a": 1 }', '$[0][0][0].a' );
+json_extract( '{ "a": 1 }', '$[0][0][0].a' )
+NULL
+SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*');
+JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*')
+[{"c":42}]
+SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'$[1][0][0].x[0].a.*');
+JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+'$[1][0][0].x[0].a.*')
+[{"c":42}]
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+'$.b[ 1 ].c'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+'$.b[ 1 ].c'
+)
+NULL
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c'
+)
+NULL
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT
+(
+'{ "a" : [ }',
+'$.b[ 1 ].c'
+);
+JSON_EXTRACT
+(
+'{ "a" : [ }',
+'$.b[ 1 ].c'
+)
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 11
+error ER_INVALID_JSON_PATH
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].'
+)
+NULL
+Warnings:
+Warning 4041 Unexpected end of JSON path in argument 2 to function 'json_extract'
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 0 ]'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 0 ]'
+)
+NULL
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 1 ]'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+'$.b[ 1 ].c[ 1 ]'
+)
+NULL
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.b[ 1 ].c'
+)
+NULL
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.a', '$.b[0]'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.a', '$.b[0]'
+)
+["foo", true]
+SELECT JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.d', '$.b[0]'
+);
+JSON_EXTRACT
+(
+'{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+'$.d', '$.b[0]'
+)
+[true]
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].b' ) jdoc;
+jdoc
+NULL
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].b' ) jdoc;
+jdoc
+NULL
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].a' ) jdoc;
+jdoc
+1
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].a' ) jdoc;
+jdoc
+[1, 2]
+select json_extract( '[ { "a": 1 }, { "b": 2 } ]', '$[*].a' ) jdoc;
+jdoc
+[1]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a' ) jdoc;
+jdoc
+[3,4]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[*].a' ) jdoc;
+jdoc
+[[3,4]]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a', '$[1].a' ) jdoc;
+jdoc
+[[3,4]]
+# ----------------------------------------------------------------------
+# Test of JSON_ARRAY_APPEND function.
+# ----------------------------------------------------------------------
+select json_array_append(NULL, '$.b', cast(1 as json));
+json_array_append(NULL, '$.b', cast(1 as json))
+NULL
+select json_array_append('[1,2,3]', NULL, cast(1 as json));
+json_array_append('[1,2,3]', NULL, cast(1 as json))
+NULL
+select json_array_append('[1,2,3]', '$', NULL);
+json_array_append('[1,2,3]', '$', NULL)
+[1,2,3, null]
+select json_array_append(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append'
+select json_array_append(NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append'
+select json_array_append(NULL, NULL, NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_append'
+SELECT JSON_ARRAY_APPEND(cast('1' as json), '$', 3);
+JSON_ARRAY_APPEND(cast('1' as json), '$', 3)
+[1, 3]
+SELECT JSON_ARRAY_APPEND(cast('{"a": 3}' as json), '$', 3);
+JSON_ARRAY_APPEND(cast('{"a": 3}' as json), '$', 3)
+[{"a": 3}, 3]
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append(cast('{"a": {"b": [3]}}' as json), '$**[0]', 6);
+json_array_append(cast('{"a": {"b": [3]}}' as json), '$**[0]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append'
+# Auto-wrapping, since because the paths identify scalars.
+# should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]}
+SELECT JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}',
+'$.b', cast(4 as json),
+'$.c', cast('"grape"' as json));
+JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}',
+'$.b', cast(4 as json),
+'$.c', cast('"grape"' as json))
+{"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]}
+# should return {"a": "foo", "b": [1, 2, 3, 4],
+# "c": ["apple", "pear", "grape"]}
+SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+'$.b', cast(4 as json),
+'$.c', cast('"grape"' as json));
+JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+'$.b', cast(4 as json),
+'$.c', cast('"grape"' as json))
+{"a" : "foo","b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]}
+SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+'$.b', 4,
+'$.c', 'grape');
+JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+'$.b', 4,
+'$.c', 'grape')
+{"a" : "foo","b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]}
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4);
+json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4);
+json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_array_append'
+SELECT JSON_ARRAY_APPEND
+(
+'{ "a" : "foo", "b" : "bar", "c" : "wibble" }',
+'$.b', 4,
+'$.c', "grape"
+);
+JSON_ARRAY_APPEND
+(
+'{ "a" : "foo", "b" : "bar", "c" : "wibble" }',
+'$.b', 4,
+'$.c', "grape"
+)
+{ "a" : "foo", "b" : ["bar", 4], "c" : ["wibble", "grape"] }
+SELECT JSON_ARRAY_APPEND
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }',
+'$.b', 4,
+'$.c', "grape"
+);
+JSON_ARRAY_APPEND
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }',
+'$.b', 4,
+'$.c', "grape"
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 , 4], "c" : [ "apple", "pear" , "grape"] }
+# ----------------------------------------------------------------------
+# Bug#21373874 ASSERTION `PARENT' FAILED
+# ----------------------------------------------------------------------
+select json_array_append('{"a":1}', '$[0]', 100);
+json_array_append('{"a":1}', '$[0]', 100)
+[{"a":1}, 100]
+select json_array_append('3', '$[0]', 100);
+json_array_append('3', '$[0]', 100)
+[3, 100]
+select json_array_append('3', '$[0][0][0][0]', 100);
+json_array_append('3', '$[0][0][0][0]', 100)
+[3, 100]
+# ----------------------------------------------------------------------
+# Test of JSON_INSERT function.
+# ----------------------------------------------------------------------
+select json_insert(NULL, '$.b', cast(1 as json));
+json_insert(NULL, '$.b', cast(1 as json))
+NULL
+select json_insert('[1,2,3]', NULL, cast(1 as json));
+json_insert('[1,2,3]', NULL, cast(1 as json))
+NULL
+select json_insert('[1,2,3]', '$[3]', NULL);
+json_insert('[1,2,3]', '$[3]', NULL)
+[1,2,3, null]
+select json_insert(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_insert'
+select json_insert(NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_insert'
+select json_insert(NULL, NULL, NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_insert'
+select json_insert('[1,2,3]', '$[2]', 4);
+json_insert('[1,2,3]', '$[2]', 4)
+[1,2,3]
+select json_insert('[1,2,3]', '$[3]', 4);
+json_insert('[1,2,3]', '$[3]', 4)
+[1,2,3, 4]
+select json_insert('[1,2,3]', '$[10]', 4);
+json_insert('[1,2,3]', '$[10]', 4)
+[1,2,3, 4]
+select json_insert('{"c":4}', '$.c', 4);
+json_insert('{"c":4}', '$.c', 4)
+{"c":4}
+select json_insert('{"c":4}', '$.a', 4);
+json_insert('{"c":4}', '$.a', 4)
+{"c":4, "a":4}
+select json_insert('1', '$', 4);
+json_insert('1', '$', 4)
+1
+select json_insert('1', '$[0]', 4);
+json_insert('1', '$[0]', 4)
+[1, 4]
+select json_insert('1', '$[1]', 4);
+json_insert('1', '$[1]', 4)
+[1, 4]
+select json_insert('1', '$[10]', '4', '$[11]', 5);
+json_insert('1', '$[10]', '4', '$[11]', 5)
+[1, "4", 5]
+select json_insert('[1,2,3]', '$[2][0]', 4);
+json_insert('[1,2,3]', '$[2][0]', 4)
+[1,2,[3, 4]]
+select json_insert('[1,2,3]', '$[2][2]', 4);
+json_insert('[1,2,3]', '$[2][2]', 4)
+[1,2,[3, 4]]
+select json_insert('{"a": 3}', '$.a[0]', 4);
+json_insert('{"a": 3}', '$.a[0]', 4)
+{"a": [3, 4]}
+select json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5')
+{"a": [3, 4, "5"]}
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": [1], "b": 2}' as json), '$.*[1]', 6);
+json_insert(cast('{"a": [1], "b": 2}' as json), '$.*[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": 1, "b": 2}' as json), '$.*[1]', 6);
+json_insert(cast('{"a": 1, "b": 2}' as json), '$.*[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": 3}}' as json), '$.a.*[1]', 6);
+json_insert(cast('{"a": {"b": 3}}' as json), '$.a.*[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": [3]}}' as json), '$.a.*[1]', 6);
+json_insert(cast('{"a": {"b": [3]}}' as json), '$.a.*[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": 3}}' as json), '$**[1]', 6);
+json_insert(cast('{"a": {"b": 3}}' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6);
+json_insert(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1]' as json), '$[*][1]', 6);
+json_insert(cast('[1]' as json), '$[*][1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1]' as json), '$**[1]', 6);
+json_insert(cast('[1]' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1, [2], 3]' as json), '$[*][1]', 6);
+json_insert(cast('[1, [2], 3]' as json), '$[*][1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1, [2], 3]' as json), '$**[1]', 6);
+json_insert(cast('[1, [2], 3]' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[[1]]' as json), '$[*][1]', 6);
+json_insert(cast('[[1]]' as json), '$[*][1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[[1]]' as json), '$**[1]', 6);
+json_insert(cast('[[1]]' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+select json_insert(cast('{"a": 3}' as json), '$[1]', 6);
+json_insert(cast('{"a": 3}' as json), '$[1]', 6)
+[{"a": 3}, 6]
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true);
+JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] }
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123);
+JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":123}
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123');
+JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123')
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":"123"}
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true);
+JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true)
+{ "a" : ["foo", true], "b" : [ 1, 2, 3 ] }
+SELECT JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false);
+JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false)
+{ "a" : "foo", "b":true}
+SELECT JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+true
+);
+JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+true
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] }
+SELECT JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+123
+);
+JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+123
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":123}
+SELECT JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+'123'
+);
+JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+'123'
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":"123"}
+SELECT JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a[1]',
+true
+);
+JSON_INSERT
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a[1]',
+true
+)
+{ "a" : ["foo", true], "b" : [ 1, 2, 3 ] }
+SELECT JSON_INSERT
+(
+'{ "a" : "foo"}',
+'$.b', true,
+'$.b', false
+);
+JSON_INSERT
+(
+'{ "a" : "foo"}',
+'$.b', true,
+'$.b', false
+)
+{ "a" : "foo", "b":true}
+# ----------------------------------------------------------------------
+# Test of JSON_ARRAY_INSERT function.
+# ----------------------------------------------------------------------
+select json_array_insert(NULL, '$.b[1]', 1);
+json_array_insert(NULL, '$.b[1]', 1)
+NULL
+select json_array_insert('[1,2,3]', NULL, 1);
+json_array_insert('[1,2,3]', NULL, 1)
+NULL
+select json_array_insert('[1,2,3]', '$[3]', NULL);
+json_array_insert('[1,2,3]', '$[3]', NULL)
+[1,2,3, null]
+select json_array_insert(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert'
+select json_array_insert(NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert'
+select json_array_insert(NULL, NULL, NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_array_insert'
+error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$', 1);
+json_array_insert('true', '$', 1)
+NULL
+error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$.a', 1);
+json_array_insert('true', '$.a', 1)
+NULL
+error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$.a[1].b', 1);
+json_array_insert('true', '$.a[1].b', 1)
+NULL
+select json_array_insert( 'true', '$[0]', false );
+json_array_insert( 'true', '$[0]', false )
+true
+select json_array_insert( 'true', '$[1]', false );
+json_array_insert( 'true', '$[1]', false )
+true
+select json_array_insert( '{ "a": true }', '$.a[0]', false );
+json_array_insert( '{ "a": true }', '$.a[0]', false )
+{ "a": true }
+select json_array_insert( '{ "a": true }', '$.a[1]', false );
+json_array_insert( '{ "a": true }', '$.a[1]', false )
+{ "a": true }
+select json_array_insert( '[]', '$[0]', false );
+json_array_insert( '[]', '$[0]', false )
+[false]
+select json_array_insert( '[]', '$[1]', false );
+json_array_insert( '[]', '$[1]', false )
+[false]
+select json_array_insert( '[true]', '$[0]', false );
+json_array_insert( '[true]', '$[0]', false )
+[false, true]
+select json_array_insert( '[true]', '$[1]', false );
+json_array_insert( '[true]', '$[1]', false )
+[true, false]
+select json_array_insert( '[true]', '$[2]', false );
+json_array_insert( '[true]', '$[2]', false )
+[true, false]
+select json_array_insert( '{ "a": [] }', '$.a[0]', false );
+json_array_insert( '{ "a": [] }', '$.a[0]', false )
+{ "a": [false] }
+select json_array_insert( '{ "a": [] }', '$.a[1]', false );
+json_array_insert( '{ "a": [] }', '$.a[1]', false )
+{ "a": [false] }
+select json_array_insert( '{ "a": [true] }', '$.a[0]', false );
+json_array_insert( '{ "a": [true] }', '$.a[0]', false )
+{ "a": [false, true] }
+select json_array_insert( '{ "a": [true] }', '$.a[1]', false );
+json_array_insert( '{ "a": [true] }', '$.a[1]', false )
+{ "a": [true, false] }
+select json_array_insert( '{ "a": [true] }', '$.a[2]', false );
+json_array_insert( '{ "a": [true] }', '$.a[2]', false )
+{ "a": [true, false] }
+select json_array_insert( '[1, 2, 3, 4]', '$[0]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[0]', false )
+[false, 1, 2, 3, 4]
+select json_array_insert( '[1, 2, 3, 4]', '$[1]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[1]', false )
+[1, false, 2, 3, 4]
+select json_array_insert( '[1, 2, 3, 4]', '$[2]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[2]', false )
+[1, 2, false, 3, 4]
+select json_array_insert( '[1, 2, 3, 4]', '$[3]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[3]', false )
+[1, 2, 3, false, 4]
+select json_array_insert( '[1, 2, 3, 4]', '$[4]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[4]', false )
+[1, 2, 3, 4, false]
+select json_array_insert( '[1, 2, 3, 4]', '$[5]', false );
+json_array_insert( '[1, 2, 3, 4]', '$[5]', false )
+[1, 2, 3, 4, false]
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false )
+{ "a": [false, 1, 2, 3, 4] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false )
+{ "a": [1, false, 2, 3, 4] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false )
+{ "a": [1, 2, false, 3, 4] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false )
+{ "a": [1, 2, 3, false, 4] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false )
+{ "a": [1, 2, 3, 4, false] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false )
+{ "a": [1, 2, 3, 4, false] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false )
+{ "a": [1, 2, 3, 4] }
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false );
+json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false )
+{ "a": [1, 2, 3, 4] }
+select json_array_insert( '"a"', '$[0]', true );
+json_array_insert( '"a"', '$[0]', true )
+"a"
+select json_array_insert( '[ "a" ]', '$[0][0]', true );
+json_array_insert( '[ "a" ]', '$[0][0]', true )
+[ "a" ]
+select json_array_insert( '"a"', '$[1]', true );
+json_array_insert( '"a"', '$[1]', true )
+"a"
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$.a.*[1]', 6);
+json_insert('[]', '$.a.*[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$**[1]', 6);
+json_insert('[]', '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$[*][1]', 6);
+json_insert('[]', '$[*][1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_insert'
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false );
+json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false )
+[ 1, false, true, 2, 3 ]
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]',
+cast( '[ "a", "b", "c", "d" ]' as json ), '$[1][2]', false );
+json_array_insert( '[ 1, 2, 3 ]', '$[1]',
+cast( '[ "a", "b", "c", "d" ]' as json ), '$[1][2]', false )
+[ 1, [ "a", "b", false, "c", "d" ], 2, 3 ]
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1);
+JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract'
+error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) );
+json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) )
+[ 1, null, 2, 3 ]
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract'
+# ----------------------------------------------------------------------
+# Test of JSON_SET function.
+# ----------------------------------------------------------------------
+select json_set(NULL, '$.b', cast(1 as json));
+json_set(NULL, '$.b', cast(1 as json))
+NULL
+select json_set('[1,2,3]', NULL, cast(1 as json));
+json_set('[1,2,3]', NULL, cast(1 as json))
+NULL
+select json_set('[1,2,3]', '$[3]', NULL);
+json_set('[1,2,3]', '$[3]', NULL)
+[1,2,3, null]
+select json_set(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_set'
+select json_set(NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_set'
+select json_set(NULL, NULL, NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_set'
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_SET('{}', '$.name', JSON_EXTRACT('', '$'));
+JSON_SET('{}', '$.name', JSON_EXTRACT('', '$'))
+{, "name":null}
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract'
+select json_set('[1,2,3]', '$[2]', 4);
+json_set('[1,2,3]', '$[2]', 4)
+[1,2,4]
+select json_set('[1,2,3]', '$[3]', 4);
+json_set('[1,2,3]', '$[3]', 4)
+[1,2,3, 4]
+select json_set('[1,2,3]', '$[10]', 4);
+json_set('[1,2,3]', '$[10]', 4)
+[1,2,3, 4]
+select json_set('{"c":4}', '$.c', 5);
+json_set('{"c":4}', '$.c', 5)
+{"c":5}
+select json_set('{"c":4}', '$.a', 5);
+json_set('{"c":4}', '$.a', 5)
+{"c":4, "a":5}
+select json_set('1', '$', 4);
+json_set('1', '$', 4)
+4
+select json_set('1', '$[0]', 4);
+json_set('1', '$[0]', 4)
+4
+select json_set('1', '$[1]', 4);
+json_set('1', '$[1]', 4)
+[1, 4]
+select json_set('1', '$[10]', '4', '$[11]', 5);
+json_set('1', '$[10]', '4', '$[11]', 5)
+[1, "4", 5]
+select json_set('[1,2,3]', '$[2][0]', 4);
+json_set('[1,2,3]', '$[2][0]', 4)
+[1,2,4]
+select json_set('[1,2,3]', '$[2][2]', 4);
+json_set('[1,2,3]', '$[2][2]', 4)
+[1,2,[3, 4]]
+select json_set('{"a": 3}', '$.a[0]', 4);
+json_set('{"a": 3}', '$.a[0]', 4)
+{"a": 4}
+select json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5')
+{"a": [3, 4, "5"]}
+error ER_INVALID_JSON_PATH_WILDCARD
+select json_set(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6);
+json_set(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6)
+NULL
+Warnings:
+Warning 4044 Wildcards in JSON path not allowed in argument 2 to function 'json_set'
+SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+JSON_OBJECT());
+JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+JSON_OBJECT())
+{ "a" : {}, "b" : [ 1, 2, 3 ] }
+SELECT JSON_SET('{ "a" : "foo"}', '$.a',
+JSON_OBJECT( 'b', false ), '$.a.c', true);
+JSON_SET('{ "a" : "foo"}', '$.a',
+JSON_OBJECT( 'b', false ), '$.a.c', true)
+{ "a" : {"b": false, "c":true}}
+select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+cast('{}' as json));
+json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+cast('{}' as json))
+{ "a" : {}, "b" : [ 1, 2, 3 ] }
+select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+cast('[true, false]' as json));
+json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+cast('[true, false]' as json))
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":[true, false]}
+select json_set('1', '$[3]', 2);
+json_set('1', '$[3]', 2)
+[1, 2]
+select json_set('{ "a" : "foo"}', '$.a',
+cast('{"b": false}' as json), '$.a.c', true);
+json_set('{ "a" : "foo"}', '$.a',
+cast('{"b": false}' as json), '$.a.c', true)
+{ "a" : {"b": false, "c":true}}
+SELECT JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+JSON_OBJECT()
+);
+JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a',
+JSON_OBJECT()
+)
+{ "a" : {}, "b" : [ 1, 2, 3 ] }
+SELECT JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+JSON_ARRAY( true, false )
+);
+JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+JSON_ARRAY( true, false )
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":[true, false]}
+SELECT JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+JSON_ARRAY( CAST( 'true' AS JSON ), CAST( 'false' AS JSON ) )
+);
+JSON_SET
+(
+'{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+JSON_ARRAY( CAST( 'true' AS JSON ), CAST( 'false' AS JSON ) )
+)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] , "c":[true, false]}
+SELECT JSON_SET
+(
+'1',
+'$[3]',
+2
+);
+JSON_SET
+(
+'1',
+'$[3]',
+2
+)
+[1, 2]
+SELECT JSON_SET
+(
+'{ "a" : "foo"}',
+'$.a', JSON_OBJECT( 'b', false ),
+'$.a.c', true
+);
+JSON_SET
+(
+'{ "a" : "foo"}',
+'$.a', JSON_OBJECT( 'b', false ),
+'$.a.c', true
+)
+{ "a" : {"b": false, "c":true}}
+# ----------------------------------------------------------------------
+# Test of JSON_REPLACE function.
+# ----------------------------------------------------------------------
+select json_replace(NULL, '$.b', cast(1 as json));
+json_replace(NULL, '$.b', cast(1 as json))
+NULL
+select json_replace('[1,2,3]', NULL, cast(1 as json));
+json_replace('[1,2,3]', NULL, cast(1 as json))
+NULL
+select json_replace('[1,2,3]', '$[2]', NULL);
+json_replace('[1,2,3]', '$[2]', NULL)
+[1,2,null]
+select json_replace(NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_replace'
+select json_replace(NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_replace'
+select json_replace(NULL, NULL, NULL, NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_replace'
+select json_replace('[1,2,3]', '$[2]', 4);
+json_replace('[1,2,3]', '$[2]', 4)
+[1,2,4]
+select json_replace('[1,2,3]', '$[3]', 4);
+json_replace('[1,2,3]', '$[3]', 4)
+[1,2,3]
+select json_replace('[1,2,3]', '$[10]', 4);
+json_replace('[1,2,3]', '$[10]', 4)
+[1,2,3]
+select json_replace('{"c":4}', '$.c', 5);
+json_replace('{"c":4}', '$.c', 5)
+{"c":5}
+select json_replace('{"c":4}', '$.a', 5);
+json_replace('{"c":4}', '$.a', 5)
+{"c":4}
+select json_replace('1', '$', 4);
+json_replace('1', '$', 4)
+4
+select json_replace('1', '$[0]', 4);
+json_replace('1', '$[0]', 4)
+4
+select json_replace('1', '$[1]', 4);
+json_replace('1', '$[1]', 4)
+1
+select json_replace('1', '$[10]', '4', '$[11]', 5);
+json_replace('1', '$[10]', '4', '$[11]', 5)
+1
+select json_replace('[1,2,3]', '$[2][0]', 4);
+json_replace('[1,2,3]', '$[2][0]', 4)
+[1,2,4]
+select json_replace('[1,2,3]', '$[2][2]', 4);
+json_replace('[1,2,3]', '$[2][2]', 4)
+[1,2,3]
+select json_replace('{"a": 3}', '$.a[0]', 4);
+json_replace('{"a": 3}', '$.a[0]', 4)
+{"a": 4}
+select json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5')
+{"a": 3}
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+true);
+JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.c',
+true)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] }
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a[0]',
+true);
+JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.a[0]',
+true)
+{ "a" : true, "b" : [ 1, 2, 3 ] }
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.b[5]',
+true);
+JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+'$.b[5]',
+true)
+{ "a" : "foo", "b" : [ 1, 2, 3 ] }
+# ----------------------------------------------------------------------
+# Test of JSON_ARRAY function.
+# ----------------------------------------------------------------------
+select json_array(NULL, '$.b', cast(1 as json));
+json_array(NULL, '$.b', cast(1 as json))
+[null, "$.b", 1]
+select json_array('[1,2,3]', NULL, cast(1 as json));
+json_array('[1,2,3]', NULL, cast(1 as json))
+["[1,2,3]", null, 1]
+select json_array('[1,2,3]', '$[3]', NULL);
+json_array('[1,2,3]', '$[3]', NULL)
+["[1,2,3]", "$[3]", null]
+select json_array();
+json_array()
+[]
+select json_array(3.14);
+json_array(3.14)
+[3.14]
+select json_array('[1,2,3]');
+json_array('[1,2,3]')
+["[1,2,3]"]
+select json_array(cast('[1,2,3]' as json));
+json_array(cast('[1,2,3]' as json))
+[[1,2,3]]
+select json_array(1,2,3);
+json_array(1,2,3)
+[1, 2, 3]
+select json_array(b'0', b'1', b'10');
+json_array(b'0', b'1', b'10')
+["\u0000", "\u0001", "\u0002"]
+SELECT JSON_ARRAY();
+JSON_ARRAY()
+[]
+# ----------------------------------------------------------------------
+# Test of JSON_OBJECT function.
+# ----------------------------------------------------------------------
+select json_object( 'a' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_object'
+select json_object( 'a', 1, 'b' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_object'
+error ER_JSON_DOCUMENT_NULL_KEY
+select json_object( null, 1 );
+json_object( null, 1 )
+{"": 1}
+select json_object();
+json_object()
+{}
+select json_object( 'a', null );
+json_object( 'a', null )
+{"a": null}
+select json_object( 'a', 1 );
+json_object( 'a', 1 )
+{"a": 1}
+select json_object( 'a', 1, 'b', 'foo' );
+json_object( 'a', 1, 'b', 'foo' )
+{"a": 1, "b": "foo"}
+select json_object( 'a', 1, 'b', 'foo', 'c', cast( '{ "d": "wibble" }' as json ) );
+json_object( 'a', 1, 'b', 'foo', 'c', cast( '{ "d": "wibble" }' as json ) )
+{"a": 1, "b": "foo", "c": { "d": "wibble" }}
+select json_object( 'a', true, 'b', false, 'c', cast( 'null' as json) );
+json_object( 'a', true, 'b', false, 'c', cast( 'null' as json) )
+{"a": true, "b": false, "c": null}
+select json_valid( json_object( '"a"', 1 ) );
+json_valid( json_object( '"a"', 1 ) )
+0
+select json_object( REPEAT('a', 64 * 1024), 1 );
+json_object( REPEAT('a', 64 * 1024), 1 )
+{"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 1}
+select json_object(json_array(), json_array());
+json_object(json_array(), json_array())
+{"[]": []}
+select json_object( cast(json_array() as char), json_array());
+json_object( cast(json_array() as char), json_array())
+{"[]": []}
+select json_object( 1, json_array());
+json_object( 1, json_array())
+{"1": []}
+select json_object( cast(1 as char), json_array());
+json_object( cast(1 as char), json_array())
+{"1": []}
+SELECT JSON_OBJECT();
+JSON_OBJECT()
+{}
+# ----------------------------------------------------------------------
+# Test of JSON_SEARCH function.
+# ----------------------------------------------------------------------
+select json_search();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_search'
+select json_search( '{ "a": true }' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_search'
+select json_search( '{ "a": true }', 'one' );
+ERROR 42000: Incorrect parameter count in the call to native function 'json_search'
+select json_search( null, 'one', 'foo' );
+json_search( null, 'one', 'foo' )
+NULL
+select json_search( '{ "a": "foo" }', null, 'foo' );
+json_search( '{ "a": "foo" }', null, 'foo' )
+NULL
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, null );
+json_search( '{ "a": "foo" }', 'one', 'foo', null, null )
+NULL
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null );
+json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null )
+NULL
+error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_search( '{ "a": "foo" }', 'twof', 'foo' );
+json_search( '{ "a": "foo" }', 'twof', 'foo' )
+NULL
+Warnings:
+Warning 4046 Argument 2 to function 'json_search' must be "one" or "all".
+error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_search( '{ "a": "foo" }', 'two', 'foo' );
+json_search( '{ "a": "foo" }', 'two', 'foo' )
+NULL
+Warnings:
+Warning 4046 Argument 2 to function 'json_search' must be "one" or "all".
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' );
+ERROR HY000: Incorrect arguments to ESCAPE
+error ER_INVALID_JSON_PATH
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' );
+json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 5 to function 'json_search' at position 2
+error ER_INVALID_JSON_PATH
+select json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' );
+json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' )
+NULL
+Warnings:
+Warning 4042 Syntax error in JSON path in argument 6 to function 'json_search' at position 2
+select json_search(a, b, c);
+ERROR 42S22: Unknown column 'a' in 'field list'
+select json_search( '{ "a": "foobar" }', 'one', 'foo%' );
+json_search( '{ "a": "foobar" }', 'one', 'foo%' )
+"$.a"
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' );
+json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' )
+"$.a"
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' );
+json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' )
+["$.a", "$.c[1]"]
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' );
+json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' )
+"$.b"
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' )
+["$.a[0]", "$.a[2]"]
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' )
+["$.a[0]", "$.a[2]", "$.b"]
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' )
+"$.a[0]"
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' )
+["$.a[0]", "$.a[2]"]
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' )
+["$.a[0]", "$.a[2]", "$.b"]
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' );
+json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' )
+"$.a[0]"
+select json_search
+(
+'[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]',
+'all',
+'foo%',
+null,
+'$**.c'
+);
+json_search
+(
+'[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]',
+'all',
+'foo%',
+null,
+'$**.c'
+)
+["$[0].a.b.c", "$[2].c.c"]
+select json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%',
+null,
+'$**.c'
+);
+json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%',
+null,
+'$**.c'
+)
+["$[0].a.b.c", "$[1].b.c", "$[2].c.c"]
+select json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%e',
+null,
+'$**.c'
+);
+json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%e',
+null,
+'$**.c'
+)
+["$[0].a.b.c", "$[2].c.c"]
+select json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%',
+null,
+'$[*].c'
+);
+json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+'all',
+'sho%',
+null,
+'$[*].c'
+)
+"$[2].c.c"
+select json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]',
+'all',
+'sho%',
+null,
+'$[1]**.c'
+);
+json_search
+(
+'[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]',
+'all',
+'sho%',
+null,
+'$[1]**.c'
+)
+["$[1][0].b.c", "$[1][1].c.c"]
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' )
+["$[0]", "$[1]"]
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' )
+NULL
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' )
+"$[1]"
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' )
+NULL
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' )
+"$[1]"
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' )
+"$[1]"
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null )
+"$[1]"
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' )
+NULL
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' )
+"$[1]"
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' )
+NULL
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' );
+json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' )
+"$[1]"
+select json_search( '[ "abc", "ABC" ]', 'all', 'aBc' );
+json_search( '[ "abc", "ABC" ]', 'all', 'aBc' )
+["$[0]", "$[1]"]
+select json_search( '[ "abc", "ABC" ]', 'all', 'abc' );
+json_search( '[ "abc", "ABC" ]', 'all', 'abc' )
+["$[0]", "$[1]"]
+select json_search( '[ "abc", "ABC" ]', 'all', 'ABC' );
+json_search( '[ "abc", "ABC" ]', 'all', 'ABC' )
+["$[0]", "$[1]"]
+select json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' );
+json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' )
+["$[0]", "$[1]", "$[2]", "$[3]"]
+SELECT JSON_SEARCH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'one',
+'123'
+);
+JSON_SEARCH
+(
+'{ "a" : 123, "b" : [ 123, 456 ] }',
+'one',
+'123'
+)
+"$.a"
+SELECT JSON_SEARCH
+(
+'{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }',
+'one',
+'123',
+null,
+'$.b'
+);
+JSON_SEARCH
+(
+'{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }',
+'one',
+'123',
+null,
+'$.b'
+)
+"$.b[0]"
+SELECT JSON_SEARCH
+(
+'{ "a" : "123", "b" : { "key" : "123" } }',
+'one',
+'123'
+);
+JSON_SEARCH
+(
+'{ "a" : "123", "b" : { "key" : "123" } }',
+'one',
+'123'
+)
+"$.a"
+SELECT JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234" } }',
+'one',
+'123%'
+);
+JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234" } }',
+'one',
+'123%'
+)
+"$.b.key"
+SELECT JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }',
+'one',
+'dir%torysub@%dir%',
+'@'
+);
+JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }',
+'one',
+'dir%torysub@%dir%',
+'@'
+)
+"$.b.c"
+SELECT JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234" } }',
+'one',
+'123%',
+null,
+'$.c'
+);
+JSON_SEARCH
+(
+'{ "a" : "1243", "b" : { "key" : "1234" } }',
+'one',
+'123%',
+null,
+'$.c'
+)
+NULL
+SELECT JSON_UNQUOTE
+(
+JSON_SEARCH
+(
+'{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }',
+'all',
+'food'
+ )
+);
+JSON_UNQUOTE
+(
+JSON_SEARCH
+(
+'{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }',
+'all',
+'food'
+ )
+)
+$.one potato
+select json_type(case (null is null) when 1 then
+cast('null' as json) else
+cast('[1,2,3]' as json) end);
+json_type(case (null is null) when 1 then
+cast('null' as json) else
+cast('[1,2,3]' as json) end)
+NULL
+select json_type(case (null is not null) when 1 then
+cast('null' as json) else
+cast('[1,2,3]' as json) end);
+json_type(case (null is not null) when 1 then
+cast('null' as json) else
+cast('[1,2,3]' as json) end)
+ARRAY
+select json_type( if(null is null,
+cast('null' as json),
+cast('[1,2,3]' as json)) );
+json_type( if(null is null,
+cast('null' as json),
+cast('[1,2,3]' as json)) )
+NULL
+select json_type( if(null is not null,
+cast('null' as json),
+cast('[1,2,3]' as json)));
+json_type( if(null is not null,
+cast('null' as json),
+cast('[1,2,3]' as json)))
+ARRAY
+select cast(json_extract(cast(concat('[', cast('["A",2]' as json), ']') as json),
+'$[0][1]') as char) = 2;
+cast(json_extract(cast(concat('[', cast('["A",2]' as json), ']') as json),
+'$[0][1]') as char) = 2
+1
+# ----------------------------------------------------------------------
+# Test of aggregate function MAX, MIN.
+# ----------------------------------------------------------------------
+select max(cast('[1,2,3]' as json));
+max(cast('[1,2,3]' as json))
+[1,2,3]
+# ----------------------------------------------------------------------
+# Test of JSON_QUOTE, JSON_UNQUOTE
+# ----------------------------------------------------------------------
+select json_quote();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_quote'
+select json_quote('abc', 'def');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_quote'
+select json_quote(NULL, 'def');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_quote'
+select json_quote('abc', NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_quote'
+select json_unquote();
+ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote'
+select json_unquote('"abc"', '"def"');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote'
+select json_unquote(NULL, 'def');
+ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote'
+select json_unquote('"abc"', NULL);
+ERROR 42000: Incorrect parameter count in the call to native function 'json_unquote'
+select json_quote(NULL);
+json_quote(NULL)
+NULL
+select json_unquote(NULL);
+json_unquote(NULL)
+NULL
+select json_quote('abc');
+json_quote('abc')
+"abc"
+select json_quote(convert('abc' using ascii));
+json_quote(convert('abc' using ascii))
+"abc"
+select json_quote(convert('abc' using latin1));
+json_quote(convert('abc' using latin1))
+"abc"
+select json_quote(convert('abc' using utf8));
+json_quote(convert('abc' using utf8))
+"abc"
+select json_quote(convert('abc' using utf8mb4));
+json_quote(convert('abc' using utf8mb4))
+"abc"
+select json_unquote('abc');
+json_unquote('abc')
+abc
+select json_unquote('"abc"');
+json_unquote('"abc"')
+abc
+select json_unquote(convert('"abc"' using ascii));
+json_unquote(convert('"abc"' using ascii))
+abc
+select json_unquote(convert('"abc"' using latin1));
+json_unquote(convert('"abc"' using latin1))
+abc
+select json_unquote(convert('"abc"' using utf8));
+json_unquote(convert('"abc"' using utf8))
+abc
+select json_unquote(convert('"abc"' using utf8mb4));
+json_unquote(convert('"abc"' using utf8mb4))
+abc
+select json_quote('"');
+json_quote('"')
+"\""
+select json_unquote('"');
+json_unquote('"')
+"
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_unquote'
+error ER_INCORRECT_TYPE
+select json_quote(123);
+json_quote(123)
+NULL
+error ER_INCORRECT_TYPE
+select json_unquote(123);
+json_unquote(123)
+123
+select json_unquote('""');
+json_unquote('""')
+
+select char_length(json_unquote('""'));
+char_length(json_unquote('""'))
+0
+select json_unquote('"" ');
+json_unquote('"" ')
+
+select json_unquote(cast(json_quote('abc') as json));
+json_unquote(cast(json_quote('abc') as json))
+abc
+select cast('{"abc": "foo"}' as json);
+cast('{"abc": "foo"}' as json)
+{"abc": "foo"}
+select json_unquote(cast('{"abc": "foo"}' as json));
+json_unquote(cast('{"abc": "foo"}' as json))
+{"abc": "foo"}
+select json_extract(cast('{"abc": "foo"}' as json), '$.abc');
+json_extract(cast('{"abc": "foo"}' as json), '$.abc')
+"foo"
+select json_unquote(json_extract(cast('{"abc": "foo"}' as json), '$.abc'));
+json_unquote(json_extract(cast('{"abc": "foo"}' as json), '$.abc'))
+foo
+select json_unquote('["a", "b", "c"]');
+json_unquote('["a", "b", "c"]')
+["a", "b", "c"]
+select json_unquote(cast('["a", "b", "c"]' as json));
+json_unquote(cast('["a", "b", "c"]' as json))
+["a", "b", "c"]
+select charset(json_unquote('"abc"'));
+charset(json_unquote('"abc"'))
+utf8
+select json_quote(convert(X'e68891' using utf8));
+json_quote(convert(X'e68891' using utf8))
+"我"
+select json_quote(convert(X'e68891' using utf8mb4));
+json_quote(convert(X'e68891' using utf8mb4))
+"我"
+select cast(json_quote(convert(X'e68891' using utf8)) as json);
+cast(json_quote(convert(X'e68891' using utf8)) as json)
+"我"
+select json_unquote(convert(X'e68891' using utf8));
+json_unquote(convert(X'e68891' using utf8))
+我
+select json_quote(json_quote(json_quote('abc')));
+json_quote(json_quote(json_quote('abc')))
+"\"\\\"abc\\\"\""
+select json_unquote(json_unquote(json_unquote( # long round trip of it
+json_quote(json_quote(json_quote('abc'))))));
+json_unquote(json_unquote(json_unquote( # long round trip of it
+json_quote(json_quote(json_quote('abc'))))))
+abc
+select cast(cast('2015-01-15 23:24:25' as datetime) as json);
+cast(cast('2015-01-15 23:24:25' as datetime) as json)
+2015-01-15 23:24:25
+select json_unquote(cast(cast('2015-01-15 23:24:25' as datetime) as json));
+json_unquote(cast(cast('2015-01-15 23:24:25' as datetime) as json))
+2015-01-15 23:24:25
+select cast(st_geomfromtext('point(1 1)') as json);
+cast(st_geomfromtext('point(1 1)') as json)
+
+select json_unquote(cast(st_geomfromtext('point(1 1)') as json));
+json_unquote(cast(st_geomfromtext('point(1 1)') as json))
+
+SELECT JSON_UNQUOTE( '"abc"' );
+JSON_UNQUOTE( '"abc"' )
+abc
+SELECT JSON_UNQUOTE( '"abc' );
+JSON_UNQUOTE( '"abc' )
+"abc
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_unquote'
+error ER_INCORRECT_TYPE
+SELECT JSON_UNQUOTE( 123 );
+JSON_UNQUOTE( 123 )
+123
+SELECT JSON_UNQUOTE
+( CAST( CAST( '"abc"' AS JSON ) AS CHAR ) );
+JSON_UNQUOTE
+( CAST( CAST( '"abc"' AS JSON ) AS CHAR ) )
+abc
+SELECT JSON_UNQUOTE
+(
+CAST(
+JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+AS CHAR
+)
+) = 'fred';
+JSON_UNQUOTE
+(
+CAST(
+JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+AS CHAR
+)
+) = 'fred'
+1
+SELECT
+CAST(
+JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+AS CHAR
+) = 'fred';
+CAST(
+JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+AS CHAR
+) = 'fred'
+0
+SELECT JSON_QUOTE( 'abc' );
+JSON_QUOTE( 'abc' )
+"abc"
+error ER_INCORRECT_TYPE
+SELECT JSON_QUOTE( 123 );
+JSON_QUOTE( 123 )
+NULL
+SELECT CAST( JSON_QUOTE( '123' ) AS JSON );
+CAST( JSON_QUOTE( '123' ) AS JSON )
+"123"
+# ----------------------------------------------------------------------
+# Test of JSON_CONTAINS
+# ----------------------------------------------------------------------
+# should give NULL
+select json_contains(NULL, NULL);
+json_contains(NULL, NULL)
+NULL
+select json_contains(cast('{"a": 1, "b": 2}' as json), NULL);
+json_contains(cast('{"a": 1, "b": 2}' as json), NULL)
+NULL
+select json_contains(NULL, cast('null' as json));
+json_contains(NULL, cast('null' as json))
+NULL
+select json_contains(cast('[1]' as json), cast('[1]' as json), NULL);
+json_contains(cast('[1]' as json), cast('[1]' as json), NULL)
+NULL
+# should give 0:
+select json_contains(cast(3.14 as json), cast(3 as json));
+json_contains(cast(3.14 as json), cast(3 as json))
+0
+# should give 0: not at top level
+select json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json));
+json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json))
+0
+# but path argument will fix it:
+select json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json), '$.a');
+json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json), '$.a')
+1
+# but arrays "introspect"
+select json_contains(cast('[1,[2.0, 3.0]]' as json), cast('[2.0]' as json));
+json_contains(cast('[1,[2.0, 3.0]]' as json), cast('[2.0]' as json))
+1
+select json_contains(cast('[1, 2, [3, [4, 5]], 6, 7]' as json), cast('5' as json));
+json_contains(cast('[1, 2, [3, [4, 5]], 6, 7]' as json), cast('5' as json))
+1
+# should give 0: just a key
+select json_contains(cast('{"a": 1, "b": 2}' as json), cast('"a"' as json));
+json_contains(cast('{"a": 1, "b": 2}' as json), cast('"a"' as json))
+0
+# should give 0: one candidate element doesn't match
+select json_contains(cast('[1]' as json), cast('[1,2]' as json));
+json_contains(cast('[1]' as json), cast('[1,2]' as json))
+0
+# should all give 1
+select json_contains(cast('null' as json), cast('null' as json));
+json_contains(cast('null' as json), cast('null' as json))
+1
+# simple object subset
+select json_contains(cast('{"a": 1, "b": 2}' as json), cast( '{"a": 1}' as json));
+json_contains(cast('{"a": 1, "b": 2}' as json), cast( '{"a": 1}' as json))
+1
+# simple vector subset
+select json_contains(cast('[1, 2, 3]' as json), cast('[1, 3]' as json));
+json_contains(cast('[1, 2, 3]' as json), cast('[1, 3]' as json))
+1
+# auto-wrap, should give 1
+select json_contains(cast('[1, 2, 3]' as json), cast(3 as json));
+json_contains(cast('[1, 2, 3]' as json), cast(3 as json))
+1
+# ok even with nested cast off elements
+select json_contains(cast('{"person": {"id": 1, "country": "norway"}}' as json),
+cast('{"person": {"country": "norway"}}' as json));
+json_contains(cast('{"person": {"id": 1, "country": "norway"}}' as json),
+cast('{"person": {"country": "norway"}}' as json))
+1
+# vector reordering and duplicates is ok
+select json_contains(cast('[1,3,5]' as json), cast('[5,3,1,5]' as json));
+json_contains(cast('[1,3,5]' as json), cast('[5,3,1,5]' as json))
+1
+# ok even with more elts in candidate than in doc
+select json_contains(cast('[{"b": 4, "a":7}]' as json), cast('[{"a":7},{"b":4}]' as json));
+json_contains(cast('[{"b": 4, "a":7}]' as json), cast('[{"a":7},{"b":4}]' as json))
+1
+select json_contains(cast('[{"b": 4, "a":7}, 5]' as json), cast('[5, {"a":7, "b":4}]' as json));
+json_contains(cast('[{"b": 4, "a":7}, 5]' as json), cast('[5, {"a":7, "b":4}]' as json))
+1
+# ok even with mixed number types that compare equal
+select json_contains(cast('[{"b": 4, "a":7}, 5.0]' as json), cast('[5, {"a":7.0E0, "b":4}]' as json));
+json_contains(cast('[{"b": 4, "a":7}, 5.0]' as json), cast('[5, {"a":7.0E0, "b":4}]' as json))
+1
+select json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' );
+json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' )
+0
+SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]');
+JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]')
+1
+SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]');
+JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]')
+0
+SELECT JSON_CONTAINS('[true,false]', '[[true]]');
+JSON_CONTAINS('[true,false]', '[[true]]')
+1
+SELECT JSON_CONTAINS('[1,2]', '[[1]]');
+JSON_CONTAINS('[1,2]', '[[1]]')
+1
+SELECT JSON_CONTAINS('[1,2]', '1', '$.abc');
+JSON_CONTAINS('[1,2]', '1', '$.abc')
+0
+SELECT JSON_CONTAINS('{}', '{}');
+JSON_CONTAINS('{}', '{}')
+1
+SELECT JSON_CONTAINS('{}', '{"a":1}');
+JSON_CONTAINS('{}', '{"a":1}')
+0
+SELECT JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}');
+JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}')
+0
+SELECT JSON_CONTAINS
+(
+CAST('[1, 4, 6]' AS JSON),
+CAST('[1, 6]' AS JSON)
+);
+JSON_CONTAINS
+(
+CAST('[1, 4, 6]' AS JSON),
+CAST('[1, 6]' AS JSON)
+)
+1
+SELECT JSON_CONTAINS
+(
+CAST('{"person": {"id": 1, "country": "norway"}}' AS JSON),
+CAST('{"person": {"country": "norway"}}' AS JSON)
+);
+JSON_CONTAINS
+(
+CAST('{"person": {"id": 1, "country": "norway"}}' AS JSON),
+CAST('{"person": {"country": "norway"}}' AS JSON)
+)
+1
+SELECT JSON_CONTAINS
+(
+CAST('[1,3,5]' AS JSON),
+CAST('[5,3,1,5]' AS JSON)
+);
+JSON_CONTAINS
+(
+CAST('[1,3,5]' AS JSON),
+CAST('[5,3,1,5]' AS JSON)
+)
+1
+SELECT JSON_CONTAINS
+(
+CAST('[3.14]' AS JSON),
+CAST('[3]' AS JSON)
+);
+JSON_CONTAINS
+(
+CAST('[3.14]' AS JSON),
+CAST('[3]' AS JSON)
+)
+0
+SELECT JSON_CONTAINS
+(
+CAST('[1, 2, 3]' AS JSON),
+CAST(3 AS JSON)
+);
+JSON_CONTAINS
+(
+CAST('[1, 2, 3]' AS JSON),
+CAST(3 AS JSON)
+)
+1
+SELECT JSON_CONTAINS();
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS'
+SELECT JSON_CONTAINS('[1]');
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS'
+SELECT JSON_CONTAINS('[1]', '[1]', '$', '$[0]');
+ERROR 42000: Incorrect parameter count in the call to native function 'JSON_CONTAINS'
+# ----------------------------------------------------------------------
+# Wrong collation from JSON_QUOTE caused problems: Set it in
+# Item_func_json_quote::fix_length_and_dec. Bug found by Knut.
+# Similar issue for JSON_UNQUOTE and JSON_TYPE.
+# ----------------------------------------------------------------------
+select json_object("a", ifnull(json_quote('test'), cast('null' as json)));
+json_object("a", ifnull(json_quote('test'), cast('null' as json)))
+{"a": "\"test\""}
+select cast(concat('[', json_quote('ab'), ']') as json);
+cast(concat('[', json_quote('ab'), ']') as json)
+["ab"]
+select cast(concat('[', json_unquote('"12"'), ']') as json);
+cast(concat('[', json_unquote('"12"'), ']') as json)
+[12]
+select cast(concat('["', json_type(cast(1 as json)), '"]') as json);
+cast(concat('["', json_type(cast(1 as json)), '"]') as json)
+["INTEGER"]
+#
+# Bug#20912438: ITEM_TYPE_HOLDER::DISPLAY_LENGTH(ITEM*): ASSERTION `0' FAILED
+#
+(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}')) UNION ALL
+(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55" }') LIMIT 0);
+JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}')
+["key80"]
+SELECT CAST(1 AS JSON) UNION ALL SELECT CAST(1 AS JSON);
+CAST(1 AS JSON)
+1
+1
+SELECT COUNT(*), CAST(NULL AS JSON);
+COUNT(*) CAST(NULL AS JSON)
+1 NULL
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT COUNT(*), JSON_EXTRACT('not valid json!', '$');
+COUNT(*) JSON_EXTRACT('not valid json!', '$')
+1 NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 1
+# ----------------------------------------------------------------------
+# Bug report from John E.
+# Crash in Item_copy_json::~Item_copy_json
+# ----------------------------------------------------------------------
+EXPLAIN SELECT COUNT(*), JSON_KEYS('{}');
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'a' );
+json_search( '{ "a": "foo" }', 'one', 'foo', 'a' )
+"$.a"
+select json_search( '{ "a": "foo" }', 'one', 'foo', null );
+json_search( '{ "a": "foo" }', 'one', 'foo', null )
+"$.a"
+select json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) );
+json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) )
+"$.a"
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' );
+ERROR HY000: Incorrect arguments to ESCAPE
+# ----------------------------------------------------------------------
+# Wrong results when Json_path_cache primed is accessed
+# during the prepare-phase.
+#----------------------------------------------------------------------
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null;
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null
+1
+prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', null ) is null';
+execute stmt1;
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null
+1
+error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null;
+json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null
+0
+error ER_INVALID_JSON_PATH
+prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', ''$.'' ) is null';
+# ----------------------------------------------------------------------
+# Bug#20987329 VALUE OF PREPARED STATEMENT PLACEHOLDER FOR PARAMETER
+# IN JSON_EXTRACT IS STICKY
+#----------------------------------------------------------------------
+prepare json_stmt1 FROM 'select json_contains( ''{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }'', ''[2]'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt1 USING @mypath;
+json_contains( '{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }', '[2]', ? )
+1
+set @mypath = '$.keyB';
+execute json_stmt1 USING @mypath;
+json_contains( '{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }', '[2]', ? )
+0
+prepare json_stmt2 FROM 'select json_contains_path( ''{ "keyA": [1, 2, 3] }'', ''all'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt2 USING @mypath;
+json_contains_path( '{ "keyA": [1, 2, 3] }', 'all', ? )
+1
+set @mypath = '$.keyB';
+execute json_stmt2 USING @mypath;
+json_contains_path( '{ "keyA": [1, 2, 3] }', 'all', ? )
+0
+prepare json_stmt3 FROM 'select json_length( ''{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt3 USING @mypath;
+json_length( '{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }', ? )
+3
+set @mypath = '$.keyB';
+execute json_stmt3 USING @mypath;
+json_length( '{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }', ? )
+4
+prepare json_stmt4 FROM 'select json_keys( ''[ { "keyA": true }, { "keyB": false } ]'', ? )';
+set @mypath = '$[0]';
+execute json_stmt4 USING @mypath;
+json_keys( '[ { "keyA": true }, { "keyB": false } ]', ? )
+["keyA"]
+set @mypath = '$[1]';
+execute json_stmt4 USING @mypath;
+json_keys( '[ { "keyA": true }, { "keyB": false } ]', ? )
+["keyB"]
+prepare json_stmt5 FROM 'select json_array_append( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA';
+execute json_stmt5 USING @mypath;
+json_array_append( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2, 5], "keyB": [3, 4] }
+set @mypath = '$.keyB';
+execute json_stmt5 USING @mypath;
+json_array_append( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2], "keyB": [3, 4, 5] }
+prepare json_stmt6 FROM 'select json_insert( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[2]';
+execute json_stmt6 USING @mypath;
+json_insert( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2, 5], "keyB": [3, 4] }
+set @mypath = '$.keyB[2]';
+execute json_stmt6 USING @mypath;
+json_insert( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2], "keyB": [3, 4, 5] }
+prepare json_stmt7 FROM 'select json_set( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[2]';
+execute json_stmt7 USING @mypath;
+json_set( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2, 5], "keyB": [3, 4] }
+set @mypath = '$.keyB[2]';
+execute json_stmt7 USING @mypath;
+json_set( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2], "keyB": [3, 4, 5] }
+prepare json_stmt8 FROM 'select json_replace( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[1]';
+execute json_stmt8 USING @mypath;
+json_replace( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 5], "keyB": [3, 4] }
+set @mypath = '$.keyB[1]';
+execute json_stmt8 USING @mypath;
+json_replace( '{ "keyA": [1, 2], "keyB": [3, 4] }', ?, 5 )
+{ "keyA": [1, 2], "keyB": [3, 5] }
+prepare json_stmt9 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ''all'', ''foo%'', null, ? )';
+set @mypath = '$.keyA';
+execute json_stmt9 USING @mypath;
+json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', 'all', 'foo%', null, ? )
+"$.keyA[0]"
+set @mypath = '$.keyB';
+execute json_stmt9 USING @mypath;
+json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', 'all', 'foo%', null, ? )
+"$.keyB[0]"
+prepare json_stmt10 FROM 'select json_remove( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt10 USING @mypath;
+json_remove( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ? )
+{ "keyB": [ "food" ] }
+set @mypath = '$.keyB';
+execute json_stmt10 USING @mypath;
+json_remove( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ? )
+{ "keyA": [ "foot" ]}
+prepare json_stmt11 FROM 'select json_contains_path( ''{ "keyA": true }'', ?, ''$.keyA'', ''$.keyB'' )';
+set @mypath = 'one';
+execute json_stmt11 USING @mypath;
+json_contains_path( '{ "keyA": true }', ?, '$.keyA', '$.keyB' )
+1
+set @mypath = 'all';
+execute json_stmt11 USING @mypath;
+json_contains_path( '{ "keyA": true }', ?, '$.keyA', '$.keyB' )
+0
+prepare json_stmt12 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ?, ''foo%'' )';
+set @mypath = 'one';
+execute json_stmt12 USING @mypath;
+json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ?, 'foo%' )
+"$.keyA[0]"
+set @mypath = 'all';
+execute json_stmt12 USING @mypath;
+json_search( '{ "keyA": [ "foot" ], "keyB": [ "food" ] }', ?, 'foo%' )
+["$.keyA[0]", "$.keyB[0]"]
+#
+# Bug#21128632 JSON_QUOTE(JSON_TYPE(...)) GIVES ERROR 3139 ER_INVALID_JSON_CHARSET
+#
+select json_quote( json_type( json_object() ) );
+json_quote( json_type( json_object() ) )
+"OBJECT"
+select json_quote( json_type( cast('{}' as json) ) );
+json_quote( json_type( cast('{}' as json) ) )
+"OBJECT"
+#
+# Bug#21148020 OUTPUT FROM JSON_TYPE() IS TRUNCATED
+# WHEN EXECUTED IN A VIEW OR JOIN
+#
+SELECT JSON_TYPE(JSON_OBJECT());
+JSON_TYPE(JSON_OBJECT())
+OBJECT
+CREATE VIEW v1 AS SELECT JSON_TYPE(JSON_OBJECT());
+SELECT * FROM v1;
+JSON_TYPE(JSON_OBJECT())
+OBJE
+drop view v1;
+#
+# Bug#21198333 SIG 6 IN ITEM_CACHE_JSON::CACHE_VALUE AT SQL/ITEM.CC:9470
+#
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT MIN(JSON_EXTRACT('not json', '$'));
+MIN(JSON_EXTRACT('not json', '$'))
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 1
+#
+# Bug#21200657 DATA FROM DERIVED TABLE BASED
+# ON JSN_QUOTE()/JSN_UNQUOTE() CALL IS TRUNCATED
+#
+SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1;
+field1
+"This is a string that should not be truncated"
+SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1;
+field1
+This is a string that should not be truncated
+SELECT * FROM (SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1) AS DERIVED_TABLE;
+field1
+"This is a string that should not be truncated"
+SELECT * FROM (SELECT JSON_UNQUOTE("This is a string that should not be truncated") AS field1) AS DERIVED_TABLE;
+field1
+This is a string that should not be truncated
+SELECT * FROM (SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1) AS DERIVED_TABLE;
+field1
+This is a string that should not be truncated
+#
+# Bug#21296173 JSON_OBJECT('KEY', BOOLEAN_LITERAL) USES VALUES 0, 1
+# FOR BOOL WHEN USED VIA VIEW
+#
+SELECT JSON_OBJECT('key1', false, 'key2', true);
+JSON_OBJECT('key1', false, 'key2', true)
+{"key1": false, "key2": true}
+SELECT JSON_ARRAY('key1', false, 'key2', true);
+JSON_ARRAY('key1', false, 'key2', true)
+["key1", false, "key2", true]
+CREATE VIEW v1 AS SELECT JSON_OBJECT('key1', false, 'key2', true);
+SELECT * FROM v1;
+JSON_OBJECT('key1', false, 'key2', true)
+{"key1": 0, "key2": 1}
+CREATE VIEW v2 AS SELECT JSON_ARRAY('key1', false, 'key2', true);
+SELECT * FROM v2;
+JSON_ARRAY('key1', false, 'key2', true)
+["key1", 0, "key2", 1]
+drop view v1;
+drop view v2;
+#
+# Bug#21293089 JSON_CONTAINS() RETURNS WRONG RESULT WITH EMPTY JSON ARRAY
+#
+SELECT JSON_CONTAINS('[]', '{"a" : 1}');
+JSON_CONTAINS('[]', '{"a" : 1}')
+0
+SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]');
+JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]')
+0
+SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]');
+JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]')
+0
+SELECT JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}');
+JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}')
+0
+SELECT JSON_CONTAINS('[]', '[]');
+JSON_CONTAINS('[]', '[]')
+1
+#
+# Bug#21377136 STACK OVERFLOW IN RAPIDJSON::GENERICREADER
+#
+error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('[', 100000));
+JSON_VALID(REPEAT('[', 100000))
+0
+error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('{"a":', 100000));
+JSON_VALID(REPEAT('{"a":', 100000))
+0
+error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('{"a":[', 100000));
+JSON_VALID(REPEAT('{"a":[', 100000))
+0
+error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('[{"a":', 100000));
+JSON_VALID(REPEAT('[{"a":', 100000))
+0
+#
+# Bug#21381806 JSON: ASSERTION FAILED: ARG->NULL_VALUE
+#
+SELECT JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}');
+JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}')
+NULL
+SELECT JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END);
+JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END)
+NULL
+SELECT JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END);
+JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END)
+[null]
+#
+# Bug#21384048 ASSERTION FAILED: N >= 0 && N <= 308
+# IN RAPIDJSON::INTERNAL::FASTPATH
+#
+SELECT JSON_EXTRACT('-1E-36181012216111515851075235238', '$');
+JSON_EXTRACT('-1E-36181012216111515851075235238', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33
+SELECT JSON_EXTRACT('1E-36181012216111515851075235238', '$');
+JSON_EXTRACT('1E-36181012216111515851075235238', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32
+SELECT JSON_EXTRACT('1E-325', '$');
+JSON_EXTRACT('1E-325', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+SELECT JSON_EXTRACT('1E-324', '$');
+JSON_EXTRACT('1E-324', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+SELECT JSON_EXTRACT('1E-323', '$');
+JSON_EXTRACT('1E-323', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+SELECT JSON_EXTRACT('1E+308', '$');
+JSON_EXTRACT('1E+308', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('1E+309', '$');
+JSON_EXTRACT('1E+309', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 6
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('1E+36181012216111515851075235238', '$');
+JSON_EXTRACT('1E+36181012216111515851075235238', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 32
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('-1E+36181012216111515851075235238', '$');
+JSON_EXTRACT('-1E+36181012216111515851075235238', '$')
+NULL
+Warnings:
+Warning 4038 Syntax error in JSON text in argument 1 to function 'json_extract' at position 33
+#
+# Bug#21383284: ASSERTION IN SELECT_LEX::SETUP_CONDS
+#
+SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', 'too-long-escape');
+ERROR HY000: Incorrect arguments to ESCAPE
+error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', JSON_EXTRACT('', '$'));
+1
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_extract'
+#
+# Bug#21442624 INCORRECT RESULT FROM JSON_SET WITH AUTO-WRAPPING
+#
+SELECT JSON_SET('1', '$', 100);
+JSON_SET('1', '$', 100)
+100
+SELECT JSON_SET('1', '$[0]', 100);
+JSON_SET('1', '$[0]', 100)
+100
+SELECT JSON_SET('1', '$[0][0]', 100);
+JSON_SET('1', '$[0][0]', 100)
+100
+SELECT JSON_SET('1', '$[0][0][0]', 100);
+JSON_SET('1', '$[0][0][0]', 100)
+100
+SELECT JSON_SET('[]', '$', 100);
+JSON_SET('[]', '$', 100)
+100
+SELECT JSON_SET('[]', '$[0]', 100);
+JSON_SET('[]', '$[0]', 100)
+[100]
+SELECT JSON_SET('[]', '$[0][0]', 100);
+JSON_SET('[]', '$[0][0]', 100)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_set'
+SELECT JSON_SET('[]', '$[0][0][0]', 100);
+JSON_SET('[]', '$[0][0][0]', 100)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_set'
+SELECT JSON_SET('[1]', '$', 100);
+JSON_SET('[1]', '$', 100)
+100
+SELECT JSON_SET('[1]', '$[0]', 100);
+JSON_SET('[1]', '$[0]', 100)
+[100]
+SELECT JSON_SET('[1]', '$[0][0]', 100);
+JSON_SET('[1]', '$[0][0]', 100)
+[100]
+SELECT JSON_SET('[1]', '$[0][0][0]', 100);
+JSON_SET('[1]', '$[0][0][0]', 100)
+[100]
+SELECT JSON_SET('[[1]]', '$', 100);
+JSON_SET('[[1]]', '$', 100)
+100
+SELECT JSON_SET('[[1]]', '$[0]', 100);
+JSON_SET('[[1]]', '$[0]', 100)
+[100]
+SELECT JSON_SET('[[1]]', '$[0][0]', 100);
+JSON_SET('[[1]]', '$[0][0]', 100)
+[[100]]
+SELECT JSON_SET('[[1]]', '$[0][0][0]', 100);
+JSON_SET('[[1]]', '$[0][0][0]', 100)
+[[100]]
+SELECT JSON_SET('[[[1]]]', '$', 100);
+JSON_SET('[[[1]]]', '$', 100)
+100
+SELECT JSON_SET('[[[1]]]', '$[0]', 100);
+JSON_SET('[[[1]]]', '$[0]', 100)
+[100]
+SELECT JSON_SET('[[[1]]]', '$[0][0]', 100);
+JSON_SET('[[[1]]]', '$[0][0]', 100)
+[[100]]
+SELECT JSON_SET('[[[1]]]', '$[0][0][0]', 100);
+JSON_SET('[[[1]]]', '$[0][0][0]', 100)
+[[[100]]]
+SELECT JSON_REPLACE('1', '$', 100);
+JSON_REPLACE('1', '$', 100)
+100
+SELECT JSON_REPLACE('1', '$[0]', 100);
+JSON_REPLACE('1', '$[0]', 100)
+100
+SELECT JSON_REPLACE('1', '$[0][0]', 100);
+JSON_REPLACE('1', '$[0][0]', 100)
+100
+SELECT JSON_REPLACE('1', '$[0][0][0]', 100);
+JSON_REPLACE('1', '$[0][0][0]', 100)
+100
+SELECT JSON_REPLACE('[]', '$', 100);
+JSON_REPLACE('[]', '$', 100)
+100
+SELECT JSON_REPLACE('[]', '$[0]', 100);
+JSON_REPLACE('[]', '$[0]', 100)
+[]
+SELECT JSON_REPLACE('[]', '$[0][0]', 100);
+JSON_REPLACE('[]', '$[0][0]', 100)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_update'
+SELECT JSON_REPLACE('[]', '$[0][0][0]', 100);
+JSON_REPLACE('[]', '$[0][0][0]', 100)
+NULL
+Warnings:
+Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_update'
+SELECT JSON_REPLACE('[1]', '$', 100);
+JSON_REPLACE('[1]', '$', 100)
+100
+SELECT JSON_REPLACE('[1]', '$[0]', 100);
+JSON_REPLACE('[1]', '$[0]', 100)
+[100]
+SELECT JSON_REPLACE('[1]', '$[0][0]', 100);
+JSON_REPLACE('[1]', '$[0][0]', 100)
+[100]
+SELECT JSON_REPLACE('[1]', '$[0][0][0]', 100);
+JSON_REPLACE('[1]', '$[0][0][0]', 100)
+[100]
+SELECT JSON_REPLACE('[[1]]', '$', 100);
+JSON_REPLACE('[[1]]', '$', 100)
+100
+SELECT JSON_REPLACE('[[1]]', '$[0]', 100);
+JSON_REPLACE('[[1]]', '$[0]', 100)
+[100]
+SELECT JSON_REPLACE('[[1]]', '$[0][0]', 100);
+JSON_REPLACE('[[1]]', '$[0][0]', 100)
+[[100]]
+SELECT JSON_REPLACE('[[1]]', '$[0][0][0]', 100);
+JSON_REPLACE('[[1]]', '$[0][0][0]', 100)
+[[100]]
+SELECT JSON_REPLACE('[[[1]]]', '$', 100);
+JSON_REPLACE('[[[1]]]', '$', 100)
+100
+SELECT JSON_REPLACE('[[[1]]]', '$[0]', 100);
+JSON_REPLACE('[[[1]]]', '$[0]', 100)
+[100]
+SELECT JSON_REPLACE('[[[1]]]', '$[0][0]', 100);
+JSON_REPLACE('[[[1]]]', '$[0][0]', 100)
+[[100]]
+SELECT JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100);
+JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100)
+[[[100]]]
+#
+# Bug#21828321: JSON FUNCS CALL DBUG_ABORT OR EXIT() ON WINDOWS!
+#
+SELECT JSON_ARRAY(LEAST(NULL, NULL), GREATEST(NULL, NULL), LEAST(j1, NULL),
+GREATEST(NULL, j2), LEAST(j1, j2), GREATEST(j1, j2)) AS j
+FROM (SELECT CAST('1' AS JSON) AS j1, CAST('2' AS JSON) AS j2) t;
+j
+[null, null, null, null, "1", "2"]
diff --git a/mysql-test/suite/json/t/json_no_table.test b/mysql-test/suite/json/t/json_no_table.test
new file mode 100644
index 00000000000..584af56a3a9
--- /dev/null
+++ b/mysql-test/suite/json/t/json_no_table.test
@@ -0,0 +1,2288 @@
+########### suite/json/t/json_notable.test #
+# Tests json columns functionality that does not need any tables #
+# to be defined (no storage engine functionality) #
+# #
+# This test copies some tests originally in json.test #
+######################################################################
+
+# Some extra checks for comparisons between positive and negative zero.
+# All should be equal.
+SELECT CAST(0.0e0 AS JSON) = -0.0e0;
+SELECT CAST(CAST(0 AS DECIMAL) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+SELECT CAST(0.0e0 AS JSON) = CAST(-0.0e0 AS DECIMAL);
+SELECT CAST(CAST(0 AS DECIMAL) AS JSON) = -0.0e0;
+SELECT CAST(CAST(0 AS SIGNED) AS JSON) = -0.0e0;
+SELECT CAST(CAST(0 AS SIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+SELECT CAST(CAST(0 AS UNSIGNED) AS JSON) = -0.0e0;
+SELECT CAST(CAST(0 AS UNSIGNED) AS JSON) = CAST(-0.0e0 AS DECIMAL);
+
+# Test that CAST string argument isn't treated as ANY_JSON_ATOM
+# in that a MySQL string needs to be parsed to JSON here; it is not
+# auto-converted to a JSON string as in ANY_JSON_ATOM contexts.
+select cast('"abc"' as json);
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select cast('abc' as json);
+
+--echo
+--echo # String literal - valid JSON
+select JSON_VALID('123'); # uint
+select JSON_VALID('-123'); # int
+select JSON_VALID('5000000000'); # uint64
+select JSON_VALID('-5000000000'); # int64
+select JSON_VALID('1.23'); # double
+select JSON_VALID('"123"');
+select JSON_VALID('true');
+select JSON_VALID('false');
+select JSON_VALID('null');
+select JSON_VALID('{"address": "Trondheim"}');
+
+--echo
+--echo # String literal - not valid JSON
+select JSON_VALID('12 3');
+
+--echo
+--echo # String literal not in UTF-8
+set names 'ascii';
+# auto-convert to utf-8
+select JSON_VALID('123');
+
+set names 'utf8';
+
+--echo
+--echo # Json expression
+select JSON_VALID(cast('[123]' as JSON ));
+
+--echo
+--echo # Json expression NULL
+select JSON_VALID(cast(NULL as JSON ));
+
+--echo
+--echo # Bare NULL
+select JSON_VALID( NULL );
+
+--echo
+--echo # Function result - string
+select JSON_VALID( UPPER('"abc"') );
+
+set names 'latin1';
+--echo
+--echo # Function result - string
+# auto-convert to utf-8
+select JSON_VALID( UPPER('"abc"') );
+
+set names 'utf8';
+
+--echo
+--echo # Function result - date, not valid as JSON without CAST
+select JSON_VALID( CAST('2015-01-15' AS DATE) );
+
+--echo
+--echo # The date string doesn't parse as JSON text, so wrong:
+select JSON_VALID( CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8') );
+--echo # OK, though:
+select JSON_VALID( CAST(CURDATE() as JSON) );
+
+--echo
+--echo # Function result - NULL
+select JSON_VALID( UPPER(NULL) );
+select JSON_VALID( UPPER(CAST(NULL as CHAR)) );
+
+# examples from wl7909 spec
+# returns 1
+SELECT JSON_VALID( '{ "firstName" : "Fred", "lastName" : "Flintstone" }' );
+
+# returns 1
+SELECT JSON_VALID( '3' );
+
+# returns NULL as IS JSON would
+SELECT JSON_VALID( null );
+
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_CONTAINS_PATH function.
+--echo # ----------------------------------------------------------------------
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_contains_path();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_contains_path('{ "a": true }' );
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_contains_path('{ "a": true }', 'all' );
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_contains_path('{ "a": tru }', 'all', '$' );
+--echo error ER_INVALID_JSON_PATH
+select json_contains_path('{ "a": true }', 'all', '$[' );
+--echo error ER_INVALID_JSON_PATH
+select json_contains_path('{ "a": true }', 'all', '$a.***[3]' );
+--echo error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_contains_path('{ "a": true }', 'foo', '$.a' );
+--echo error ER_INVALID_JSON_CHARSET
+select json_contains_path('{}', 'all', cast('$' as binary));
+
+select json_contains_path(null, 'all', '$.a' );
+select json_contains_path('{ "a": true }', null, '$.a' );
+select json_contains_path('{ "a": true }', 'all', null );
+
+# degenerate path
+select json_contains_path('{ "a": true }', 'all', '$' );
+
+# positive, one path
+select json_contains_path('{ "a": true }', 'all', '$.a' );
+select json_contains_path('{ "a": true }', 'one', '$.a' );
+
+# negative, one path
+select json_contains_path('{ "a": true }', 'all', '$.b' );
+select json_contains_path('{ "a": true }', 'one', '$.b' );
+
+# all
+select json_contains_path('{ "a": true }', 'all', '$.a', '$.b' );
+select json_contains_path('{ "a": true }', 'all', '$.b', '$.a' );
+select json_contains_path('{ "a": true }', 'ALL', '$.a', '$.b' );
+select json_contains_path('{ "a": true }', 'aLl', '$.a', '$.b' );
+
+# some
+select json_contains_path('{ "a": true }', 'one', '$.a', '$.b' );
+select json_contains_path('{ "a": true }', 'one', '$.b', '$.a' );
+select json_contains_path('{ "a": true }', 'ONE', '$.a', '$.b' );
+select json_contains_path('{ "a": true }', 'oNe', '$.a', '$.b' );
+
+# some wildcards
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**[4]', '$**[5]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[2]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2, { "c": [ 4, 5, { "d": [ 6, 7, 8, 9, 10 ]} ] } ] }', 'all', '$**.c[3]' );
+select json_contains_path('{"a":1, "b":2}', 'one', '$.*');
+select json_contains_path('[1,2,3]', 'one', '$.*');
+select json_contains_path('{}', 'one', '$[*]');
+
+# combine ellipsis and wildcard
+SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+ 'one', '$**.a.*');
+SELECT JSON_CONTAINS_PATH('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+ 'all', '$**.a.*');
+SELECT JSON_CONTAINS_PATH('[1,2,3]', 'one', '$**[*]');
+SELECT JSON_CONTAINS_PATH('[1,2,3]', 'all', '$**[*]');
+
+# 3 paths
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$**[1]', '$.b[0]', '$.c' );
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.c', '$**[1]', '$.b[0]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'all', '$.b[0]', '$.c', '$**[1]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$**[1]', '$.b[0]', '$.c' );
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.c', '$**[1]', '$.b[0]' );
+select json_contains_path('{ "a": true, "b": [ 1, 2 ] }', 'one', '$.b[0]', '$.c', '$**[1]' );
+
+# examples from the wl7909 spec
+# returns 0 because there is no element at $.a.c
+SELECT JSON_CONTAINS_PATH
+(
+ '{ "a" : 123, "b" : [ 123, 456 ] }',
+ 'all',
+ '$.a.c',
+ '$.b[1]'
+);
+
+# returns 1 because there is an element at $.b[1]
+SELECT JSON_CONTAINS_PATH
+(
+ '{ "a" : 123, "b" : [ 123, 456 ] }',
+ 'one',
+ '$.a.c',
+ '$.b[1]'
+);
+
+# returns 0 because there is no element at the given path
+SELECT JSON_CONTAINS_PATH
+(
+ '{ "a" : 123, "b" : [ 123, 456 ] }',
+ 'all',
+ '$.c'
+);
+
+# returns 1 because there is an element at $.b[1].c.d
+SELECT JSON_CONTAINS_PATH
+(
+ '{ "a" : 123, "b" : [ 123, { "c" : { "d" : true } } ] }',
+ 'all',
+ '$.b[1].c.d'
+);
+
+select json_length( null );
+select json_length( '1' );
+--echo
+--echo # invalid json text
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_length( 'abc' );
+select json_length( '"abc"' );
+select json_length( 'true' );
+select json_length( 'false' );
+select json_length( 'null' );
+
+select json_length( '{}' );
+select json_length( '{ "a" : 100, "b" : 200 }' );
+select json_length( '{ "a" : 100, "b" : [ 300, 400, 500 ] }' );
+select json_length( '[]' );
+select json_length( '[ null, "foo", true, 1.1 ]' );
+select json_length( '[ null, "foo", true, { "a" : "b", "c" : "d" } ]' );
+select json_length( '"foo"' );
+select json_length( '1.2' );
+
+
+# bad path expressions
+--echo
+--echo # invalid json path
+--echo error ER_INVALID_JSON_PATH
+select json_length( 'true', 'c$' );
+--echo
+--echo # invalid json path
+--echo error ER_INVALID_JSON_PATH
+select json_length( '{ "foo" : [ true, false ] }', '$.foo[bar]' );
+--echo
+--echo # wildcards not allowed in path expressions for this function
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_length( 'true', '$.*' );
+--echo
+--echo # wildcards not allowed in path expressions for this function
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_length( 'true', '$.foo**.bar' );
+
+# json_length() with non-vacuous path expressions
+
+# 1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[0]' );
+# 3
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[1]' );
+# 1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2]' );
+# auto-wrapping: 1
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][0]' ); # auto-wrap scalar
+select json_length( '[ 1, [ 2, 3, 4 ], {"a": 1} ]', '$[2][0]' ); # ditto object
+
+# non-existent path: null
+select json_length( '[ 1, [ 2, 3, 4 ], 5 ]', '$[2][1]' );
+# 3
+select json_length( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' );
+
+# examples from the wl7909 spec
+# returns 0
+SELECT JSON_LENGTH
+(
+ '{}'
+);
+
+# returns 1
+SELECT JSON_LENGTH
+(
+ '3'
+);
+
+# returns 2
+SELECT JSON_LENGTH
+(
+ '{ "a" : 123, "b" : [ 123, 456, 789 ] }'
+);
+
+# returns 3
+SELECT JSON_LENGTH
+(
+ '{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+ '$.b'
+);
+
+# returns null because the path does not exist
+SELECT JSON_LENGTH
+(
+ '{ "a" : 123, "b" : [ 123, 456, 789 ] }',
+ '$.c'
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_DEPTH function.
+--echo # ----------------------------------------------------------------------
+select json_depth(null);
+select json_depth(cast(null as json));
+#select i, json_depth(j) from t1;
+select json_depth(cast('[]' as json)),
+ json_depth(cast('{}' as json)),
+ json_depth(cast('null' as json)),
+ json_depth(json_quote('foo'));
+select json_depth(cast('[[2], 3, [[[4]]]]' as json));
+select json_depth(cast('{"a": {"a1": [3]}, "b": {"b1": {"c": {"d": [5]}}}}' as json));
+
+# examples from the wl7909 spec
+# returns 1
+SELECT JSON_DEPTH
+(
+ '{}'
+);
+
+# returns 1
+SELECT JSON_DEPTH
+(
+ '[]'
+);
+
+# returns 1
+SELECT JSON_DEPTH( '"abc"' );
+
+# returns 1
+SELECT JSON_DEPTH( CAST( '"abc"' AS JSON ) );
+
+--echo error ER_INVALID_TYPE_FOR_JSON
+SELECT JSON_DEPTH( 1 );
+
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_DEPTH( 'abc' );
+
+# returns 1
+SELECT JSON_DEPTH( CAST( 1 AS JSON ) );
+
+# returns 2
+SELECT JSON_DEPTH
+(
+ '{ "a" : true, "b" : false, "c" : null }'
+);
+
+# returns 2
+SELECT JSON_DEPTH
+(
+ '[ "a", true, "b" , false, "c" , null ]'
+);
+
+# returns 2
+SELECT JSON_DEPTH
+(
+ '{ "a" : true, "b" : {}, "c" : null }'
+);
+
+# returns 2
+SELECT JSON_DEPTH
+(
+ '[ "a", true, "b" , {}, "c" , null ]'
+);
+
+# returns 3
+SELECT JSON_DEPTH
+(
+ '{ "a" : true, "b" : { "e" : false }, "c" : null }'
+);
+
+# returns 3
+SELECT JSON_DEPTH
+(
+ '[ "a", true, "b" , { "e" : false }, "c" , null ]'
+);
+
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_DEPTH
+(
+ '[ "a", true, "b" , { "e" : false }, "c" , null'
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_REMOVE function.
+--echo # ----------------------------------------------------------------------
+
+# null args
+select json_remove( null, '$[1]' );
+select json_remove( null, '$[1]' ) is null;
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null );
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null;
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null );
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', null ) is null;
+
+# too few args
+
+--echo
+--echo # not enough args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_remove();
+--echo
+--echo # not enough args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]' );
+--echo
+--echo # not enough args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_remove( '$[1]' );
+
+# malformed args
+--echo
+--echo # invalid json text
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ', '$[1]', '$[2]' );
+--echo
+--echo # invalid json path
+--echo error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1', '$[2]' );
+--echo
+--echo # invalid json path
+--echo error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]', '$[2' );
+--echo
+--echo # Vacuous path expression
+--echo error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$' );
+--echo
+--echo # Vacuous path expression
+--echo error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$', '$[2]' );
+--echo
+--echo # Vacuous path expression
+--echo error ER_JSON_VACUOUS_PATH
+select json_remove( '[ 1, 2, 3 ]', '$[1]', '$' );
+
+# wildcard/ellipsis not allowed in paths
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[*]' );
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$**[2]' );
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[2]', '$[*]' );
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ 1, 2, 3 ]', '$[2]', '$**[2]' );
+
+# simple matches
+
+select json_remove( '[ 1, 2, 3 ]', '$[0]' );
+select json_remove( '[ 1, 2, 3 ]', '$[1]' );
+select json_remove( '[ 1, 2, 3 ]', '$[2]' );
+select json_remove( '[ 1, 2, 3 ]', '$[3]' );
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$[1]' );
+
+# one match nested inside another
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ { "a": { "a": true } } ]', '$**.a' );
+
+# multiple paths
+select json_remove( '[ { "a": true }, { "b": false }, { "c": null }, { "a": null } ]', '$[0].a', '$[2].c' );
+
+# ellipsis with matches at different levels
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_remove( '[ { "a": true }, { "b": [ { "c": { "a": true } } ] }, { "c": null }, { "a": null } ]', '$**.a' );
+
+# nonsense path
+select json_remove( '{"id": 123, "name": "systemQA", "array": [1, 2, 3]}', '$[0]' );
+
+# examples from wl7909 spec
+# returns the document {"a": "foo", "b": [true]}
+SELECT JSON_REMOVE
+(
+ '{"a" : "foo", "b" : [true, {"c" : 123}]}',
+ '$.b[ 1 ]'
+);
+
+# returns {"a": "foo", "b": [true, {}]} due to normalization
+SELECT JSON_REMOVE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.b[ 1 ].c'
+);
+
+# returns {"a": "foo", "b": [true, {}]}
+SELECT JSON_REMOVE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c'
+);
+
+# returns the original document because the path doesn't identify an element
+SELECT JSON_REMOVE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123, "d" : 456 } ] }',
+ '$.b[ 1 ].e'
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_MERGE function.
+--echo # ----------------------------------------------------------------------
+
+--echo
+--echo # not enough args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_merge();
+--echo
+--echo # not enough args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_merge( '[ 1, 2, 3 ]' );
+
+# null args result in NULL value
+select json_merge( null, null );
+select json_merge( null, '[ 1, 2, 3 ]' );
+select json_merge( '[ 1, 2, 3 ]', null );
+select json_merge( null, '[ 1, 2, 3 ]', '[ 4, 5, 6 ]' );
+select json_merge( '[ 1, 2, 3 ]', null, '[ 4, 5, 6 ]' );
+select json_merge( '[ 1, 2, 3 ]', '[ 4, 5, 6 ]', null );
+
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_merge( '[1, 2]', '[3, 4' );
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_merge( '[1, 2', '[3, 4]' );
+
+# good json_merge() expressions
+select json_merge( '1', '2' );
+select json_merge( '1', '[2, 3]' );
+select json_merge( '[1, 2]', '3' );
+select json_merge( '1', '{ "a": 2 }' );
+select json_merge( '{ "a": 2 }', '1' );
+select json_merge( '[1, 2]', '[3, 4]' );
+select json_merge( '{ "a": 2 }', '{ "b": 3}' );
+select json_merge( '[1, 2]', '{ "a": 2 }' );
+select json_merge( '{ "a": 2 }', '[1, 2]' );
+
+select json_merge( '{"a": 1, "b": 2 }', '{"b": 3, "d": 4 }' );
+select json_merge( '{"a": 1, "b": 2 }', '{"b": [3, 4], "d": 4 }' );
+select json_merge( '{"a": 1, "b": [2, 3] }', '{"b": 4, "d": 4 }' );
+select json_merge( '{"a": 1, "b": 2 }', '{"b": {"e": 7, "f": 8}, "d": 4 }' );
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": 2 }' );
+select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": [10, 11], "d": 4 }' );
+select json_merge( '{"a": 1, "b": [2, 9] }', '{"b": {"e": 7, "f": 8}, "d": 4 }' );
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{"a": 1, "b": [2, 9] }' );
+select json_merge( '{"b": {"e": 7, "f": 8}, "d": 4 }', '{ "a": 1, "b": {"e": 20, "g": 21 } }' );
+
+select json_merge( '1', '2', '3' );
+select json_merge( '[1, 2 ]', '3', '[4, 5]' );
+select json_merge
+(
+ '{ "a": true, "b": { "c": 3, "d": 4 }, "e": [ 1, 2 ] }',
+ '{ "d": false, "b": { "g": 3, "d": 5 }, "f": [ 1, 2 ] }',
+ '{ "m": true, "b": { "h": 8, "d": 4 }, "e": [ 3, 4 ] }'
+);
+
+# examples from the wl7909 spec
+# returns [{"a": "foo", "b": [true, {"c": 123}]}, 5, 6]
+SELECT JSON_MERGE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '[ 5, 6]'
+);
+
+# returns {"a": "foo", "b": [true, {"c": 123}, false, 34]}
+SELECT JSON_MERGE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '{ "b": [ false, 34 ] }'
+);
+
+# returns {"a": "foo", "b": [true, {"c": 123}, "bar"]}
+SELECT JSON_MERGE
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '{ "b": "bar" }'
+);
+
+# returns {"a": {"b": 1, "c": 1}}
+SELECT JSON_MERGE
+(
+ '{ "a" : { "b" : 1 } }',
+ '{ "a" : { "c" : 1 } }'
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_TYPE function.
+--echo # ----------------------------------------------------------------------
+
+# negative test
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_type('abc');
+
+#select i, json_type(j) from t1;
+select json_type('{"a": 2}');
+select json_type('[1,2]');
+select json_type('"scalar string"');
+select json_type('true');
+select json_type('false');
+select json_type('null');
+select json_type('1');
+select json_type('-0');
+select json_type('-0.0');
+--echo error ER_INVALID_TYPE_FOR_JSON
+select json_type(-1);
+--echo error ER_INVALID_TYPE_FOR_JSON
+select json_type(CAST(1 AS UNSIGNED));
+select json_type('32767');
+--echo error ER_INVALID_TYPE_FOR_JSON
+select json_type(PI());
+select json_type('3.14');
+
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_type(CAST(CAST('2015-01-15' AS DATE) as CHAR CHARACTER SET 'utf8'));
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of CAST(literal AS JSON)
+--echo # ----------------------------------------------------------------------
+select json_type(cast(cast('2014-11-25 18:00' as datetime) as json));
+select json_type(cast(cast('2014-11-25' as date) as json));
+select json_type(cast(cast('18:00:59' as time) as json));
+# select json_type(cast(cast('2014-11-25 18:00' as timestamp) as json)); -- cast target type not supported
+
+# select json_type(cast(cast('1999' as year) as json)); -- cast target type not supported
+select json_type(cast(127 as json));
+select json_type(cast(255 as json));
+select json_type(cast(32767 as json));
+select json_type(cast(65535 as json));
+select json_type(cast(8388607 as json));
+select json_type(cast(16777215 as json));
+select json_type(cast(2147483647 as json));
+select json_type(cast(4294967295 as json));
+select json_type(cast(9223372036854775807 as json));
+select json_type(cast(18446744073709551615 as json));
+select json_type(cast(true as json));
+select json_type(cast(b'10101' as json));
+
+select json_type(cast(cast(3.14 as decimal(5,2)) as json));
+select json_type(cast(3.14 as json));
+select json_type(cast(3.14E30 as json));
+# select json_type(cast(cast(3.14 as numeral(5,2)) as json)); -- cast target type not supported
+
+# select json_type(cast(cast(3.14 as double) as json)); -- cast target type not supported
+# select json_type(cast(cast(3.14 as float) as json)); -- cast target type not supported
+
+# select json_type(cast(cast(b'10101' as bit(10)) as json)); -- cast target type not supported
+# select json_type(cast(cast('10101abcde' as blob) as json)); -- cast target type not supported
+select json_type(cast(cast('10101abcde' as binary) as json));
+
+# select json_type(cast(cast('a' as enum('a','b','c')) as json)); -- cast target type not supported
+# select json_type(cast(cast('a,c' as set('a','b','c')) as json)); -- cast target type not supported
+
+select json_type(cast(ST_GeomFromText('POINT(1 1)') as json));
+select json_type(cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json));
+select json_type(cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json));
+select json_type(cast(null as json));
+select json_type(cast(null as json)) is null; # check that it is an SQL NULL
+select json_type(null) is null; # is an SQL NULL
+
+#
+# same, but now show the printable value:
+#
+select cast(cast('2014-11-25 18:00' as datetime) as json);
+select cast(cast('2014-11-25' as date) as json);
+select cast(cast('18:00:59' as time) as json);
+# select cast(cast('2014-11-25 18:00' as timestamp) as json); -- cast target type not supported
+
+# select cast(cast('1999' as year) as json); -- cast target type not supported
+select cast(127 as json);
+select cast(255 as json);
+select cast(32767 as json);
+select cast(65535 as json);
+select cast(8388607 as json);
+select cast(16777215 as json);
+select cast(2147483647 as json);
+select cast(4294967295 as json);
+select cast(9223372036854775807 as json);
+select cast(18446744073709551615 as json);
+select cast(true as json);
+select cast(b'10101' as json);
+
+select cast(cast(3.14 as decimal(5,2)) as json);
+select cast(3.14 as json);
+select cast(3.14e0 as json);
+# select cast(cast(3.14 as numeral(5,2)) as json); -- cast target type not supported
+
+# select cast(cast(3.14 as double) as json); -- cast target type not supported
+# select cast(cast(3.14 as float) as json); -- cast target type not supported
+
+# select cast(cast(b'10101' as bit(10) as json); -- cast target type not supported
+# select cast(cast('10101abcde' as blob) as json); -- cast target type not supported
+select cast(cast('10101abcde' as binary) as json);
+
+# select cast(cast('a' as enum('a','b','c') as json); -- cast target type not supported
+# select cast(cast('a,c' as set('a','b','c') as json); -- cast target type not supported
+
+select cast(ST_GeomFromText('POINT(1 1)') as json);
+select cast(ST_GeomFromText('LINESTRING(0 0,1 1,2 2)') as json);
+select cast(ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
+ (5 5,7 5,7 7,5 7, 5 5))') as json);
+select cast(null as json);
+select cast(null as json) is null; # check that it is an SQL NULL
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_KEYS function.
+--echo # ----------------------------------------------------------------------
+# should all give NULL:
+select json_keys(NULL);
+select json_keys(NULL, '$.b');
+select json_keys(NULL, NULL);
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a');
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', NULL);
+
+# non NULL results
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}');
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.b');
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_keys('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*.b');
+
+# Examples from the specification
+--echo # returns [ "a", "b" ]
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }');
+
+--echo # returns []
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+ '$.b[1].c');
+
+--echo # returns NULL
+SELECT JSON_KEYS('{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+ '$.a.b[2]');
+
+--echo error ER_INVALID_JSON_PATH
+SELECT JSON_KEYS('{"a":1}', '1010');
+--echo error ER_INVALID_JSON_PATH
+SELECT JSON_KEYS('{"a":1}', '1010') IS NULL;
+
+# examples from the wl7909 spec
+# returns [ "a", "b" ]
+SELECT JSON_KEYS
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }'
+);
+
+# returns []
+SELECT JSON_KEYS
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+ '$.b[1].c'
+);
+
+# returns NULL
+SELECT JSON_KEYS
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : {} } ] }',
+ '$.a.b[2]'
+);
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_KEYS();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_KEYS('{}', '$', '$');
+
+--echo # ----------------------------------------------------------------------
+--echo # CAST(<json> AS CHAR). See also 'json_conversions.test' for other
+--echo # conversion tests.
+--echo # ----------------------------------------------------------------------
+select cast(json_keys('{"a": 1}') as char);
+select cast(cast(1 as json) as char);
+select cast(json_keys(NULL) as char);
+#select cast(j as char) from keys1;
+
+--echo # ----------------------------------------------------------------------
+--echo # Path matching with double-quotes
+--echo # ----------------------------------------------------------------------
+
+# matches
+select json_extract( '{ "one potato" : 1 }', '$."one potato"' );
+# matches
+select json_extract( '{ "a.b" : 1 }', '$."a.b"' );
+
+# doesn't match
+select json_extract( '{ "\\"a\\"": 1}', '$."a"' );
+# matches
+select json_extract( '{ "\\"a\\"": 1}', '$."\\"a\\""' );
+# matches
+select json_extract( '{ "a": 1}', '$."a"' );
+# matches
+select json_extract( '{ "a": 1}', '$.a' );
+
+# examples from functional spec section on Path Syntax
+
+# [3, 2]
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0]' );
+# 2
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[0][1]' );
+# [ { "c": "d" }, 1 ]
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1]' );
+# { "c": "d" }
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0]' );
+# "d"
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.a[1][0].c' );
+# 7
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."one potato"' );
+# 6
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$.b.c' );
+# 8
+select json_extract( '{ "a": [ [ 3, 2 ], [ { "c" : "d" }, 1 ] ], "b": { "c" : 6 }, "one potato": 7, "b.c" : 8 }', '$."b.c"' );
+
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_EXTRACT function.
+--echo # ----------------------------------------------------------------------
+
+# errors
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_extract(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_extract('$.b');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}');
+
+# Confused argument order
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_extract('$.a', '{"a": 1, "b": {"e": "foo", "b": 3}}');
+
+# NULLs
+select json_extract(NULL, '$.b');
+select json_extract(NULL, NULL);
+
+# non-NULLs
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a');
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.*');
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', '$.b.e');
+select json_extract('{"a": 1, "b": [1,2,3]}', '$.b[2]');
+# one path is NULL
+select json_extract('{"a": 1, "b": {"e": "foo", "b": 3}}', '$.a', NULL);
+
+# Examples from the specification
+--echo # returns a JSON value containing just the string "123"
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+ '$.b[ 1 ].c');
+
+--echo # returns a JSON value containing just the number 123
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c');
+
+--echo # raises an error because the document is not valid
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('{ "a" : [ }',
+ '$.b[ 1 ].c');
+
+--echo # raises an error because the path is invalid
+--echo error ER_INVALID_JSON_PATH
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].');
+
+--echo # returns a JSON value containing the number 123 (because of
+--echo # auto-wrapping the scalar)
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c[ 0 ]');
+--echo # returns a JSON value containing the object because of auto-wrapping
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : {"not array": 4} } ] }',
+ '$.b[ 1 ].c[ 0 ]');
+
+--echo # returns null because the path, although valid, does not identify a value
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c[ 1 ]');
+
+--echo # returns a JSON value containing the number 123 (due to normalization)
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.b[ 1 ].c');
+
+--echo # returns a JSON array [ "foo", true ]
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.a', '$.b[0]');
+
+--echo # returns a JSON array [ true ]
+SELECT JSON_EXTRACT('{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.d', '$.b[0]');
+
+# some examples verifying ellipsis behavior
+
+# should have same result
+select json_extract( '[1]', '$[0][0]' );
+select json_extract( '[1]', '$**[0]' );
+
+# should have same result
+select json_extract( '{ "a": 1 }', '$.a[0]' );
+select json_extract( '{ "a": 1 }', '$**[0]' );
+
+# should have same result
+select json_extract( '{ "a": 1 }', '$[0].a' );
+select json_extract( '{ "a": 1 }', '$**.a' );
+
+# should have same result
+select json_extract( '{ "a": 1 }', '$[0].a[0]' );
+select json_extract( '{ "a": 1 }', '$**[0]' );
+
+# should have the same result
+select json_extract( '{ "a": 1 }', '$[0].a' );
+select json_extract( '{ "a": 1 }', '$**.a' );
+select json_extract( '{ "a": 1 }', '$[0][0].a' );
+select json_extract( '{ "a": 1 }', '$[0][0][0].a' );
+
+# should have the same result
+SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]', '$**.a.*');
+SELECT JSON_EXTRACT('[1, [[{"x": [{"a":{"b":{"c":42}}}]}]]]',
+ '$[1][0][0].x[0].a.*');
+
+# examples from the wl7909 spec
+# returns a JSON value containing just the string "123"
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : "123" } ] }',
+ '$.b[ 1 ].c'
+);
+
+# returns a JSON value containing just the number 123
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c'
+);
+
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT
+(
+ '{ "a" : [ }',
+ '$.b[ 1 ].c'
+);
+
+--echo error ER_INVALID_JSON_PATH
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].'
+);
+
+# returns a JSON value containing the number 123 (because of auto-wrapping)
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c[ 0 ]'
+);
+
+# returns null because the path, although valid, does not identify a value
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123 } ] }',
+ '$.b[ 1 ].c[ 1 ]'
+);
+
+# returns a JSON value containing the number 123 (due to normalization)
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.b[ 1 ].c'
+);
+
+# returns a JSON array ["foo", true]
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.a', '$.b[0]'
+);
+
+# returns a the 'true' literal
+SELECT JSON_EXTRACT
+(
+ '{ "a" : "foo", "b" : [ true, { "c" : 123, "c" : 456 } ] }',
+ '$.d', '$.b[0]'
+);
+
+# should return NULL
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].b' ) jdoc;
+
+# should return NULL
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].b' ) jdoc;
+
+# should return 1
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[0].a' ) jdoc;
+
+# should return [1, 2]
+select json_extract( '[ { "a": 1 }, { "a": 2 } ]', '$[*].a' ) jdoc;
+
+# should return [1]
+select json_extract( '[ { "a": 1 }, { "b": 2 } ]', '$[*].a' ) jdoc;
+
+# should return [3, 4]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a' ) jdoc;
+
+# should return [[3, 4]]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[*].a' ) jdoc;
+
+# should return [[3, 4]]
+select json_extract( '[ { "a": [3,4] }, { "b": 2 } ]', '$[0].a', '$[1].a' ) jdoc;
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_ARRAY_APPEND function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_array_append(NULL, '$.b', cast(1 as json));
+select json_array_append('[1,2,3]', NULL, cast(1 as json));
+select json_array_append('[1,2,3]', '$', NULL);
+
+# wrong # args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_append(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_append(NULL, NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_append(NULL, NULL, NULL, NULL);
+
+# auto-wrap
+SELECT JSON_ARRAY_APPEND(cast('1' as json), '$', 3);
+SELECT JSON_ARRAY_APPEND(cast('{"a": 3}' as json), '$', 3);
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append(cast('{"a": {"b": [3]}}' as json), '$**[0]', 6);
+
+# Examples from the specification
+
+--echo # Auto-wrapping, since because the paths identify scalars.
+--echo # should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]}
+SELECT JSON_ARRAY_APPEND('{"a": "foo", "b": "bar", "c": "wibble"}',
+ '$.b', cast(4 as json),
+ '$.c', cast('"grape"' as json));
+
+--echo # should return {"a": "foo", "b": [1, 2, 3, 4],
+--echo # "c": ["apple", "pear", "grape"]}
+SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+ '$.b', cast(4 as json),
+ '$.c', cast('"grape"' as json));
+
+# without CAST: cf. not required for ANY_JSON_ATOM arguments in specification
+SELECT JSON_ARRAY_APPEND('{"a" : "foo","b": [1, 2, 3], "c": ["apple", "pear"]}',
+ '$.b', 4,
+ '$.c', 'grape');
+
+# wild cards, multiple pairs
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append( '[[], [], []]', '$[*]', 3, '$[*]', 4);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_array_append( '[[], "not array", []]', '$[*]', 3, '$[*]', 4);
+
+# examples from wl7909 spec
+# should return {"a": "foo", "b": ["bar", 4], "c": ["wibble", "grape"]} due to autowrapping
+SELECT JSON_ARRAY_APPEND
+(
+ '{ "a" : "foo", "b" : "bar", "c" : "wibble" }',
+ '$.b', 4,
+ '$.c', "grape"
+);
+
+# should return {"a": "foo", "b": [1, 2, 3, 4], "c": ["apple", "pear", "grape"]}
+SELECT JSON_ARRAY_APPEND
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ "apple", "pear" ] }',
+ '$.b', 4,
+ '$.c', "grape"
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Bug#21373874 ASSERTION `PARENT' FAILED
+--echo # ----------------------------------------------------------------------
+
+select json_array_append('{"a":1}', '$[0]', 100);
+select json_array_append('3', '$[0]', 100);
+select json_array_append('3', '$[0][0][0][0]', 100);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_INSERT function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_insert(NULL, '$.b', cast(1 as json));
+select json_insert('[1,2,3]', NULL, cast(1 as json));
+select json_insert('[1,2,3]', '$[3]', NULL);
+
+# wrong # args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_insert(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_insert(NULL, NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_insert(NULL, NULL, NULL, NULL);
+
+# positive test cases
+
+select json_insert('[1,2,3]', '$[2]', 4);
+select json_insert('[1,2,3]', '$[3]', 4);
+select json_insert('[1,2,3]', '$[10]', 4);
+
+select json_insert('{"c":4}', '$.c', 4);
+select json_insert('{"c":4}', '$.a', 4);
+
+select json_insert('1', '$', 4);
+select json_insert('1', '$[0]', 4);
+select json_insert('1', '$[1]', 4);
+select json_insert('1', '$[10]', '4', '$[11]', 5);
+
+select json_insert('[1,2,3]', '$[2][0]', 4);
+select json_insert('[1,2,3]', '$[2][2]', 4);
+
+select json_insert('{"a": 3}', '$.a[0]', 4);
+select json_insert('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+
+# wild card & auto-wrap (scalars)
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": [1], "b": 2}' as json), '$.*[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": 1, "b": 2}' as json), '$.*[1]', 6);
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": 3}}' as json), '$.a.*[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": [3]}}' as json), '$.a.*[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": 3}}' as json), '$**[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6);
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1]' as json), '$[*][1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1]' as json), '$**[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1, [2], 3]' as json), '$[*][1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[1, [2], 3]' as json), '$**[1]', 6);
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[[1]]' as json), '$[*][1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert(cast('[[1]]' as json), '$**[1]', 6);
+
+# auto-wrap object
+select json_insert(cast('{"a": 3}' as json), '$[1]', 6);
+
+
+# Examples from the specification
+
+# returns the original document because the path does exist
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a', true);
+
+# inserts a number, returns '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : 123 }
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', 123);
+
+# inserts a string, returns '{ "a" : "foo", "b" : [ 1, 2, 3 ], "c" : "123" }
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.c', '123');
+
+# returns '{ "a" : [ "foo", true ], "b" : [ 1, 2, 3 ] }'
+SELECT JSON_INSERT('{ "a" : "foo", "b" : [ 1, 2, 3 ] }', '$.a[1]', true);
+
+# should return { "a" : "foo", "b": true }
+SELECT JSON_INSERT('{ "a" : "foo"}', '$.b', true, '$.b', false);
+
+# examples from the wl7909 spec
+# returns the original document because the path does exist
+SELECT JSON_INSERT
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a',
+ true
+);
+
+# inserts a number, returns '{"a": "foo", "b": [1, 2, 3], "c": 123}
+SELECT JSON_INSERT
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ 123
+);
+
+# inserts a string, returns '{"a": "foo", "b": [1, 2, 3], "c": "123"}
+SELECT JSON_INSERT
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ '123'
+);
+
+# returns '{"a": ["foo", true], "b": [1, 2, 3]}'
+SELECT JSON_INSERT
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a[1]',
+ true
+);
+
+# returns {"a": "foo", "b": true}
+SELECT JSON_INSERT
+(
+ '{ "a" : "foo"}',
+ '$.b', true,
+ '$.b', false
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_ARRAY_INSERT function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_array_insert(NULL, '$.b[1]', 1);
+select json_array_insert('[1,2,3]', NULL, 1);
+select json_array_insert('[1,2,3]', '$[3]', NULL);
+
+# wrong # args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_insert(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_insert(NULL, NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_array_insert(NULL, NULL, NULL, NULL);
+
+# path does not indicate a cell position
+--echo error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$', 1);
+--echo error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$.a', 1);
+--echo error ER_INVALID_JSON_PATH_ARRAY_CELL
+select json_array_insert('true', '$.a[1].b', 1);
+
+# nop if there is no array at the path's parent
+select json_array_insert( 'true', '$[0]', false );
+select json_array_insert( 'true', '$[1]', false );
+select json_array_insert( '{ "a": true }', '$.a[0]', false );
+select json_array_insert( '{ "a": true }', '$.a[1]', false );
+
+# positive tests
+select json_array_insert( '[]', '$[0]', false );
+select json_array_insert( '[]', '$[1]', false );
+select json_array_insert( '[true]', '$[0]', false );
+select json_array_insert( '[true]', '$[1]', false );
+select json_array_insert( '[true]', '$[2]', false );
+select json_array_insert( '{ "a": [] }', '$.a[0]', false );
+select json_array_insert( '{ "a": [] }', '$.a[1]', false );
+select json_array_insert( '{ "a": [true] }', '$.a[0]', false );
+select json_array_insert( '{ "a": [true] }', '$.a[1]', false );
+select json_array_insert( '{ "a": [true] }', '$.a[2]', false );
+
+# insert into the middle of an array
+select json_array_insert( '[1, 2, 3, 4]', '$[0]', false );
+select json_array_insert( '[1, 2, 3, 4]', '$[1]', false );
+select json_array_insert( '[1, 2, 3, 4]', '$[2]', false );
+select json_array_insert( '[1, 2, 3, 4]', '$[3]', false );
+select json_array_insert( '[1, 2, 3, 4]', '$[4]', false );
+select json_array_insert( '[1, 2, 3, 4]', '$[5]', false );
+
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[0]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[1]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[2]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[3]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[4]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.a[5]', false );
+
+# nop
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[0]', false );
+select json_array_insert( '{ "a": [1, 2, 3, 4] }', '$.b[1]', false );
+
+# no auto-wrapping
+select json_array_insert( '"a"', '$[0]', true );
+select json_array_insert( '[ "a" ]', '$[0][0]', true );
+select json_array_insert( '"a"', '$[1]', true );
+
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$.a.*[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$**[1]', 6);
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_insert('[]', '$[*][1]', 6);
+
+# multiple paths,
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]', true, '$[1]', false );
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]',
+ cast( '[ "a", "b", "c", "d" ]' as json ), '$[1][2]', false );
+
+# test an error while evaluating the document expression
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_ARRAY_INSERT(JSON_EXTRACT('[1', '$'), '$[0]', 1);
+
+# error in reading new value
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+select json_array_insert( '[ 1, 2, 3 ]', '$[1]', json_extract( '[', '$' ) );
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_SET function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_set(NULL, '$.b', cast(1 as json));
+select json_set('[1,2,3]', NULL, cast(1 as json));
+select json_set('[1,2,3]', '$[3]', NULL);
+
+# wrong # args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_set(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_set(NULL, NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_set(NULL, NULL, NULL, NULL);
+
+# Detect errors in nested function calls.
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_SET('{}', '$.name', JSON_EXTRACT('', '$'));
+
+# positive test cases
+
+select json_set('[1,2,3]', '$[2]', 4);
+select json_set('[1,2,3]', '$[3]', 4);
+select json_set('[1,2,3]', '$[10]', 4);
+
+select json_set('{"c":4}', '$.c', 5);
+select json_set('{"c":4}', '$.a', 5);
+
+select json_set('1', '$', 4);
+select json_set('1', '$[0]', 4);
+select json_set('1', '$[1]', 4);
+select json_set('1', '$[10]', '4', '$[11]', 5);
+
+select json_set('[1,2,3]', '$[2][0]', 4);
+select json_set('[1,2,3]', '$[2][2]', 4);
+
+select json_set('{"a": 3}', '$.a[0]', 4);
+select json_set('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+
+# auto-wrap plus ellipsis with nested hits should give: {"a": [{"b": [3, 6]}, 6]}
+--echo error ER_INVALID_JSON_PATH_WILDCARD
+select json_set(cast('{"a": {"b": [3]}}' as json), '$**[1]', 6);
+
+# Examples from the specification: Include when missing functions are
+# available.
+
+# returns { "a" : {}, "b" : [ 1, 2, 3 ] }
+ SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a',
+ JSON_OBJECT());
+
+# # returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] }
+# SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+# '$.c',
+# JSON_ARRAY( true, false ));
+
+# # returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] }
+# SELECT JSON_SET('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+# '$.c',
+# JSON_ARRAY( CAST( 'true' AS JSON ), CAST( 'false' AS JSON ) ));
+
+# # returns [ 1, null, null, 2 ]
+# SELECT JSON_SET('1', '$[3]', 2);
+
+# should return { "a": { "b": false, "c": true } }
+SELECT JSON_SET('{ "a" : "foo"}', '$.a',
+ JSON_OBJECT( 'b', false ), '$.a.c', true);
+
+# returns { "a" : {}, "b" : [ 1, 2, 3 ] }
+select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a',
+ cast('{}' as json));
+
+# returns { "a" : "foo", "b" : [ 1, 2, 3 ], "c" : [ true, false ] }
+select json_set('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ cast('[true, false]' as json));
+
+# returns [ 1, null, null, 2 ]
+select json_set('1', '$[3]', 2);
+
+# should return { "a": { "b": false, "c": true } }
+select json_set('{ "a" : "foo"}', '$.a',
+ cast('{"b": false}' as json), '$.a.c', true);
+
+# examples from wl7909 spec
+# returns {"a": {}, "b": [1, 2, 3]}
+SELECT JSON_SET
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a',
+ JSON_OBJECT()
+);
+
+# returns {"a": "foo", "b": [1, 2, 3], "c": [true, false]}
+SELECT JSON_SET
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ JSON_ARRAY( true, false )
+);
+
+# returns {"a": "foo", "b": [1, 2, 3], "c": [true, false]}
+SELECT JSON_SET
+(
+ '{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ JSON_ARRAY( CAST( 'true' AS JSON ), CAST( 'false' AS JSON ) )
+);
+
+# returns [1, 2]
+SELECT JSON_SET
+(
+ '1',
+ '$[3]',
+ 2
+);
+
+# returns {"a": {"b": false, "c": true}}
+SELECT JSON_SET
+(
+ '{ "a" : "foo"}',
+ '$.a', JSON_OBJECT( 'b', false ),
+ '$.a.c', true
+);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_REPLACE function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_replace(NULL, '$.b', cast(1 as json));
+select json_replace('[1,2,3]', NULL, cast(1 as json));
+select json_replace('[1,2,3]', '$[2]', NULL);
+
+# wrong # args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_replace(NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_replace(NULL, NULL);
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_replace(NULL, NULL, NULL, NULL);
+
+# positive test cases
+
+select json_replace('[1,2,3]', '$[2]', 4);
+select json_replace('[1,2,3]', '$[3]', 4);
+select json_replace('[1,2,3]', '$[10]', 4);
+
+select json_replace('{"c":4}', '$.c', 5);
+select json_replace('{"c":4}', '$.a', 5);
+
+select json_replace('1', '$', 4);
+select json_replace('1', '$[0]', 4);
+select json_replace('1', '$[1]', 4);
+select json_replace('1', '$[10]', '4', '$[11]', 5);
+
+select json_replace('[1,2,3]', '$[2][0]', 4);
+select json_replace('[1,2,3]', '$[2][2]', 4);
+
+select json_replace('{"a": 3}', '$.a[0]', 4);
+select json_replace('{"a": 3}', '$.a[1]', 4, '$.a[2]', '5');
+
+
+# Examples from the specification
+
+# returns the original document because the path doesn't exist
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.c',
+ true);
+
+# returns '{ "a" : true, "b" : [ 1, 2, 3 ] }'
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.a[0]',
+ true);
+
+# returns the original document because the path doesn't exist
+SELECT JSON_REPLACE('{ "a" : "foo", "b" : [ 1, 2, 3 ] }',
+ '$.b[5]',
+ true);
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_ARRAY function.
+--echo # ----------------------------------------------------------------------
+
+# NULLs
+select json_array(NULL, '$.b', cast(1 as json));
+select json_array('[1,2,3]', NULL, cast(1 as json));
+select json_array('[1,2,3]', '$[3]', NULL);
+
+
+# positive test cases
+select json_array();
+select json_array(3.14);
+select json_array('[1,2,3]');
+select json_array(cast('[1,2,3]' as json));
+select json_array(1,2,3);
+select json_array(b'0', b'1', b'10');
+
+# returns the empty array: []
+SELECT JSON_ARRAY();
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_OBJECT function.
+--echo # ----------------------------------------------------------------------
+
+# odd number of args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_object( 'a' );
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_object( 'a', 1, 'b' );
+
+# null arg
+--echo error ER_JSON_DOCUMENT_NULL_KEY
+select json_object( null, 1 );
+
+# positive tests
+select json_object();
+select json_object( 'a', null );
+select json_object( 'a', 1 );
+select json_object( 'a', 1, 'b', 'foo' );
+select json_object( 'a', 1, 'b', 'foo', 'c', cast( '{ "d": "wibble" }' as json ) );
+select json_object( 'a', true, 'b', false, 'c', cast( 'null' as json) );
+select json_valid( json_object( '"a"', 1 ) );
+
+# long key
+select json_object( REPEAT('a', 64 * 1024), 1 );
+
+# non-string keyNames are cast to CHAR
+select json_object(json_array(), json_array());
+select json_object( cast(json_array() as char), json_array());
+
+select json_object( 1, json_array());
+select json_object( cast(1 as char), json_array());
+
+# returns the empty object: {}
+SELECT JSON_OBJECT();
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_SEARCH function.
+--echo # ----------------------------------------------------------------------
+
+# wrong number of args
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_search();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_search( '{ "a": true }' );
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_search( '{ "a": true }', 'one' );
+
+# null args
+select json_search( null, 'one', 'foo' );
+select json_search( '{ "a": "foo" }', null, 'foo' );
+# FIXME. what should happen here?
+#select json_search( '{ "a": "foo" }', 'one', null );
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, null );
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$.a', null );
+
+# bad values for the oneOrAll arg
+--echo error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_search( '{ "a": "foo" }', 'twof', 'foo' );
+--echo error ER_JSON_BAD_ONE_OR_ALL_ARG
+select json_search( '{ "a": "foo" }', 'two', 'foo' );
+
+# bad escape arg
+--error ER_WRONG_ARGUMENTS
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' );
+
+# bad path args
+--echo error ER_INVALID_JSON_PATH
+select json_search( '{ "a": "foo" }', 'one', 'foo', null, '$a' );
+--echo error ER_INVALID_JSON_PATH
+select json_search( '{ "a": "foo" }', 'all', 'foo', null, '$.a', '$b' );
+
+--error ER_BAD_FIELD_ERROR
+select json_search(a, b, c);
+
+# simple tests for search without path arguments
+select json_search( '{ "a": "foobar" }', 'one', 'foo%' );
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'one', 'foo%' );
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'foo%' );
+select json_search( '{ "a": "foobar", "b": "focus", "c": [ "arm", "foot", "shoulder" ] }', 'all', 'f__us' );
+
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a' );
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'all', 'foo%', null, '$.a', '$.b' );
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'one', 'foo%', null, '$.a', '$.b' );
+
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ALL', 'foo%', null, '$.a' );
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'aLl', 'foo%', null, '$.a', '$.b' );
+select json_search( '{ "a": [ "foolish", "folly", "foolhardy" ], "b" : "fool" }', 'ONE', 'foo%', null, '$.a', '$.b' );
+
+# wildcards in the path expression
+select json_search
+(
+ '[ { "a": { "b": { "c": "fool" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "food"} } ]',
+ 'all',
+ 'foo%',
+ null,
+ '$**.c'
+);
+
+select json_search
+(
+ '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+ 'all',
+ 'sho%',
+ null,
+ '$**.c'
+);
+
+select json_search
+(
+ '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+ 'all',
+ 'sho%e',
+ null,
+ '$**.c'
+);
+
+select json_search
+(
+ '[ { "a": { "b": { "c": "showtime" } } }, { "b": { "c": "shoulder" } }, { "c": { "c": "shoe"} } ]',
+ 'all',
+ 'sho%',
+ null,
+ '$[*].c'
+);
+
+select json_search
+(
+ '[ { "a": { "b": { "c": "showtime" } } }, [ { "b": { "c": "shout" } }, { "c": { "c": "shoe"} } ] ]',
+ 'all',
+ 'sho%',
+ null,
+ '$[1]**.c'
+);
+
+# escape character
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo%bar' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]', '$[1]', '$[2]' );
+
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[0]' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo\%bar', null, '$[1]' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[0]' );
+select json_search( '[ "footbar", "foo%bar" ]', 'all', 'foo|%bar', '|', '$[1]' );
+
+# search is case-sensitive
+select json_search( '[ "abc", "ABC" ]', 'all', 'aBc' );
+select json_search( '[ "abc", "ABC" ]', 'all', 'abc' );
+select json_search( '[ "abc", "ABC" ]', 'all', 'ABC' );
+
+# only matches strings, not numerics
+select json_search( '[ 10, "10", 1.0, "1.0" ]', 'all', '1%' );
+
+# examples from the wl7909 spec
+# returns null because numeric values don't match string values
+SELECT JSON_SEARCH
+(
+ '{ "a" : 123, "b" : [ 123, 456 ] }',
+ 'one',
+ '123'
+);
+
+# returns "$.b[2]"
+SELECT JSON_SEARCH
+(
+ '{ "a" : "123", "b" : [ 123, "789", "123", "456", "123" ] }',
+ 'one',
+ '123',
+ null,
+ '$.b'
+);
+
+# could return either "$.a" or "$.b.key"
+SELECT JSON_SEARCH
+(
+ '{ "a" : "123", "b" : { "key" : "123" } }',
+ 'one',
+ '123'
+);
+
+# returns "$.b.key"
+SELECT JSON_SEARCH
+(
+ '{ "a" : "1243", "b" : { "key" : "1234" } }',
+ 'one',
+ '123%'
+);
+
+# returns "$.b.c"
+SELECT JSON_SEARCH
+(
+ '{ "a" : "1243", "b" : { "key" : "1234", "c": "directorysub%directoryabc" } }',
+ 'one',
+ 'dir%torysub@%dir%',
+ '@'
+);
+
+# returns null because the path doesn't exist
+SELECT JSON_SEARCH
+(
+ '{ "a" : "1243", "b" : { "key" : "1234" } }',
+ 'one',
+ '123%',
+ null,
+ '$.c'
+);
+
+# returns $."one potato"
+SELECT JSON_UNQUOTE
+(
+ JSON_SEARCH
+ (
+ '{ "onepotato": "foot", "one potato": "food" , "one \\"potato": "fool" }',
+ 'all',
+ 'food'
+ )
+);
+
+select json_type(case (null is null) when 1 then
+ cast('null' as json) else
+ cast('[1,2,3]' as json) end);
+
+select json_type(case (null is not null) when 1 then
+ cast('null' as json) else
+ cast('[1,2,3]' as json) end);
+
+select json_type( if(null is null,
+ cast('null' as json),
+ cast('[1,2,3]' as json)) );
+
+select json_type( if(null is not null,
+ cast('null' as json),
+ cast('[1,2,3]' as json)));
+
+select cast(json_extract(cast(concat('[', cast('["A",2]' as json), ']') as json),
+ '$[0][1]') as char) = 2;
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of aggregate function MAX, MIN.
+--echo # ----------------------------------------------------------------------
+
+select max(cast('[1,2,3]' as json));
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_QUOTE, JSON_UNQUOTE
+--echo # ----------------------------------------------------------------------
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_quote();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_quote('abc', 'def');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_quote(NULL, 'def');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_quote('abc', NULL);
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_unquote();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_unquote('"abc"', '"def"');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_unquote(NULL, 'def');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+select json_unquote('"abc"', NULL);
+
+select json_quote(NULL);
+select json_unquote(NULL);
+
+select json_quote('abc');
+select json_quote(convert('abc' using ascii));
+select json_quote(convert('abc' using latin1));
+select json_quote(convert('abc' using utf8));
+select json_quote(convert('abc' using utf8mb4));
+
+select json_unquote('abc'); # should do nothing
+
+select json_unquote('"abc"');
+select json_unquote(convert('"abc"' using ascii));
+select json_unquote(convert('"abc"' using latin1));
+select json_unquote(convert('"abc"' using utf8));
+select json_unquote(convert('"abc"' using utf8mb4));
+
+select json_quote('"');
+select json_unquote('"'); # should do nothing
+
+--echo error ER_INCORRECT_TYPE
+select json_quote(123); # integer not allowed
+--echo error ER_INCORRECT_TYPE
+select json_unquote(123); # integer not allowed
+
+select json_unquote('""'); # empty string
+select char_length(json_unquote('""')); # verify empty string
+select json_unquote('"" '); # unchanged: no final "
+select json_unquote(cast(json_quote('abc') as json)); # round trip
+
+# No change in this JSON string: it is an object
+select cast('{"abc": "foo"}' as json);
+select json_unquote(cast('{"abc": "foo"}' as json));
+
+# This is a JSON string, so it is actually unquoted
+select json_extract(cast('{"abc": "foo"}' as json), '$.abc');
+select json_unquote(json_extract(cast('{"abc": "foo"}' as json), '$.abc'));
+
+# Bug fix: thse should be the same
+select json_unquote('["a", "b", "c"]');
+select json_unquote(cast('["a", "b", "c"]' as json));
+
+select charset(json_unquote('"abc"'));
+
+select json_quote(convert(X'e68891' using utf8)); # chinese "I" (wo3)
+select json_quote(convert(X'e68891' using utf8mb4)); # chinese "I" (wo3)
+
+select cast(json_quote(convert(X'e68891' using utf8)) as json);
+
+select json_unquote(convert(X'e68891' using utf8)); # chinese "I" (wo3)
+
+select json_quote(json_quote(json_quote('abc'))); # deep quote
+select json_unquote(json_unquote(json_unquote( # long round trip of it
+ json_quote(json_quote(json_quote('abc'))))));
+
+# DATE/TIME will lose their quotes, too:
+select cast(cast('2015-01-15 23:24:25' as datetime) as json);
+select json_unquote(cast(cast('2015-01-15 23:24:25' as datetime) as json));
+
+# as well as opaque values:
+select cast(st_geomfromtext('point(1 1)') as json);
+select json_unquote(cast(st_geomfromtext('point(1 1)') as json));
+
+# examples from the wl7909 spec
+# returns the SQL string literal abc
+SELECT JSON_UNQUOTE( '"abc"' );
+
+# returns the SQL string literal "abc
+SELECT JSON_UNQUOTE( '"abc' );
+
+--echo error ER_INCORRECT_TYPE
+SELECT JSON_UNQUOTE( 123 );
+
+# returns the SQL string literal abc
+SELECT JSON_UNQUOTE
+( CAST( CAST( '"abc"' AS JSON ) AS CHAR ) );
+
+# returns 1
+SELECT JSON_UNQUOTE
+(
+ CAST(
+ JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+ AS CHAR
+ )
+) = 'fred';
+
+# returns 0
+SELECT
+ CAST(
+ JSON_EXTRACT( '{ "userName" : "fred" }', '$.userName' )
+ AS CHAR
+ ) = 'fred';
+
+# returns "abc"
+SELECT JSON_QUOTE( 'abc' );
+
+--echo error ER_INCORRECT_TYPE
+SELECT JSON_QUOTE( 123 );
+
+# returns the JSON document consisting of the string scalar "123"
+SELECT CAST( JSON_QUOTE( '123' ) AS JSON );
+
+--echo # ----------------------------------------------------------------------
+--echo # Test of JSON_CONTAINS
+--echo # ----------------------------------------------------------------------
+
+--echo # should give NULL
+select json_contains(NULL, NULL);
+select json_contains(cast('{"a": 1, "b": 2}' as json), NULL);
+select json_contains(NULL, cast('null' as json));
+select json_contains(cast('[1]' as json), cast('[1]' as json), NULL);
+
+--echo # should give 0:
+select json_contains(cast(3.14 as json), cast(3 as json));
+
+--echo # should give 0: not at top level
+select json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json));
+
+--echo # but path argument will fix it:
+select json_contains(cast('{"a": {"b": 7}}' as json), cast('{"b": 7}' as json), '$.a');
+
+--echo # but arrays "introspect"
+select json_contains(cast('[1,[2.0, 3.0]]' as json), cast('[2.0]' as json));
+select json_contains(cast('[1, 2, [3, [4, 5]], 6, 7]' as json), cast('5' as json));
+
+--echo # should give 0: just a key
+select json_contains(cast('{"a": 1, "b": 2}' as json), cast('"a"' as json));
+
+--echo # should give 0: one candidate element doesn't match
+select json_contains(cast('[1]' as json), cast('[1,2]' as json));
+
+--echo # should all give 1
+select json_contains(cast('null' as json), cast('null' as json));
+--echo # simple object subset
+select json_contains(cast('{"a": 1, "b": 2}' as json), cast( '{"a": 1}' as json));
+--echo # simple vector subset
+select json_contains(cast('[1, 2, 3]' as json), cast('[1, 3]' as json));
+--echo # auto-wrap, should give 1
+select json_contains(cast('[1, 2, 3]' as json), cast(3 as json));
+--echo # ok even with nested cast off elements
+select json_contains(cast('{"person": {"id": 1, "country": "norway"}}' as json),
+ cast('{"person": {"country": "norway"}}' as json));
+--echo # vector reordering and duplicates is ok
+select json_contains(cast('[1,3,5]' as json), cast('[5,3,1,5]' as json));
+--echo # ok even with more elts in candidate than in doc
+select json_contains(cast('[{"b": 4, "a":7}]' as json), cast('[{"a":7},{"b":4}]' as json));
+select json_contains(cast('[{"b": 4, "a":7}, 5]' as json), cast('[5, {"a":7, "b":4}]' as json));
+--echo # ok even with mixed number types that compare equal
+select json_contains(cast('[{"b": 4, "a":7}, 5.0]' as json), cast('[5, {"a":7.0E0, "b":4}]' as json));
+
+# Bug discovered by Rick: used to give 1 (true).
+select json_contains( '{"customer": "cust3"}', '{"customer": "cust1"}' );
+
+SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[3],false]');
+SELECT JSON_CONTAINS('[null,1,[2,3],true,false]', '[null,1,[4],false]');
+SELECT JSON_CONTAINS('[true,false]', '[[true]]');
+SELECT JSON_CONTAINS('[1,2]', '[[1]]');
+SELECT JSON_CONTAINS('[1,2]', '1', '$.abc');
+SELECT JSON_CONTAINS('{}', '{}');
+SELECT JSON_CONTAINS('{}', '{"a":1}');
+SELECT JSON_CONTAINS('{"a":1}', '{"a":1,"b":2}');
+
+# examples from the wl7909 spec
+# returns 1
+SELECT JSON_CONTAINS
+(
+ CAST('[1, 4, 6]' AS JSON),
+ CAST('[1, 6]' AS JSON)
+);
+
+# returns 1; even with nested cast off elements
+SELECT JSON_CONTAINS
+(
+ CAST('{"person": {"id": 1, "country": "norway"}}' AS JSON),
+ CAST('{"person": {"country": "norway"}}' AS JSON)
+);
+
+# returns 1; reordering and duplicates are ok
+SELECT JSON_CONTAINS
+(
+ CAST('[1,3,5]' AS JSON),
+ CAST('[5,3,1,5]' AS JSON)
+);
+
+# return 0; no type conversion is performed
+SELECT JSON_CONTAINS
+(
+ CAST('[3.14]' AS JSON),
+ CAST('[3]' AS JSON)
+);
+
+# returns 1, due to auto-wrapping
+SELECT JSON_CONTAINS
+(
+ CAST('[1, 2, 3]' AS JSON),
+ CAST(3 AS JSON)
+);
+
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_CONTAINS();
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_CONTAINS('[1]');
+--error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
+SELECT JSON_CONTAINS('[1]', '[1]', '$', '$[0]');
+
+--echo # ----------------------------------------------------------------------
+--echo # Wrong collation from JSON_QUOTE caused problems: Set it in
+--echo # Item_func_json_quote::fix_length_and_dec. Bug found by Knut.
+--echo # Similar issue for JSON_UNQUOTE and JSON_TYPE.
+--echo # ----------------------------------------------------------------------
+select json_object("a", ifnull(json_quote('test'), cast('null' as json)));
+select cast(concat('[', json_quote('ab'), ']') as json);
+select cast(concat('[', json_unquote('"12"'), ']') as json);
+select cast(concat('["', json_type(cast(1 as json)), '"]') as json);
+
+--echo #
+--echo # Bug#20912438: ITEM_TYPE_HOLDER::DISPLAY_LENGTH(ITEM*): ASSERTION `0' FAILED
+--echo #
+(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55"}')) UNION ALL
+(SELECT JSON_KEYS('{ "key80": "2015-04-20 11:53:55" }') LIMIT 0);
+SELECT CAST(1 AS JSON) UNION ALL SELECT CAST(1 AS JSON);
+
+# Exercise NULL handling and error handling in Item_copy_json::copy().
+SELECT COUNT(*), CAST(NULL AS JSON);
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT COUNT(*), JSON_EXTRACT('not valid json!', '$');
+
+--echo # ----------------------------------------------------------------------
+--echo # Bug report from John E.
+--echo # Crash in Item_copy_json::~Item_copy_json
+--echo # ----------------------------------------------------------------------
+EXPLAIN SELECT COUNT(*), JSON_KEYS('{}');
+
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'a' );
+select json_search( '{ "a": "foo" }', 'one', 'foo', null );
+select json_search( '{ "a": "foo" }', 'one', 'foo', convert(x'f8' using latin1) );
+
+# bad escape arg
+--error ER_WRONG_ARGUMENTS
+select json_search( '{ "a": "foo" }', 'one', 'foo', 'ab' );
+
+--echo # ----------------------------------------------------------------------
+--echo # Wrong results when Json_path_cache primed is accessed
+--echo # during the prepare-phase.
+--echo #----------------------------------------------------------------------
+
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', null ) is null;
+
+prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', null ) is null';
+execute stmt1;
+
+--echo error ER_INVALID_JSON_PATH
+select json_remove( '[ 1, { "a": true, "b": false, "c": null }, 5 ]', '$.' ) is null;
+
+--echo error ER_INVALID_JSON_PATH
+prepare stmt1 from 'select json_remove( ''[ 1, { "a": true, "b": false, "c": null }, 5 ]'', ''$.'' ) is null';
+
+--echo # ----------------------------------------------------------------------
+--echo # Bug#20987329 VALUE OF PREPARED STATEMENT PLACEHOLDER FOR PARAMETER
+--echo # IN JSON_EXTRACT IS STICKY
+--echo #----------------------------------------------------------------------
+
+# should get different results with different parameter values
+
+# json_extract()
+
+# json_contains()
+
+prepare json_stmt1 FROM 'select json_contains( ''{ "keyA": [1, 2, 3], "keyB": [4, 5, 6] }'', ''[2]'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt1 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt1 USING @mypath;
+
+# json_contains_path()
+
+prepare json_stmt2 FROM 'select json_contains_path( ''{ "keyA": [1, 2, 3] }'', ''all'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt2 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt2 USING @mypath;
+
+# json_length()
+
+prepare json_stmt3 FROM 'select json_length( ''{ "keyA": [1, 2, 3], "keyB": [1, 2, 3, 4] }'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt3 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt3 USING @mypath;
+
+# json_keys()
+
+prepare json_stmt4 FROM 'select json_keys( ''[ { "keyA": true }, { "keyB": false } ]'', ? )';
+set @mypath = '$[0]';
+execute json_stmt4 USING @mypath;
+set @mypath = '$[1]';
+execute json_stmt4 USING @mypath;
+
+# json_array_append()
+
+prepare json_stmt5 FROM 'select json_array_append( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA';
+execute json_stmt5 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt5 USING @mypath;
+
+# json_insert()
+
+prepare json_stmt6 FROM 'select json_insert( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[2]';
+execute json_stmt6 USING @mypath;
+set @mypath = '$.keyB[2]';
+execute json_stmt6 USING @mypath;
+
+# json_set()
+
+prepare json_stmt7 FROM 'select json_set( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[2]';
+execute json_stmt7 USING @mypath;
+set @mypath = '$.keyB[2]';
+execute json_stmt7 USING @mypath;
+
+# json_replace()
+
+prepare json_stmt8 FROM 'select json_replace( ''{ "keyA": [1, 2], "keyB": [3, 4] }'', ?, 5 )';
+set @mypath = '$.keyA[1]';
+execute json_stmt8 USING @mypath;
+set @mypath = '$.keyB[1]';
+execute json_stmt8 USING @mypath;
+
+# json_search()
+
+prepare json_stmt9 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ''all'', ''foo%'', null, ? )';
+set @mypath = '$.keyA';
+execute json_stmt9 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt9 USING @mypath;
+
+# json_remove()
+
+prepare json_stmt10 FROM 'select json_remove( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ? )';
+set @mypath = '$.keyA';
+execute json_stmt10 USING @mypath;
+set @mypath = '$.keyB';
+execute json_stmt10 USING @mypath;
+
+# similar caching problem for the oneOrAll args
+
+prepare json_stmt11 FROM 'select json_contains_path( ''{ "keyA": true }'', ?, ''$.keyA'', ''$.keyB'' )';
+set @mypath = 'one';
+execute json_stmt11 USING @mypath;
+set @mypath = 'all';
+execute json_stmt11 USING @mypath;
+
+prepare json_stmt12 FROM 'select json_search( ''{ "keyA": [ "foot" ], "keyB": [ "food" ] }'', ?, ''foo%'' )';
+set @mypath = 'one';
+execute json_stmt12 USING @mypath;
+set @mypath = 'all';
+execute json_stmt12 USING @mypath;
+
+--echo #
+--echo # Bug#21128632 JSON_QUOTE(JSON_TYPE(...)) GIVES ERROR 3139 ER_INVALID_JSON_CHARSET
+--echo #
+
+select json_quote( json_type( json_object() ) );
+select json_quote( json_type( cast('{}' as json) ) );
+
+--echo #
+--echo # Bug#21148020 OUTPUT FROM JSON_TYPE() IS TRUNCATED
+--echo # WHEN EXECUTED IN A VIEW OR JOIN
+--echo #
+
+SELECT JSON_TYPE(JSON_OBJECT());
+CREATE VIEW v1 AS SELECT JSON_TYPE(JSON_OBJECT());
+SELECT * FROM v1;
+drop view v1;
+
+# SELECT JSON_TYPE(CAST(CAST('2015-05-25 11:23:55' AS DATETIME) AS JSON));
+# CREATE VIEW v2 AS SELECT JSON_TYPE(CAST(CAST('2015-05-25 11:23:55' AS
+# DATETIME) AS JSON));
+# SELECT * FROM v2;
+# drop view v2;
+
+--echo #
+--echo # Bug#21198333 SIG 6 IN ITEM_CACHE_JSON::CACHE_VALUE AT SQL/ITEM.CC:9470
+--echo #
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT MIN(JSON_EXTRACT('not json', '$'));
+
+--echo #
+--echo # Bug#21200657 DATA FROM DERIVED TABLE BASED
+--echo # ON JSN_QUOTE()/JSN_UNQUOTE() CALL IS TRUNCATED
+--echo #
+SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1;
+SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1;
+
+SELECT * FROM (SELECT JSON_QUOTE('This is a string that should not be truncated') AS field1) AS DERIVED_TABLE;
+SELECT * FROM (SELECT JSON_UNQUOTE("This is a string that should not be truncated") AS field1) AS DERIVED_TABLE;
+SELECT * FROM (SELECT JSON_UNQUOTE(JSON_QUOTE('This is a string that should not be truncated')) AS field1) AS DERIVED_TABLE;
+
+--echo #
+--echo # Bug#21296173 JSON_OBJECT('KEY', BOOLEAN_LITERAL) USES VALUES 0, 1
+--echo # FOR BOOL WHEN USED VIA VIEW
+--echo #
+
+SELECT JSON_OBJECT('key1', false, 'key2', true);
+SELECT JSON_ARRAY('key1', false, 'key2', true);
+CREATE VIEW v1 AS SELECT JSON_OBJECT('key1', false, 'key2', true);
+SELECT * FROM v1;
+CREATE VIEW v2 AS SELECT JSON_ARRAY('key1', false, 'key2', true);
+SELECT * FROM v2;
+
+drop view v1;
+drop view v2;
+
+--echo #
+--echo # Bug#21293089 JSON_CONTAINS() RETURNS WRONG RESULT WITH EMPTY JSON ARRAY
+--echo #
+SELECT JSON_CONTAINS('[]', '{"a" : 1}');
+SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, 5]');
+SELECT JSON_CONTAINS('[]', '[1, 2, 3, 4, {"a" : 1}]');
+SELECT JSON_CONTAINS('[]', '{"a" : [1, 2, 3, 4, 5]}');
+SELECT JSON_CONTAINS('[]', '[]');
+
+--echo #
+--echo # Bug#21377136 STACK OVERFLOW IN RAPIDJSON::GENERICREADER
+--echo #
+--echo error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('[', 100000));
+--echo error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('{"a":', 100000));
+--echo error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('{"a":[', 100000));
+--echo error ER_JSON_DOCUMENT_TOO_DEEP
+SELECT JSON_VALID(REPEAT('[{"a":', 100000));
+
+--echo #
+--echo # Bug#21381806 JSON: ASSERTION FAILED: ARG->NULL_VALUE
+--echo #
+SELECT JSON_SET(CASE WHEN 1 THEN NULL ELSE NULL END, '{}', '{}');
+SELECT JSON_VALID(CASE WHEN 1 THEN NULL ELSE NULL END);
+SELECT JSON_ARRAY(CASE WHEN 1 THEN NULL ELSE NULL END);
+
+--echo #
+--echo # Bug#21384048 ASSERTION FAILED: N >= 0 && N <= 308
+--echo # IN RAPIDJSON::INTERNAL::FASTPATH
+--echo #
+SELECT JSON_EXTRACT('-1E-36181012216111515851075235238', '$');
+SELECT JSON_EXTRACT('1E-36181012216111515851075235238', '$');
+SELECT JSON_EXTRACT('1E-325', '$');
+SELECT JSON_EXTRACT('1E-324', '$');
+SELECT JSON_EXTRACT('1E-323', '$');
+SELECT JSON_EXTRACT('1E+308', '$');
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('1E+309', '$');
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('1E+36181012216111515851075235238', '$');
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT JSON_EXTRACT('-1E+36181012216111515851075235238', '$');
+
+--echo #
+--echo # Bug#21383284: ASSERTION IN SELECT_LEX::SETUP_CONDS
+--echo #
+--error ER_WRONG_ARGUMENTS
+SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', 'too-long-escape');
+--echo error ER_INVALID_JSON_TEXT_IN_PARAM
+SELECT 1 FROM dual WHERE JSON_SEARCH('{}', 'one', 'foo', JSON_EXTRACT('', '$'));
+
+--echo #
+--echo # Bug#21442624 INCORRECT RESULT FROM JSON_SET WITH AUTO-WRAPPING
+--echo #
+
+SELECT JSON_SET('1', '$', 100);
+SELECT JSON_SET('1', '$[0]', 100);
+SELECT JSON_SET('1', '$[0][0]', 100);
+SELECT JSON_SET('1', '$[0][0][0]', 100);
+
+SELECT JSON_SET('[]', '$', 100);
+SELECT JSON_SET('[]', '$[0]', 100);
+SELECT JSON_SET('[]', '$[0][0]', 100);
+SELECT JSON_SET('[]', '$[0][0][0]', 100);
+
+SELECT JSON_SET('[1]', '$', 100);
+SELECT JSON_SET('[1]', '$[0]', 100);
+SELECT JSON_SET('[1]', '$[0][0]', 100);
+SELECT JSON_SET('[1]', '$[0][0][0]', 100);
+
+SELECT JSON_SET('[[1]]', '$', 100);
+SELECT JSON_SET('[[1]]', '$[0]', 100);
+SELECT JSON_SET('[[1]]', '$[0][0]', 100);
+SELECT JSON_SET('[[1]]', '$[0][0][0]', 100);
+
+SELECT JSON_SET('[[[1]]]', '$', 100);
+SELECT JSON_SET('[[[1]]]', '$[0]', 100);
+SELECT JSON_SET('[[[1]]]', '$[0][0]', 100);
+SELECT JSON_SET('[[[1]]]', '$[0][0][0]', 100);
+
+SELECT JSON_REPLACE('1', '$', 100);
+SELECT JSON_REPLACE('1', '$[0]', 100);
+SELECT JSON_REPLACE('1', '$[0][0]', 100);
+SELECT JSON_REPLACE('1', '$[0][0][0]', 100);
+
+SELECT JSON_REPLACE('[]', '$', 100);
+SELECT JSON_REPLACE('[]', '$[0]', 100);
+SELECT JSON_REPLACE('[]', '$[0][0]', 100);
+SELECT JSON_REPLACE('[]', '$[0][0][0]', 100);
+
+SELECT JSON_REPLACE('[1]', '$', 100);
+SELECT JSON_REPLACE('[1]', '$[0]', 100);
+SELECT JSON_REPLACE('[1]', '$[0][0]', 100);
+SELECT JSON_REPLACE('[1]', '$[0][0][0]', 100);
+
+SELECT JSON_REPLACE('[[1]]', '$', 100);
+SELECT JSON_REPLACE('[[1]]', '$[0]', 100);
+SELECT JSON_REPLACE('[[1]]', '$[0][0]', 100);
+SELECT JSON_REPLACE('[[1]]', '$[0][0][0]', 100);
+
+SELECT JSON_REPLACE('[[[1]]]', '$', 100);
+SELECT JSON_REPLACE('[[[1]]]', '$[0]', 100);
+SELECT JSON_REPLACE('[[[1]]]', '$[0][0]', 100);
+SELECT JSON_REPLACE('[[[1]]]', '$[0][0][0]', 100);
+
+
+--echo #
+--echo # Bug#21828321: JSON FUNCS CALL DBUG_ABORT OR EXIT() ON WINDOWS!
+--echo #
+# LEAST and GREATEST treat JSON arguments as strings for now. They used to hit
+# an assertion if used in a JSON context and all arguments were JSON values, or
+# a mix of NULLs and JSON values.
+SELECT JSON_ARRAY(LEAST(NULL, NULL), GREATEST(NULL, NULL), LEAST(j1, NULL),
+ GREATEST(NULL, j2), LEAST(j1, j2), GREATEST(j1, j2)) AS j
+FROM (SELECT CAST('1' AS JSON) AS j1, CAST('2' AS JSON) AS j2) t;
+
diff --git a/mysql-test/suite/parts/r/partition_repair_myisam.result b/mysql-test/suite/parts/r/partition_repair_myisam.result
index 3652698f634..6e99f1d3632 100644
--- a/mysql-test/suite/parts/r/partition_repair_myisam.result
+++ b/mysql-test/suite/parts/r/partition_repair_myisam.result
@@ -270,8 +270,8 @@ PARTITIONS 7;
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
33
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-partition rows
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
+partition rows_cnt
0 2
1 5
2 5
@@ -343,8 +343,8 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-partition rows
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
+partition rows_cnt
1 4
2 5
3 5
@@ -483,8 +483,8 @@ test.t1_will_crash repair status OK
SELECT COUNT(*) FROM t1_will_crash;
COUNT(*)
29
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
-partition rows
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
+partition rows_cnt
1 4
2 4
3 5
diff --git a/mysql-test/suite/parts/t/partition_repair_myisam.test b/mysql-test/suite/parts/t/partition_repair_myisam.test
index f7c503a8544..a21493ca03d 100644
--- a/mysql-test/suite/parts/t/partition_repair_myisam.test
+++ b/mysql-test/suite/parts/t/partition_repair_myisam.test
@@ -190,7 +190,7 @@ eval INSERT INTO t1_will_crash VALUES
('6 row 7 (crash before completely written to datafile)', 27, '$lt$lt');
--enable_query_log
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
# testing p0, p1, p3, p6(1)
@@ -216,7 +216,7 @@ OPTIMIZE TABLE t1_will_crash;
CHECK TABLE t1_will_crash;
REPAIR TABLE t1_will_crash;
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
FLUSH TABLES;
@@ -282,7 +282,7 @@ SET @@optimizer_switch=@save_optimizer_switch;
ALTER TABLE t1_will_crash CHECK PARTITION p6;
ALTER TABLE t1_will_crash REPAIR PARTITION p6;
SELECT COUNT(*) FROM t1_will_crash;
-SELECT (b % 7) AS `partition`, COUNT(*) AS rows FROM t1_will_crash GROUP BY (b % 7);
+SELECT (b % 7) AS `partition`, COUNT(*) AS rows_cnt FROM t1_will_crash GROUP BY (b % 7);
SELECT (b % 7) AS `partition`, b, a, length(c) FROM t1_will_crash ORDER BY `partition`, b, a;
ALTER TABLE t1_will_crash CHECK PARTITION all EXTENDED;
DROP TABLE t1_will_crash;
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
index 00cae145673..7b6e95bf718 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
@@ -4,7 +4,6 @@ connection server_1;
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
diff --git a/mysql-test/suite/rpl/r/rpl_killed_ddl.result b/mysql-test/suite/rpl/r/rpl_killed_ddl.result
index bb264a12af3..66309432efe 100644
--- a/mysql-test/suite/rpl/r/rpl_killed_ddl.result
+++ b/mysql-test/suite/rpl/r/rpl_killed_ddl.result
@@ -34,9 +34,9 @@ ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 DAY
DO INSERT INTO test.t1 VALUES (1);
CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC
RETURN 1;
-CREATE PROCEDURE p1 (OUT rows INT)
+CREATE PROCEDURE p1 (OUT rows_cnt INT)
BEGIN
-SELECT COUNT(*) INTO rows FROM t1;
+SELECT COUNT(*) INTO rows_cnt FROM t1;
END;
//
CREATE SERVER s1
@@ -125,9 +125,9 @@ connection master;
include/rpl_diff.inc
connection master;
connection master1;
-CREATE PROCEDURE p2 (OUT rows INT)
+CREATE PROCEDURE p2 (OUT rows_cnt INT)
BEGIN
-SELECT COUNT(*) INTO rows FROM t2;
+SELECT COUNT(*) INTO rows_cnt FROM t2;
END;
//
source include/kill_query.inc;
@@ -135,7 +135,7 @@ connection master;
include/rpl_diff.inc
connection master;
connection master1;
-ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
+ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows_cnt of table t1';
source include/kill_query.inc;
connection master;
include/rpl_diff.inc
diff --git a/mysql-test/suite/rpl/t/rpl_gtid_crash.test b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
index df3ba9a3420..b81cbd38cd3 100644
--- a/mysql-test/suite/rpl/t/rpl_gtid_crash.test
+++ b/mysql-test/suite/rpl/t/rpl_gtid_crash.test
@@ -12,11 +12,6 @@
call mtr.add_suppression("Checking table:");
call mtr.add_suppression("client is using or hasn't closed the table properly");
call mtr.add_suppression("Table .* is marked as crashed and should be repaired");
-# We have seen this warning a couple of times in Buildbot. Since we crash the
-# server deliberately, it seems possible that we could in rare cases crash in
-# the middle of a page write. The page is recovered from the doublewrite
-# buffer ("[Note] InnoDB: Recovered the page from the doublewrite buffer.").
-call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
flush tables;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
diff --git a/mysql-test/suite/rpl/t/rpl_killed_ddl.test b/mysql-test/suite/rpl/t/rpl_killed_ddl.test
index 593051700a7..6415b3e8874 100644
--- a/mysql-test/suite/rpl/t/rpl_killed_ddl.test
+++ b/mysql-test/suite/rpl/t/rpl_killed_ddl.test
@@ -83,9 +83,9 @@ CREATE FUNCTION f1 () RETURNS INT DETERMINISTIC
RETURN 1;
DELIMITER //;
-CREATE PROCEDURE p1 (OUT rows INT)
+CREATE PROCEDURE p1 (OUT rows_cnt INT)
BEGIN
- SELECT COUNT(*) INTO rows FROM t1;
+ SELECT COUNT(*) INTO rows_cnt FROM t1;
END;
//
DELIMITER ;//
@@ -203,15 +203,15 @@ source include/kill_query_and_diff_master_slave.inc;
--let $rpl_diff_statement= SHOW PROCEDURE STATUS LIKE \'p%\'
DELIMITER //;
-send CREATE PROCEDURE p2 (OUT rows INT)
+send CREATE PROCEDURE p2 (OUT rows_cnt INT)
BEGIN
- SELECT COUNT(*) INTO rows FROM t2;
+ SELECT COUNT(*) INTO rows_cnt FROM t2;
END;
//
DELIMITER ;//
source include/kill_query_and_diff_master_slave.inc;
-send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows of table t1';
+send ALTER PROCEDURE p1 SQL SECURITY INVOKER COMMENT 'return rows_cnt of table t1';
source include/kill_query_and_diff_master_slave.inc;
send DROP PROCEDURE p1;
diff --git a/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result
deleted file mode 100644
index 5af00f21c74..00000000000
--- a/mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result
+++ /dev/null
@@ -1,33 +0,0 @@
-select @@global.innodb_force_recovery_crash in (0, 1);
-@@global.innodb_force_recovery_crash in (0, 1)
-1
-select @@global.innodb_force_recovery_crash;
-@@global.innodb_force_recovery_crash
-0
-select @@session.innodb_force_recovery_crash;
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a GLOBAL variable
-show global variables like 'innodb_force_recovery_crash';
-Variable_name Value
-innodb_force_recovery_crash 0
-show session variables like 'innodb_force_recovery_crash';
-Variable_name Value
-innodb_force_recovery_crash 0
-select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_FORCE_RECOVERY_CRASH 0
-select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
-VARIABLE_NAME VARIABLE_VALUE
-INNODB_FORCE_RECOVERY_CRASH 0
-set global innodb_force_recovery_crash=1;
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
-set global innodb_force_recovery_crash=0;
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
-select @@global.innodb_force_recovery_crash;
-@@global.innodb_force_recovery_crash
-0
-set session innodb_force_recovery_crash='some';
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
-set @@session.innodb_force_recovery_crash='some';
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
-set global innodb_force_recovery_crash='some';
-ERROR HY000: Variable 'innodb_force_recovery_crash' is a read only variable
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
index 2a66a0d0931..ccd8e482756 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
@@ -181,16 +181,8 @@ compress_pages_decompressed disabled
compression_pad_increments disabled
compression_pad_decrements disabled
compress_saved disabled
-compress_trim_sect512 disabled
-compress_trim_sect1024 disabled
-compress_trim_sect2048 disabled
-compress_trim_sect4096 disabled
-compress_trim_sect8192 disabled
-compress_trim_sect16384 disabled
-compress_trim_sect32768 disabled
compress_pages_page_compressed disabled
compress_page_compressed_trim_op disabled
-compress_page_compressed_trim_op_saved disabled
compress_pages_page_decompressed disabled
compress_pages_page_compression_error disabled
compress_pages_encrypted disabled
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
index 2a66a0d0931..ccd8e482756 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
@@ -181,16 +181,8 @@ compress_pages_decompressed disabled
compression_pad_increments disabled
compression_pad_decrements disabled
compress_saved disabled
-compress_trim_sect512 disabled
-compress_trim_sect1024 disabled
-compress_trim_sect2048 disabled
-compress_trim_sect4096 disabled
-compress_trim_sect8192 disabled
-compress_trim_sect16384 disabled
-compress_trim_sect32768 disabled
compress_pages_page_compressed disabled
compress_page_compressed_trim_op disabled
-compress_page_compressed_trim_op_saved disabled
compress_pages_page_decompressed disabled
compress_pages_page_compression_error disabled
compress_pages_encrypted disabled
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
index 2a66a0d0931..ccd8e482756 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
@@ -181,16 +181,8 @@ compress_pages_decompressed disabled
compression_pad_increments disabled
compression_pad_decrements disabled
compress_saved disabled
-compress_trim_sect512 disabled
-compress_trim_sect1024 disabled
-compress_trim_sect2048 disabled
-compress_trim_sect4096 disabled
-compress_trim_sect8192 disabled
-compress_trim_sect16384 disabled
-compress_trim_sect32768 disabled
compress_pages_page_compressed disabled
compress_page_compressed_trim_op disabled
-compress_page_compressed_trim_op_saved disabled
compress_pages_page_decompressed disabled
compress_pages_page_compression_error disabled
compress_pages_encrypted disabled
diff --git a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
index 2a66a0d0931..ccd8e482756 100644
--- a/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
@@ -181,16 +181,8 @@ compress_pages_decompressed disabled
compression_pad_increments disabled
compression_pad_decrements disabled
compress_saved disabled
-compress_trim_sect512 disabled
-compress_trim_sect1024 disabled
-compress_trim_sect2048 disabled
-compress_trim_sect4096 disabled
-compress_trim_sect8192 disabled
-compress_trim_sect16384 disabled
-compress_trim_sect32768 disabled
compress_pages_page_compressed disabled
compress_page_compressed_trim_op disabled
-compress_page_compressed_trim_op_saved disabled
compress_pages_page_decompressed disabled
compress_pages_page_compression_error disabled
compress_pages_encrypted disabled
diff --git a/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result b/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result
index 63292f5d3c8..6ab0a19fb57 100644
--- a/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result
+++ b/mysql-test/suite/sys_vars/r/innodb_use_trim_basic.result
@@ -1,12 +1,14 @@
SET @start_use_trim = @@global.innodb_use_trim;
SELECT @start_use_trim;
@start_use_trim
-0
+1
SELECT COUNT(@@GLOBAL.innodb_use_trim);
COUNT(@@GLOBAL.innodb_use_trim)
1
1 Expected
SET @@GLOBAL.innodb_use_trim=1;
+Warnings:
+Warning 131 Using innodb_use_trim is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT COUNT(@@GLOBAL.innodb_use_trim);
COUNT(@@GLOBAL.innodb_use_trim)
1
@@ -28,6 +30,8 @@ COUNT(VARIABLE_VALUE)
1
1 Expected
SET @@global.innodb_use_trim = @start_use_trim;
+Warnings:
+Warning 131 Using innodb_use_trim is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SELECT @@global.innodb_use_trim;
@@global.innodb_use_trim
-0
+1
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
index 41ec54bb4fa..ed57382a2a9 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit.rdiff
@@ -134,15 +134,6 @@
NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -641,7 +641,7 @@
- GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 0
- VARIABLE_SCOPE GLOBAL
--VARIABLE_TYPE BIGINT UNSIGNED
-+VARIABLE_TYPE INT UNSIGNED
- VARIABLE_COMMENT InnoDB system tablespace size to be set in recovery.
- NUMERIC_MIN_VALUE 0
- NUMERIC_MAX_VALUE 4294967295
@@ -865,7 +865,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 120
@@ -543,19 +534,6 @@
VARIABLE_COMMENT Memory buffer size for index creation
NUMERIC_MIN_VALUE 65536
NUMERIC_MAX_VALUE 67108864
-@@ -2195,10 +2195,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
@@ -2391,7 +2391,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 8f655c91427..4b4e10141ab 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -594,20 +594,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_COMPRESS_DEBUG
-SESSION_VALUE NULL
-GLOBAL_VALUE none
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE none
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE ENUM
-VARIABLE_COMMENT Compress all tables, without specifying the COMPRESS table attribute
-NUMERIC_MIN_VALUE NULL
-NUMERIC_MAX_VALUE NULL
-NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST none,zlib,lz4,lz4hc
-READ_ONLY NO
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CONCURRENCY_TICKETS
SESSION_VALUE NULL
GLOBAL_VALUE 5000
@@ -1182,20 +1168,6 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
-VARIABLE_NAME INNODB_FORCE_RECOVERY_CRASH
-SESSION_VALUE NULL
-GLOBAL_VALUE 0
-GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 0
-VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
-VARIABLE_COMMENT Kills the server during crash recovery.
-NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 100
-NUMERIC_BLOCK_SIZE 0
-ENUM_VALUE_LIST NULL
-READ_ONLY YES
-COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_FT_AUX_TABLE
SESSION_VALUE NULL
GLOBAL_VALUE
@@ -2626,12 +2598,12 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_TRIM
SESSION_VALUE NULL
-GLOBAL_VALUE OFF
+GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE OFF
+DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT Use trim. Default FALSE.
+VARIABLE_COMMENT Deallocate (punch_hole|trim) unused portions of the page compressed page (on by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index f37ca909836..968312124dc 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -2053,6 +2053,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_SESSION_MEM_USED
+SESSION_VALUE 9223372036854775807
+GLOBAL_VALUE 9223372036854775807
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 9223372036854775807
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED
+NUMERIC_MIN_VALUE 8192
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
SESSION_VALUE 1024
GLOBAL_VALUE 1024
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 15373702057..8ee6ce6492c 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -2249,6 +2249,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_SESSION_MEM_USED
+SESSION_VALUE 9223372036854775807
+GLOBAL_VALUE 9223372036854775807
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 9223372036854775807
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Amount of memory a single user session is allowed to allocate. This limits the value of the session variable MEM_USED
+NUMERIC_MIN_VALUE 8192
+NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MAX_SORT_LENGTH
SESSION_VALUE 1024
GLOBAL_VALUE 1024
@@ -4771,9 +4785,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_POOL_MAX_THREADS
SESSION_VALUE NULL
-GLOBAL_VALUE 1000
+GLOBAL_VALUE 65536
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1000
+DEFAULT_VALUE 65536
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum allowed number of worker threads in the thread pool
diff --git a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result
index 289c0d56092..5622d97cb68 100644
--- a/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result
+++ b/mysql-test/suite/sys_vars/r/thread_pool_max_threads_basic.result
@@ -1,21 +1,21 @@
SET @start_global_value = @@global.thread_pool_max_threads;
select @@global.thread_pool_max_threads;
@@global.thread_pool_max_threads
-1000
+65536
select @@session.thread_pool_max_threads;
ERROR HY000: Variable 'thread_pool_max_threads' is a GLOBAL variable
show global variables like 'thread_pool_max_threads';
Variable_name Value
-thread_pool_max_threads 1000
+thread_pool_max_threads 65536
show session variables like 'thread_pool_max_threads';
Variable_name Value
-thread_pool_max_threads 1000
+thread_pool_max_threads 65536
select * from information_schema.global_variables where variable_name='thread_pool_max_threads';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_POOL_MAX_THREADS 1000
+THREAD_POOL_MAX_THREADS 65536
select * from information_schema.session_variables where variable_name='thread_pool_max_threads';
VARIABLE_NAME VARIABLE_VALUE
-THREAD_POOL_MAX_THREADS 1000
+THREAD_POOL_MAX_THREADS 65536
set global thread_pool_max_threads=1;
select @@global.thread_pool_max_threads;
@@global.thread_pool_max_threads
diff --git a/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test
deleted file mode 100644
index cfbd10c4e31..00000000000
--- a/mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test
+++ /dev/null
@@ -1,30 +0,0 @@
---source include/have_innodb.inc
---source include/have_debug.inc
-
-#
-# exists as global only
-#
-select @@global.innodb_force_recovery_crash in (0, 1);
-select @@global.innodb_force_recovery_crash;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-select @@session.innodb_force_recovery_crash;
-show global variables like 'innodb_force_recovery_crash';
-show session variables like 'innodb_force_recovery_crash';
---disable_warnings
-select * from information_schema.global_variables where variable_name='innodb_force_recovery_crash';
-select * from information_schema.session_variables where variable_name='innodb_force_recovery_crash';
---enable_warnings
-
-# show that it's read-only
-#
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_force_recovery_crash=1;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_force_recovery_crash=0;
-select @@global.innodb_force_recovery_crash;
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set session innodb_force_recovery_crash='some';
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set @@session.innodb_force_recovery_crash='some';
---error ER_INCORRECT_GLOBAL_LOCAL_VAR
-set global innodb_force_recovery_crash='some';
diff --git a/mysql-test/suite/vcol/disabled.def b/mysql-test/suite/vcol/disabled.def
new file mode 100644
index 00000000000..86480ca3a4c
--- /dev/null
+++ b/mysql-test/suite/vcol/disabled.def
@@ -0,0 +1 @@
+vcol_keys_myisam : MDEV-11836
diff --git a/mysql-test/suite/wsrep/r/binlog_format.result b/mysql-test/suite/wsrep/r/binlog_format.result
index 1ca90bd626d..83af2b67762 100644
--- a/mysql-test/suite/wsrep/r/binlog_format.result
+++ b/mysql-test/suite/wsrep/r/binlog_format.result
@@ -1,4 +1,4 @@
-call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*");
+call mtr.add_suppression("WSREP: MariaDB Galera and flashback do not support binlog format.*");
call mtr.add_suppression("WSREP: Cannot get fake transaction ID from storage engine.");
#
# MDEV-4227: Galera server should stop crashing on setting binlog_format STATEMENT
@@ -8,20 +8,20 @@ Variable_name Value
binlog_format ROW
SET binlog_format=STATEMENT;
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
SHOW WARNINGS;
Level Code Message
-Warning 1105 MariaDB Galera does not support binlog format: STATEMENT
+Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
binlog_format STATEMENT
CREATE TABLE IF NOT EXISTS test.t1 AS SELECT * FROM information_schema.routines WHERE 1 = 0;
SET binlog_format=MIXED;
Warnings:
-Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
SHOW WARNINGS;
Level Code Message
-Warning 1105 MariaDB Galera does not support binlog format: MIXED
+Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
binlog_format MIXED
diff --git a/mysql-test/suite/wsrep/t/binlog_format.test b/mysql-test/suite/wsrep/t/binlog_format.test
index 85864256862..02602b9cb2b 100644
--- a/mysql-test/suite/wsrep/t/binlog_format.test
+++ b/mysql-test/suite/wsrep/t/binlog_format.test
@@ -1,7 +1,7 @@
--source include/have_wsrep_provider.inc
--source include/have_binlog_format_row.inc
-call mtr.add_suppression("WSREP: MariaDB Galera does not support binlog format.*");
+call mtr.add_suppression("WSREP: MariaDB Galera and flashback do not support binlog format.*");
call mtr.add_suppression("WSREP: Cannot get fake transaction ID from storage engine.");
--echo #