diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-08-28 13:43:06 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-09-07 22:10:02 +0300 |
commit | 055a3334adc004bd3a897990c2f93178e6bb5f90 (patch) | |
tree | 53173ddf14e92e645196cacda3f5ee9edf0a8c6a /mysql-test | |
parent | 59950df533ab7231c77a59ec3e27cef855318939 (diff) | |
download | mariadb-git-055a3334adc004bd3a897990c2f93178e6bb5f90.tar.gz |
MDEV-13564 Mariabackup does not work with TRUNCATE
Implement undo tablespace truncation via normal redo logging.
Implement TRUNCATE TABLE as a combination of RENAME to #sql-ib name,
CREATE, and DROP.
Note: Orphan #sql-ib*.ibd may be left behind if MariaDB Server 10.2
is killed before the DROP operation is committed. If MariaDB Server 10.2
is killed during TRUNCATE, it is also possible that the old table
was renamed to #sql-ib*.ibd but the data dictionary will refer to the
table using the original name.
In MariaDB Server 10.3, RENAME inside InnoDB is transactional,
and #sql-* tables will be dropped on startup. So, this new TRUNCATE
will be fully crash-safe in 10.3.
ha_mroonga::wrapper_truncate(): Pass table options to the underlying
storage engine, now that ha_innobase::truncate() will need them.
rpl_slave_state::truncate_state_table(): Before truncating
mysql.gtid_slave_pos, evict any cached table handles from
the table definition cache, so that there will be no stale
references to the old table after truncating.
== TRUNCATE TABLE ==
WL#6501 in MySQL 5.7 introduced separate log files for implementing
atomic and crash-safe TRUNCATE TABLE, instead of using the InnoDB
undo and redo log. Some convoluted logic was added to the InnoDB
crash recovery, and some extra synchronization (including a redo log
checkpoint) was introduced to make this work. This synchronization
has caused performance problems and race conditions, and the extra
log files cannot be copied or applied by external backup programs.
In order to support crash-upgrade from MariaDB 10.2, we will keep
the logic for parsing and applying the extra log files, but we will
no longer generate those files in TRUNCATE TABLE.
A prerequisite for crash-safe TRUNCATE is a crash-safe RENAME TABLE
(with full redo and undo logging and proper rollback). This will
be implemented in MDEV-14717.
ha_innobase::truncate(): Invoke RENAME, create(), delete_table().
Because RENAME cannot be fully rolled back before MariaDB 10.3
due to missing undo logging, add some explicit rename-back in
case the operation fails.
ha_innobase::delete(): Introduce a variant that takes sqlcom as
a parameter. In TRUNCATE TABLE, we do not want to touch any
FOREIGN KEY constraints.
ha_innobase::create(): Add the parameters file_per_table, trx.
In TRUNCATE, the new table must be created in the same transaction
that renames the old table.
create_table_info_t::create_table_info_t(): Add the parameters
file_per_table, trx.
row_drop_table_for_mysql(): Replace a bool parameter with sqlcom.
row_drop_table_after_create_fail(): New function, wrapping
row_drop_table_for_mysql().
dict_truncate_index_tree_in_mem(), fil_truncate_tablespace(),
fil_prepare_for_truncate(), fil_reinit_space_header_for_table(),
row_truncate_table_for_mysql(), TruncateLogger,
row_truncate_prepare(), row_truncate_rollback(),
row_truncate_complete(), row_truncate_fts(),
row_truncate_update_system_tables(),
row_truncate_foreign_key_checks(), row_truncate_sanity_checks():
Remove.
row_upd_check_references_constraints(): Remove a check for
TRUNCATE, now that the table is no longer truncated in place.
The new test innodb.truncate_foreign uses DEBUG_SYNC to cover some
race-condition like scenarios. The test innodb-innodb.truncate does
not use any synchronization.
We add a redo log subformat to indicate backup-friendly format.
MariaDB 10.4 will remove support for the old TRUNCATE logging,
so crash-upgrade from old 10.2 or 10.3 to 10.4 will involve
limitations.
== Undo tablespace truncation ==
MySQL 5.7 implements undo tablespace truncation. It is only
possible when innodb_undo_tablespaces is set to at least 2.
The logging is implemented similar to the WL#6501 TRUNCATE,
that is, using separate log files and a redo log checkpoint.
We can simply implement undo tablespace truncation within
a single mini-transaction that reinitializes the undo log
tablespace file. Unfortunately, due to the redo log format
of some operations, currently, the total redo log written by
undo tablespace truncation will be more than the combined size
of the truncated undo tablespace. It should be acceptable
to have a little more than 1 megabyte of log in a single
mini-transaction. This will be fixed in MDEV-17138 in
MariaDB Server 10.4.
recv_sys_t: Add truncated_undo_spaces[] to remember for which undo
tablespaces a MLOG_FILE_CREATE2 record was seen.
namespace undo: Remove some unnecessary declarations.
fil_space_t::is_being_truncated: Document that this flag now
only applies to undo tablespaces. Remove some references.
fil_space_t::is_stopping(): Do not refer to is_being_truncated.
This check is for tablespaces of tables. Potentially used
tablespaces are never truncated any more.
buf_dblwr_process(): Suppress the out-of-bounds warning
for undo tablespaces.
fil_truncate_log(): Write a MLOG_FILE_CREATE2 with a nonzero
page number (new size of the tablespace in pages) to inform
crash recovery that the undo tablespace size has been reduced.
fil_op_write_log(): Relax assertions, so that MLOG_FILE_CREATE2
can be written for undo tablespaces (without .ibd file suffix)
for a nonzero page number.
os_file_truncate(): Add the parameter allow_shrink=false
so that undo tablespaces can actually be shrunk using this function.
fil_name_parse(): For undo tablespace truncation,
buffer MLOG_FILE_CREATE2 in truncated_undo_spaces[].
recv_read_in_area(): Avoid reading pages for which no redo log
records remain buffered, after recv_addr_trim() removed them.
trx_rseg_header_create(): Add a FIXME comment that we could write
much less redo log.
trx_undo_truncate_tablespace(): Reinitialize the undo tablespace
in a single mini-transaction, which will be flushed to the redo log
before the file size is trimmed.
recv_addr_trim(): Discard any redo logs for pages that were
logged after the new end of a file, before the truncation LSN.
If the rec_list becomes empty, reduce n_addrs. After removing
any affected records, actually truncate the file.
recv_apply_hashed_log_recs(): Invoke recv_addr_trim() right before
applying any log records. The undo tablespace files must be open
at this point.
buf_flush_or_remove_pages(), buf_flush_dirty_pages(),
buf_LRU_flush_or_remove_pages(): Add a parameter for specifying
the number of the first page to flush or remove (default 0).
trx_purge_initiate_truncate(): Remove the log checkpoints, the
extra logging, and some unnecessary crash points. Merge the code
from trx_undo_truncate_tablespace(). First, flush all to-be-discarded
pages (beyond the new end of the file), then trim the space->size
to make the page allocation deterministic. At the only remaining
crash injection point, flush the redo log, so that the recovery
can be tested.
Diffstat (limited to 'mysql-test')
42 files changed, 234 insertions, 4857 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index 3fbc4576ece..08f8d2098f6 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -191,22 +191,18 @@ connection default; COMMIT; connect truncate,localhost,root,,; REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; -SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; TRUNCATE TABLE t1; connection prevent_purge; -SET DEBUG_SYNC='now WAIT_FOR commit'; COMMIT; SET DEBUG_SYNC='now SIGNAL purge_start'; disconnect prevent_purge; connection default; SET DEBUG_SYNC='now WAIT_FOR purge_start'; -InnoDB 1 transactions not purged -SET DEBUG_SYNC='now SIGNAL release'; +InnoDB 0 transactions not purged SET GLOBAL debug_dbug=@old_dbug; connection truncate; disconnect truncate; connection default; -InnoDB 0 transactions not purged DROP TABLE t1, t2; set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test index 845881a6d07..1541920d3ae 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test @@ -240,21 +240,16 @@ COMMIT; connect(truncate,localhost,root,,); REPLACE INTO t1(pk, y) SELECT pk,y FROM t1; -SET DEBUG_SYNC='row_trunc_before_dict_lock SIGNAL commit WAIT_FOR release'; send TRUNCATE TABLE t1; connection prevent_purge; -SET DEBUG_SYNC='now WAIT_FOR commit'; COMMIT; SET DEBUG_SYNC='now SIGNAL purge_start'; disconnect prevent_purge; connection default; SET DEBUG_SYNC='now WAIT_FOR purge_start'; -let $wait_all_purged=1; --source ../../innodb/include/wait_all_purged.inc -let $wait_all_purged=0; -SET DEBUG_SYNC='now SIGNAL release'; SET GLOBAL debug_dbug=@old_dbug; connection truncate; @@ -262,7 +257,6 @@ reap; disconnect truncate; connection default; ---source ../../innodb/include/wait_all_purged.inc DROP TABLE t1, t2; --source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc b/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc deleted file mode 100644 index 93eca7ec060..00000000000 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash.inc +++ /dev/null @@ -1,416 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -# 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 while writing redo log. -# 2. Hit crash point on completion of redo log write. -# 3. Hit crash point while dropping indexes. -# 4. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# 5. Hit crash point while creating indexes. -# 6. Hit crash point after data is updated to system-table and in-memory dict. -# 7. Hit crash point before/after log checkpoint is done. -# -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -eval set global innodb_file_per_table = on; -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 while writing redo log. -# ---echo "1. Hit crash point while writing redo log." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_while_writing_redo_log"; ---source include/expect_crash.inc ---error 2013 -truncate table t; -# ---source include/start_mysqld.inc -check table t; -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 2. Hit crash point on completion of redo log write. -# ---echo "2. Hit crash point on completion of redo log write." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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'); -select * from t; -select * from t where f < 2.5; -drop table t; - -#----------------------------------------------------------------------------- -# -# 3. Hit crash point while dropping indexes. -# ---echo "3. Hit crash point while dropping indexes." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_drop_of_clust_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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)) - 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_drop_of_uniq_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -SET innodb_strict_mode=OFF; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), 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_drop_of_sec_index"; ---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; - -#----------------------------------------------------------------------------- -# -# 4. Hit crash point on completing drop of all indexes before creation of index -# is commenced. -# ---echo "4. Hit crash point on completing drop of all indexes before creation" ---echo " of index is commenced." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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; - -#----------------------------------------------------------------------------- -# -# 5. Hit crash point while creating indexes. -# ---echo "5. Hit crash point while creating indexes." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_create_of_clust_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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)) - 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_create_of_uniq_index"; ---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; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -SET innodb_strict_mode=OFF; ---disable_warnings -eval create $wl6501_temp table t ( - i int, f float, c char, - primary key pk(i), 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_create_of_sec_index"; ---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; - -#----------------------------------------------------------------------------- -# -# 6. Hit crash point after data is updated to system-table and in-memory dict. -# ---echo "6. Hit crash point after data is updated to system-table and" ---echo " in-memory dict." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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; - -#----------------------------------------------------------------------------- -# -# 7. Hit crash point before/after log checkpoint is done. -# ---echo "7. Hit crash point before/after log checkpoint is done." -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_before_log_removal"; ---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 where f < 2.5; -drop table t; -# -# -use test; -eval set global innodb_file_per_table = $wl6501_file_per_table; -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_truncate_done"; ---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; - - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -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 deleted file mode 100644 index edec93b875c..00000000000 --- a/mysql-test/suite/innodb/include/innodb_wl6501_crash_temp.inc +++ /dev/null @@ -1,98 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -# suppress expected warnings -call mtr.add_suppression("does not exist in the InnoDB internal"); - -################################################################################ -# -# 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. -# -################################################################################ - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; - -eval set global innodb_file_per_table = on; -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; -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; - -#----------------------------------------------------------------------------- -# -# 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; -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; - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb/r/truncate.result b/mysql-test/suite/innodb/r/truncate.result new file mode 100644 index 00000000000..3ade1e7f8de --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate.result @@ -0,0 +1,8 @@ +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +connect dml,localhost,root; +select * from t; +a +connection default; +TRUNCATE TABLE t; +disconnect dml; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/truncate_debug.result b/mysql-test/suite/innodb/r/truncate_debug.result deleted file mode 100644 index c04b83dbbe8..00000000000 --- a/mysql-test/suite/innodb/r/truncate_debug.result +++ /dev/null @@ -1,88 +0,0 @@ -# -# Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS -# -SET @ahi= @@global.innodb_adaptive_hash_index; -SET GLOBAL innodb_adaptive_hash_index=OFF; -SET GLOBAL innodb_adaptive_hash_index=ON; -Test_1 :- Check if DDL operations are possible on -table being truncated. Also check if -DDL operations on other tables succeed. -create table t1 (f1 int,f2 int,key(f2),f3 int) engine=innodb; -create index idx1 on t1(f3); -create table t2 (f1 int,f2 int,key(f2),f3 int) engine=innodb; -create table t3 (f1 int,f2 int,key(f2)) engine=innodb; -insert into t1 values (10,20,30),(30,40,50),(50,60,70); -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t2 values (10,20,30),(30,40,50),(50,60,70); -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t3 values (10,20),(30,40),(50,50); -insert into t3 select * from t3; -insert into t3 select * from t3; -SET session lock_wait_timeout = 1; -connect con1,localhost,root,,; -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -truncate table t1; -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -Check Analyze table. Gives lock time out error. -analyze table t1; -Table Op Msg_type Msg_text -test.t1 analyze Error Lock wait timeout exceeded; try restarting transaction -test.t1 analyze status Operation failed -Check if we can turn off auto recalculation. -alter table t1 STATS_AUTO_RECALC=0; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if we can turn off persistent stats on the table -alter table t1 STATS_PERSISTENT=0; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DML is possible on table being truncated -insert into t1 values (10,89,99); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DDL is possible on table being truncated -alter table t1 add column f4 int; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -check if table can be created with the same name -create table t1 (bd int) engine=innodb; -Got one of the listed errors -check if index can be created on table being truncated -create index idx1 on t1(f1); -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if DROP of table is possible during truncate -drop table t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check if select is possible during truncate -select * from t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -select * from t2 where t2.f1=t1.f1; -ERROR 42S22: Unknown column 't1.f1' in 'where clause' -Check concurrent truncate operation on table; -truncate table t1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -Check concurrent selects and inserts on the other table -insert into t3 values (10,20),(30,40),(50,50); -select * from t3 where f1=40; -f1 f2 -Concurrent truncate on other tables -truncate table t2; -Concurrent alters on the other tables -alter table t2 add column f4 int; -check if index can be created on the other table -create index idx1 on t2(f3); -Check if we can turn off persistent stats off entire instance -SET GLOBAL innodb_stats_persistent=off; -connect con2,localhost,root,,; -set global innodb_adaptive_hash_index=off; -connection default; -SET DEBUG_SYNC= 'now SIGNAL finish_scan'; -connection con1; -disconnect con1; -connection con2; -disconnect con2; -connection default; -SET DEBUG_SYNC= 'RESET'; -SET GLOBAL innodb_adaptive_hash_index=@ahi; -drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/r/truncate_foreign.result b/mysql-test/suite/innodb/r/truncate_foreign.result new file mode 100644 index 00000000000..bcf5b16aa83 --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate_foreign.result @@ -0,0 +1,58 @@ +CREATE TABLE parent (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO parent SET a=1; +CREATE TABLE child (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES parent(a) +ON UPDATE CASCADE) +ENGINE=InnoDB; +INSERT INTO child SET a=1; +TRUNCATE TABLE parent; +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`parent` (`a`)) +TRUNCATE TABLE child; +INSERT INTO child SET a=1; +UPDATE parent SET a=2; +SELECT * FROM child; +a +2 +connect dml,localhost,root; +SET DEBUG_SYNC='foreign_constraint_update_cascade SIGNAL fk WAIT_FOR go'; +UPDATE parent SET a=3; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET lock_wait_timeout=1; +TRUNCATE TABLE child; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +SELECT * FROM child; +a +3 +SET DEBUG_SYNC='foreign_constraint_check_for_update SIGNAL fk WAIT_FOR go'; +DELETE FROM parent; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +TRUNCATE TABLE child; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON UPDATE CASCADE) +SELECT * FROM child; +a +3 +INSERT INTO parent SET a=5; +SET DEBUG_SYNC='foreign_constraint_check_for_ins SIGNAL fk WAIT_FOR go'; +INSERT INTO child SET a=5; +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET foreign_key_checks=0; +TRUNCATE TABLE parent; +SET DEBUG_SYNC='now SIGNAL go'; +connection dml; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`a`) REFERENCES `parent` (`a`) ON UPDATE CASCADE) +SELECT * FROM parent; +a +SELECT * FROM child; +a +3 +disconnect dml; +connection default; +SET DEBUG_SYNC = RESET; +DROP TABLE child, parent; diff --git a/mysql-test/suite/innodb/r/truncate_inject.result b/mysql-test/suite/innodb/r/truncate_inject.result deleted file mode 100644 index 5ec532a0f83..00000000000 --- a/mysql-test/suite/innodb/r/truncate_inject.result +++ /dev/null @@ -1,114 +0,0 @@ -SET @save_dbug = @@SESSION.debug_dbug; -call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE"); -# 1. Error in assigning undo logs for truncate action -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -# 2. Error while preparing for truncate -SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -# 3. Error while dropping/creating indexes -SET debug_dbug = '+d,ib_err_trunc_drop_index'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check Warning InnoDB: Index PRIMARY is marked as corrupted -test.t check error Corrupt -select * from t; -Got one of the listed errors -drop table t; -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_create_index'; -truncate table t; -ERROR HY000: Got error 168 "Unknown (generic) error from engine" from storage engine InnoDB -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check Warning InnoDB: Index PRIMARY is marked as corrupted -test.t check error Corrupt -select * from t; -Got one of the listed errors -drop table t; -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -drop table t; -# 4. Error while completing truncate of table involving FTS -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), -(2, 2.2, 'innodb is part of mysql'), -(3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -drop table t; -# 5. Error while updating sys-tables -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), -(2, 2.2, 'innodb is part of mysql'), -(3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -Table Op Msg_type Msg_text -test.t check status OK -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t order by i; -i f c -drop table t; diff --git a/mysql-test/suite/innodb/r/truncate_missing.result b/mysql-test/suite/innodb/r/truncate_missing.result new file mode 100644 index 00000000000..263880eccd2 --- /dev/null +++ b/mysql-test/suite/innodb/r/truncate_missing.result @@ -0,0 +1,17 @@ +call mtr.add_suppression("InnoDB: Operating system error number "); +call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\.`t`"); +call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +INSERT INTO t() VALUES(); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + UNIQUE KEY `a` (`a`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 +SELECT * FROM t; +ERROR 42S02: Table 'test.t' doesn't exist in engine +TRUNCATE TABLE t; +ERROR 42S02: Table 'test.t' doesn't exist in engine +DROP TABLE t; diff --git a/mysql-test/suite/innodb/r/truncate_purge_debug.result b/mysql-test/suite/innodb/r/truncate_purge_debug.result deleted file mode 100644 index 164987083d5..00000000000 --- a/mysql-test/suite/innodb/r/truncate_purge_debug.result +++ /dev/null @@ -1,29 +0,0 @@ -# -# Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS -# -create table t1 (f1 int ,f2 int,key(f2)) engine=innodb; -begin; -insert into t1 values (10,45),(20,78),(30,88),(40,23),(50,78),(60,11),(70,56),(80,90); -delete from t1; -connect con2,localhost,root,,; -START TRANSACTION WITH CONSISTENT SNAPSHOT; -connection default; -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; -commit; -connect con1,localhost,root,,; -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -truncate table t1; -connection con2; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -COMMIT; -disconnect con2; -connection default; -InnoDB 0 transactions not purged -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; -SET DEBUG_SYNC = 'now SIGNAL finish_scan'; -connection con1; -disconnect con1; -connection default; -SET DEBUG_SYNC = 'RESET'; -drop table t1; diff --git a/mysql-test/suite/innodb/r/truncate_restart.result b/mysql-test/suite/innodb/r/truncate_restart.result deleted file mode 100644 index b6d14124371..00000000000 --- a/mysql-test/suite/innodb/r/truncate_restart.result +++ /dev/null @@ -1,12 +0,0 @@ -SET GLOBAL innodb_stats_persistent= ON; -CREATE TABLE t1 (t TEXT) ENGINE=InnoDB STATS_PERSISTENT=1; -connect con1,localhost,root,,test; -SET DEBUG_SYNC='ib_trunc_table_trunc_completing SIGNAL committed WAIT_FOR ever'; -TRUNCATE TABLE t1; -connection default; -SET DEBUG_SYNC='now WAIT_FOR committed'; -disconnect con1; -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/truncate.test b/mysql-test/suite/innodb/t/truncate.test new file mode 100644 index 00000000000..cf71ca83c4c --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate.test @@ -0,0 +1,17 @@ +--source include/have_innodb.inc + +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; + +connect (dml,localhost,root); +# At the end of this statement, close_thread_tables() +# should add the open table handle to the table definition cache (tdc). +select * from t; + +connection default; +# This should purge the handle from the tdc; +# otherwise ha_innobase::truncate() would hang, +# waiting for the reference count to drop to 0. +TRUNCATE TABLE t; +disconnect dml; + +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/truncate_debug.test b/mysql-test/suite/innodb/t/truncate_debug.test deleted file mode 100644 index 5fee9174d98..00000000000 --- a/mysql-test/suite/innodb/t/truncate_debug.test +++ /dev/null @@ -1,127 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc - ---source include/count_sessions.inc - ---echo # ---echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS ---echo # - -SET @ahi= @@global.innodb_adaptive_hash_index; -# Ensure that there is no adaptive hash index on any system tables, -# or any other tables than the ones that we are creating below. -SET GLOBAL innodb_adaptive_hash_index=OFF; -SET GLOBAL innodb_adaptive_hash_index=ON; - ---echo Test_1 :- Check if DDL operations are possible on ---echo table being truncated. Also check if ---echo DDL operations on other tables succeed. - -create table t1 (f1 int,f2 int,key(f2),f3 int) engine=innodb; -create index idx1 on t1(f3); -create table t2 (f1 int,f2 int,key(f2),f3 int) engine=innodb; -create table t3 (f1 int,f2 int,key(f2)) engine=innodb; - -insert into t1 values (10,20,30),(30,40,50),(50,60,70); -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t1 select * from t1; -insert into t2 values (10,20,30),(30,40,50),(50,60,70); - -insert into t2 select * from t2; -insert into t2 select * from t2; -insert into t2 select * from t2; - -insert into t3 values (10,20),(30,40),(50,50); -insert into t3 select * from t3; -insert into t3 select * from t3; - -SET session lock_wait_timeout = 1; - -connect (con1,localhost,root,,); -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -send truncate table t1; - -connection default; -SET DEBUG_SYNC= 'now WAIT_FOR started'; - ---echo Check Analyze table. Gives lock time out error. -analyze table t1; - ---echo Check if we can turn off auto recalculation. ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 STATS_AUTO_RECALC=0; - ---echo Check if we can turn off persistent stats on the table ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 STATS_PERSISTENT=0; - ---echo Check if DML is possible on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -insert into t1 values (10,89,99); - ---echo Check if DDL is possible on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -alter table t1 add column f4 int; - ---echo check if table can be created with the same name ---error ER_TABLE_EXISTS_ERROR,ER_LOCK_WAIT_TIMEOUT -create table t1 (bd int) engine=innodb; - ---echo check if index can be created on table being truncated ---error ER_LOCK_WAIT_TIMEOUT -create index idx1 on t1(f1); - ---echo Check if DROP of table is possible during truncate ---error ER_LOCK_WAIT_TIMEOUT -drop table t1; - ---echo Check if select is possible during truncate ---error ER_LOCK_WAIT_TIMEOUT -select * from t1; - ---error ER_BAD_FIELD_ERROR -select * from t2 where t2.f1=t1.f1; - ---echo Check concurrent truncate operation on table; ---error ER_LOCK_WAIT_TIMEOUT -truncate table t1; - ---echo Check concurrent selects and inserts on the other table -insert into t3 values (10,20),(30,40),(50,50); -select * from t3 where f1=40; - ---echo Concurrent truncate on other tables -truncate table t2; - ---echo Concurrent alters on the other tables -alter table t2 add column f4 int; - ---echo check if index can be created on the other table -create index idx1 on t2(f3); - ---echo Check if we can turn off persistent stats off entire instance -SET GLOBAL innodb_stats_persistent=off; - -connect (con2,localhost,root,,); -send set global innodb_adaptive_hash_index=off; - -connection default; -SET DEBUG_SYNC= 'now SIGNAL finish_scan'; - -connection con1; -reap; -disconnect con1; - -connection con2; -reap; -disconnect con2; - -connection default; -SET DEBUG_SYNC= 'RESET'; - -SET GLOBAL innodb_adaptive_hash_index=@ahi; - -drop table t1,t2,t3; ---source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/truncate_foreign.test b/mysql-test/suite/innodb/t/truncate_foreign.test new file mode 100644 index 00000000000..2c00c0641e9 --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate_foreign.test @@ -0,0 +1,68 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +CREATE TABLE parent (a INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO parent SET a=1; + +CREATE TABLE child (a INT PRIMARY KEY, FOREIGN KEY (a) REFERENCES parent(a) +ON UPDATE CASCADE) +ENGINE=InnoDB; +INSERT INTO child SET a=1; + +--error ER_TRUNCATE_ILLEGAL_FK +TRUNCATE TABLE parent; +TRUNCATE TABLE child; + +INSERT INTO child SET a=1; +UPDATE parent SET a=2; +SELECT * FROM child; + +connect (dml,localhost,root); +SET DEBUG_SYNC='foreign_constraint_update_cascade SIGNAL fk WAIT_FOR go'; +send UPDATE parent SET a=3; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET lock_wait_timeout=1; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE child; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +reap; +SELECT * FROM child; +SET DEBUG_SYNC='foreign_constraint_check_for_update SIGNAL fk WAIT_FOR go'; +send DELETE FROM parent; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +--error ER_LOCK_WAIT_TIMEOUT +TRUNCATE TABLE child; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +--error ER_ROW_IS_REFERENCED_2 +reap; +SELECT * FROM child; +INSERT INTO parent SET a=5; +SET DEBUG_SYNC='foreign_constraint_check_for_ins SIGNAL fk WAIT_FOR go'; +send INSERT INTO child SET a=5; + +connection default; +SET DEBUG_SYNC='now WAIT_FOR fk'; +SET foreign_key_checks=0; +TRUNCATE TABLE parent; +SET DEBUG_SYNC='now SIGNAL go'; + +connection dml; +--error ER_NO_REFERENCED_ROW_2 +reap; +SELECT * FROM parent; +SELECT * FROM child; +disconnect dml; + +connection default; +SET DEBUG_SYNC = RESET; + +DROP TABLE child, parent; diff --git a/mysql-test/suite/innodb/t/truncate_inject.test b/mysql-test/suite/innodb/t/truncate_inject.test deleted file mode 100644 index 35e516324bb..00000000000 --- a/mysql-test/suite/innodb/t/truncate_inject.test +++ /dev/null @@ -1,97 +0,0 @@ -# This test is based on innodb_zip.wl6501_error_1 in MySQL 5.7. - ---source include/have_innodb.inc ---source include/innodb_row_format.inc ---source include/have_debug.inc - -SET @save_dbug = @@SESSION.debug_dbug; - -call mtr.add_suppression("InnoDB: Flagged corruption of .* in table `test`\\.`t` in TRUNCATE TABLE"); - ---echo # 1. Error in assigning undo logs for truncate action -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; -# -SET debug_dbug = '+d,ib_err_trunc_assigning_undo_log'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -select * from t; - ---echo # 2. Error while preparing for truncate -SET debug_dbug = '+d,ib_err_trunc_preparing_for_truncate'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; -select * from t; - ---echo # 3. Error while dropping/creating indexes -SET debug_dbug = '+d,ib_err_trunc_drop_index'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; ---error ER_TABLE_CORRUPT,ER_GET_ERRNO -select * from t; -drop table t; - -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; - -SET debug_dbug = '+d,ib_err_trunc_create_index'; ---error ER_GET_ERRNO -truncate table t; -SET debug_dbug = @save_dbug; -check table t; ---error ER_TABLE_CORRUPT,ER_GET_ERRNO -select * from t; -drop table t; - -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), INDEX ck(c)) -ENGINE = InnoDB; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -check table t; - -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t; -drop table t; - ---echo # 4. Error while completing truncate of table involving FTS -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), - (2, 2.2, 'innodb is part of mysql'), - (3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t; -drop table t; - ---echo # 5. Error while updating sys-tables -CREATE TABLE t (i int PRIMARY KEY, f float UNIQUE, c char(100), -FULLTEXT INDEX(c)) ENGINE = InnoDB; -insert into t values (1, 1.1, 'mysql is now oracle company'), - (2, 2.2, 'innodb is part of mysql'), - (3, 3.3, 'innodb is default storage engine of mysql'); -check table t; -SET debug_dbug = '+d,ib_err_trunc_temp_recreate_index'; -truncate table t; -SET debug_dbug = @save_dbug; - -check table t; -select * from t order by i; -drop table t; diff --git a/mysql-test/suite/innodb/t/truncate_missing.test b/mysql-test/suite/innodb/t/truncate_missing.test new file mode 100644 index 00000000000..832b94e3a19 --- /dev/null +++ b/mysql-test/suite/innodb/t/truncate_missing.test @@ -0,0 +1,22 @@ +--source include/have_innodb.inc +--source include/not_embedded.inc + +call mtr.add_suppression("InnoDB: Operating system error number "); +call mtr.add_suppression("InnoDB: (The error means|If you are|Cannot open datafile) "); +call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\.`t`"); +call mtr.add_suppression("InnoDB: Table test/t .* does not exist"); + +CREATE TABLE t (a SERIAL) ENGINE=InnoDB; +INSERT INTO t() VALUES(); +SHOW CREATE TABLE t; +let $datadir=`select @@datadir`; + +--source include/shutdown_mysqld.inc +--remove_file $datadir/test/t.ibd +--source include/start_mysqld.inc + +--error ER_NO_SUCH_TABLE_IN_ENGINE +SELECT * FROM t; +--error ER_NO_SUCH_TABLE_IN_ENGINE +TRUNCATE TABLE t; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/truncate_purge_debug.opt b/mysql-test/suite/innodb/t/truncate_purge_debug.opt deleted file mode 100644 index 8bed7e46166..00000000000 --- a/mysql-test/suite/innodb/t/truncate_purge_debug.opt +++ /dev/null @@ -1,3 +0,0 @@ ---innodb-purge-threads=1 ---innodb-purge-batch-size=1 ---innodb-stats-persistent=OFF diff --git a/mysql-test/suite/innodb/t/truncate_purge_debug.test b/mysql-test/suite/innodb/t/truncate_purge_debug.test deleted file mode 100644 index e8f5768f557..00000000000 --- a/mysql-test/suite/innodb/t/truncate_purge_debug.test +++ /dev/null @@ -1,49 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc ---source include/count_sessions.inc - ---echo # ---echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS ---echo # - -create table t1 (f1 int ,f2 int,key(f2)) engine=innodb; -begin; -insert into t1 values (10,45),(20,78),(30,88),(40,23),(50,78),(60,11),(70,56),(80,90); -delete from t1; - -connect (con2,localhost,root,,); -# Stop the purge thread -START TRANSACTION WITH CONSISTENT SNAPSHOT; - -connection default; -# Ensure that the history list length will actually be decremented by purge. -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; -commit; - -connect (con1,localhost,root,,); -SET DEBUG_SYNC= 'buffer_pool_scan SIGNAL started WAIT_FOR finish_scan'; -send truncate table t1; - -connection con2; -SET DEBUG_SYNC= 'now WAIT_FOR started'; -# Allow purge to proceed, by discarding our read view. -COMMIT; -disconnect con2; - -connection default; ---source include/wait_all_purged.inc - -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; - -SET DEBUG_SYNC = 'now SIGNAL finish_scan'; - -connection con1; -reap; -disconnect con1; - -connection default; -SET DEBUG_SYNC = 'RESET'; -drop table t1; ---source include/wait_until_count_sessions.inc diff --git a/mysql-test/suite/innodb/t/truncate_restart.test b/mysql-test/suite/innodb/t/truncate_restart.test deleted file mode 100644 index 60a3d83cd81..00000000000 --- a/mysql-test/suite/innodb/t/truncate_restart.test +++ /dev/null @@ -1,16 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc - -SET GLOBAL innodb_stats_persistent= ON; -CREATE TABLE t1 (t TEXT) ENGINE=InnoDB STATS_PERSISTENT=1; ---connect (con1,localhost,root,,test) -SET DEBUG_SYNC='ib_trunc_table_trunc_completing SIGNAL committed WAIT_FOR ever'; ---send -TRUNCATE TABLE t1; ---connection default -SET DEBUG_SYNC='now WAIT_FOR committed'; ---source include/restart_mysqld.inc ---disconnect con1 -SELECT COUNT(*) FROM t1; -DROP TABLE t1; diff --git a/mysql-test/suite/innodb_fts/r/truncate.result b/mysql-test/suite/innodb_fts/r/truncate.result deleted file mode 100644 index 0e21717a4d3..00000000000 --- a/mysql-test/suite/innodb_fts/r/truncate.result +++ /dev/null @@ -1,31 +0,0 @@ -# -# Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE -# -CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b), -FULLTEXT fts2(c)); -TRUNCATE TABLE t1; -INSERT INTO t1 (a,d,b,c) VALUES ( -'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); -CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b)); -INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1')); -create procedure insert_t2(IN total int) -begin -declare i int default 1; -while (i <= total) DO -insert into t2 select * from t2; -set i = i + 1; -end while; -end| -CALL insert_t2(15); -SET @save_dbug = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate'; -INSERT INTO t1 (a,d,b,c) VALUES ( -'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); -SET DEBUG_DBUG = @save_dbug; -DROP PROCEDURE insert_t2; -DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb_fts/t/truncate.opt b/mysql-test/suite/innodb_fts/t/truncate.opt deleted file mode 100644 index d143088d352..00000000000 --- a/mysql-test/suite/innodb_fts/t/truncate.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-random-read-ahead=1 diff --git a/mysql-test/suite/innodb_fts/t/truncate.test b/mysql-test/suite/innodb_fts/t/truncate.test deleted file mode 100644 index 46ba732b019..00000000000 --- a/mysql-test/suite/innodb_fts/t/truncate.test +++ /dev/null @@ -1,50 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc - ---echo # ---echo # Bug#25053705 - INVALID I/O ON TABLE AFTER TRUNCATE ---echo # - -CREATE TABLE t1 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b), -FULLTEXT fts2(c)); - -TRUNCATE TABLE t1; - -INSERT INTO t1 (a,d,b,c) VALUES ( -'79795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); - -# The following CREATE TABLE and INSERTs are used to remove the pages related to table t1 -# from the buffer pool. -CREATE TABLE t2 (a INT, d INT, b VARCHAR(198), c CHAR(158), FULLTEXT fts1(c,b)); - -INSERT INTO t2 VALUES (1, 1, repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorccuullucocraloracurooulrooauuar','1')); - -delimiter |; -create procedure insert_t2(IN total int) -begin - declare i int default 1; - while (i <= total) DO - insert into t2 select * from t2; - set i = i + 1; - end while; -end| -delimiter ;| - -CALL insert_t2(15); - -SET @save_dbug = @@SESSION.DEBUG_DBUG; -SET DEBUG_DBUG = '+d,innodb_invalid_read_after_truncate'; - -INSERT INTO t1 (a,d,b,c) VALUES ( -'7795','6',repeat('uololoaroolccaaruolraloouuoocorrcorurlu','1'), -repeat('orouculcaocuocloooolooloooaorlroclouulrrucclulalouaulrluorooaclllluuorc -cuullucocraloracurooulrooauuar','1')); - -SET DEBUG_DBUG = @save_dbug; - -DROP PROCEDURE insert_t2; - -DROP TABLE t1,t2; diff --git a/mysql-test/suite/innodb_undo/include/truncate_recover.inc b/mysql-test/suite/innodb_undo/include/truncate_recover.inc deleted file mode 100644 index fe068afa6e3..00000000000 --- a/mysql-test/suite/innodb_undo/include/truncate_recover.inc +++ /dev/null @@ -1,8 +0,0 @@ -begin; -update t1 set c = 'MariaDB'; -update t1 set c = 'InnoDB'; -eval set global debug_dbug = '+d,$SEARCH_PATTERN'; -commit; ---source include/shutdown_mysqld.inc ---source include/search_pattern_in_file.inc ---source include/start_mysqld.inc diff --git a/mysql-test/suite/innodb_undo/r/truncate.result b/mysql-test/suite/innodb_undo/r/truncate.result index 4f62d85e08a..2194eed3e7b 100644 --- a/mysql-test/suite/innodb_undo/r/truncate.result +++ b/mysql-test/suite/innodb_undo/r/truncate.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: The transaction log size is too large"); SET GLOBAL innodb_fast_shutdown=0; create table t1(keyc int primary key, c1 char(100)) engine = innodb; begin; diff --git a/mysql-test/suite/innodb_undo/r/truncate_multi_client.result b/mysql-test/suite/innodb_undo/r/truncate_multi_client.result index c1ce2845996..0333a70d771 100644 --- a/mysql-test/suite/innodb_undo/r/truncate_multi_client.result +++ b/mysql-test/suite/innodb_undo/r/truncate_multi_client.result @@ -1,3 +1,4 @@ +call mtr.add_suppression("InnoDB: The transaction log size is too large"); SET GLOBAL innodb_fast_shutdown=0; create table t1(keyc int primary key, c char(100)) engine = innodb; create table t2(keyc int primary key, c char(100)) engine = innodb; diff --git a/mysql-test/suite/innodb_undo/r/truncate_recover.result b/mysql-test/suite/innodb_undo/r/truncate_recover.result index f89bc0a9e47..ae33474e00d 100644 --- a/mysql-test/suite/innodb_undo/r/truncate_recover.result +++ b/mysql-test/suite/innodb_undo/r/truncate_recover.result @@ -1,15 +1,15 @@ +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_undo_log_truncate = 1; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; create table t1(keyc int primary key, c char(100)) engine = innodb; begin; commit; begin; update t1 set c = 'MariaDB'; update t1 set c = 'InnoDB'; -set global debug_dbug = '+d,ib_undo_trunc_before_truncate'; +set global debug_dbug = '+d,ib_undo_trunc'; commit; -FOUND 1 /ib_undo_trunc_before_truncate/ in mysqld.1.err -begin; -update t1 set c = 'MariaDB'; -update t1 set c = 'InnoDB'; -set global debug_dbug = '+d,ib_undo_trunc_before_ddl_log_end'; -commit; -FOUND 1 /ib_undo_trunc_before_ddl_log_end/ in mysqld.1.err +call mtr.add_suppression("InnoDB: The transaction log size is too large"); +SET GLOBAL innodb_fast_shutdown=0; +FOUND 1 /ib_undo_trunc/ in mysqld.1.err +drop table t1; diff --git a/mysql-test/suite/innodb_undo/t/truncate.test b/mysql-test/suite/innodb_undo/t/truncate.test index 2c612478929..cc18434ae13 100644 --- a/mysql-test/suite/innodb_undo/t/truncate.test +++ b/mysql-test/suite/innodb_undo/t/truncate.test @@ -9,6 +9,7 @@ # The test is restarting the server to force undo truncation. --source include/not_embedded.inc +call mtr.add_suppression("InnoDB: The transaction log size is too large"); SET GLOBAL innodb_fast_shutdown=0; --let $restart_parameters=--innodb_undo_tablespaces=2 --innodb_undo_logs=4 --source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb_undo/t/truncate_multi_client.test b/mysql-test/suite/innodb_undo/t/truncate_multi_client.test index ac4ead00b51..6a3d702d0d5 100644 --- a/mysql-test/suite/innodb_undo/t/truncate_multi_client.test +++ b/mysql-test/suite/innodb_undo/t/truncate_multi_client.test @@ -9,6 +9,7 @@ --source include/have_innodb_max_16k.inc --source include/have_undo_tablespaces.inc +call mtr.add_suppression("InnoDB: The transaction log size is too large"); SET GLOBAL innodb_fast_shutdown=0; --let $restart_parameters=--innodb_undo_tablespaces=2 --innodb_undo_logs=4 --source include/restart_mysqld.inc diff --git a/mysql-test/suite/innodb_undo/t/truncate_recover.test b/mysql-test/suite/innodb_undo/t/truncate_recover.test index 8087d191f1e..fb901bc4259 100644 --- a/mysql-test/suite/innodb_undo/t/truncate_recover.test +++ b/mysql-test/suite/innodb_undo/t/truncate_recover.test @@ -2,10 +2,10 @@ # WL#6965: Truncate UNDO logs. # +# With larger innodb_page_size, the undo log tablespaces do not grow enough. +--source include/innodb_page_size_small.inc --source include/have_innodb.inc --source include/have_debug.inc -# With larger innodb_page_size, the undo log tablespaces do not grow enough. ---source include/have_innodb_max_16k.inc --source include/have_undo_tablespaces.inc # Valgrind would complain about memory leaks when we crash on purpose. @@ -15,15 +15,9 @@ # Avoid CrashReporter popup on Mac --source include/not_crashrep.inc ---disable_query_log -# FIXME: The doublewrite buffer should not issue these warnings. -# FIXME: Maybe buf_dblwr_process() should empty the buffer at the end? -call mtr.add_suppression("InnoDB: A copy of page.*in the doublewrite buffer slot.*is not within space bounds"); -FLUSH TABLES; ---enable_query_log - ---let $restart_parameters=--innodb-undo-logs=4 --innodb-undo-tablespaces=2 --innodb-undo-log-truncate=1 --innodb-max-undo-log-size=10485760 --innodb-purge-rseg-truncate-frequency=1 --innodb-fast-shutdown=0 ---source include/restart_mysqld.inc +SET GLOBAL innodb_undo_logs = 4; +SET GLOBAL innodb_undo_log_truncate = 1; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; @@ -38,13 +32,19 @@ while ($i) { --enable_query_log commit; -let SEARCH_PATTERN = ib_undo_trunc_before_truncate; ---source include/truncate_recover.inc - -let SEARCH_PATTERN = ib_undo_trunc_before_ddl_log_end; ---source include/truncate_recover.inc +let SEARCH_PATTERN = ib_undo_trunc; +begin; +update t1 set c = 'MariaDB'; +update t1 set c = 'InnoDB'; +eval set global debug_dbug = '+d,$SEARCH_PATTERN'; +commit; +# FIXME: remove this work-around, and generate less log! +call mtr.add_suppression("InnoDB: The transaction log size is too large"); +SET GLOBAL innodb_fast_shutdown=0; +--source include/shutdown_mysqld.inc +--source include/search_pattern_in_file.inc +# FIXME: remove this work-around, and generate less log! +--let $restart_parameters= --innodb-buffer-pool-size=16m +--source include/start_mysqld.inc -let SEARCH_PATTERN = ib_undo_trunc_trunc_done; -let $restart_parameters= ---source include/truncate_recover.inc drop table t1; diff --git a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc b/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc deleted file mode 100644 index bef28a9c484..00000000000 --- a/mysql-test/suite/innodb_zip/include/innodb_wl6501_scale.inc +++ /dev/null @@ -1,112 +0,0 @@ -# -# load tables with some significant amount of data and then truncate it. -# - -#----------------------------------------------------------------------------- -# -# create test-bed -# -let $per_table = `select @@innodb_file_per_table`; -let $format = `select @@innodb_file_format`; - -let $WL6501_TMP_DIR = `select @@tmpdir`; -let $WL6501_DATA_DIR = `select @@datadir`; -set innodb_strict_mode=OFF; - -#----------------------------------------------------------------------------- -# -# create procedure to load data -# -delimiter |; -create procedure populate() -begin - declare i int default 1; - while (i <= 5000) do - insert into t1 values (i, 'a', 'b'); - insert into t2 values (i, 'a', 'b'); - insert into t3 values (i, 'a', 'b'); - set i = i + 1; - end while; -end| -create procedure populate_small() -begin - declare i int default 10001; - while (i <= 12000) do - insert into t1 values (i, 'c', 'd'); - insert into t2 values (i, 'a', 'b'); - insert into t3 values (i, 'a', 'b'); - set i = i + 1; - end while; -end| -delimiter ;| - -#----------------------------------------------------------------------------- -# -# create and load the tables. -# -eval set global innodb_file_per_table = $wl6501_file_per_table; ---replace_regex /[0-9]+/NUMBER/ -eval create table t1 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -eval create table t2 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -eval create temporary table t3 - (i int, c1 char(100), c2 char(100), - index c1_idx(c1)) - engine=innodb row_format=$wl6501_row_fmt - key_block_size=$wl6501_kbs; -# -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -begin; -call populate(); -commit; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -truncate table t1; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -call populate_small(); -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -truncate table t2; -truncate table t3; -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -call populate_small(); -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -# -drop table t1; -drop table t2; -drop table t3; - -#----------------------------------------------------------------------------- -# -# drop the procedure -# -drop procedure populate; -drop procedure populate_small; - -#----------------------------------------------------------------------------- -# -# remove test-bed -# -eval set global innodb_file_format = $format; -eval set global innodb_file_per_table = $per_table; diff --git a/mysql-test/suite/innodb_zip/r/restart.result b/mysql-test/suite/innodb_zip/r/restart.result index c4e6daf73fe..5102ebe4fe3 100644 --- a/mysql-test/suite/innodb_zip/r/restart.result +++ b/mysql-test/suite/innodb_zip/r/restart.result @@ -418,12 +418,12 @@ ALTER TABLE t7_restart TRUNCATE PARTITION p1; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot'); @@ -521,12 +521,12 @@ innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd test/t6_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p0.ibd test/t6_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p1.ibd -test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s0.ibd test/t7_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p0#sp#s1.ibd +test/t5_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t5_restart.ibd +test/t6_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t6_restart#p#p2.ibd test/t7_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s2.ibd test/t7_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t7_restart#p#p1#sp#s3.ibd SELECT count(*) FROM t5_restart; @@ -621,12 +621,12 @@ RENAME TABLE t7_restart TO t77_restart; === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); @@ -717,12 +717,12 @@ innodb_file_per_table ON === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/alt_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/alt_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart); @@ -848,12 +848,12 @@ t77_restart#p#p1#sp#s3.ibd === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQL_TMP_DIR/new_dir/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQL_TMP_DIR/new_dir/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); @@ -983,12 +983,12 @@ t77_restart.par === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t4_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t4_restart.ibd -test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd test/t66_restart#p#p0 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p0.ibd test/t66_restart#p#p1 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p1.ibd -test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd test/t77_restart#p#p0#sp#s0 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s0.ibd test/t77_restart#p#p0#sp#s1 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p0#sp#s1.ibd +test/t55_restart Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t55_restart.ibd +test/t66_restart#p#p2 Single DEFAULT DEFAULT Compressed MYSQLD_DATADIR/test/t66_restart#p#p2.ibd test/t77_restart#p#p1#sp#s2 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s2.ibd test/t77_restart#p#p1#sp#s3 Single DEFAULT DEFAULT Dynamic MYSQLD_DATADIR/test/t77_restart#p#p1#sp#s3.ibd INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart); diff --git a/mysql-test/suite/innodb_zip/r/wl6501_1.result b/mysql-test/suite/innodb_zip/r/wl6501_1.result deleted file mode 100644 index bf901804be5..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_1.result +++ /dev/null @@ -1,1202 +0,0 @@ -set global innodb_file_per_table=on; -# Verify that 'TRUNCATE TABLE' statement works fine and the size -# of .ibd file is equal to the initial size after truncation. -drop table if exists t1,t2,t3,t4,t6; -Warnings: -Note 1051 Unknown table 'test.t1' -Note 1051 Unknown table 'test.t2' -Note 1051 Unknown table 'test.t3' -Note 1051 Unknown table 'test.t4' -Note 1051 Unknown table 'test.t6' -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_during_drop_index_temp_table"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_during_drop_index_temp_table point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t5; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_drop_of_sec_index point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_drop_reinit_done_create_to_start---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t5; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_on_create_of_sec_index---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_before_log_removal"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_before_log_removal"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_before_log_removal"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_before_log_removal"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_before_log_removal point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_truncate_done"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_truncate_done point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; -create table t1(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=redundant; -create table t2(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compact; -create table t3(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=compressed key_block_size=4; -create table t4(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb row_format=dynamic; -create temporary table t5(c1 int not null, -c2 int not null, -c3 char(255) not null, -c4 text(500) not null, -c5 blob(500) not null, -c6 varchar(500) not null, -c7 varchar(500) not null, -c8 datetime, -c9 decimal(5,3), -primary key (c1), -index (c3,c4(50),c5(50)), -index (c2)) -engine=innodb; -create table t6 ( a int ) engine = innodb; -insert into t6 values (50),(100),(150); -select count(*) from t1; -count(*) -3 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -count(*) -3 -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t1; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -3 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t2; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -3 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t3; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -3 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -"---debug ib_trunc_crash_after_redo_log_write_complete point---" -# Write file to make mysql-test-run.pl expect crash and restart -# Run the crashing query -truncate table t4; -ERROR HY000: Lost connection to MySQL server during query -# Restart the MySQL server -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -select count(*) from t4; -count(*) -0 -select count(*) from t5; -ERROR 42S02: Table 'test.t5' doesn't exist -select count(*) from t6; -count(*) -3 -drop table t1, t2, t3, t4, t6; diff --git a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result b/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result deleted file mode 100644 index 554bb2892f6..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_3.result +++ /dev/null @@ -1,462 +0,0 @@ -call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary"); -call mtr.add_suppression("Cannot create file '.*'"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'"); -set global innodb_file_per_table = on; -"1. Hit crash point while writing redo log." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_while_writing_redo_log"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_before_log_removal"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 16; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_truncate_done"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -set global innodb_file_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 deleted file mode 100644 index d766ecceaac..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_4.result +++ /dev/null @@ -1,519 +0,0 @@ -call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary"); -call mtr.add_suppression("Cannot create file '.*'"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'"); -set global innodb_file_per_table = on; -"1. Hit crash point while writing redo log." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_while_writing_redo_log"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_before_log_removal"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_truncate_done"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -set global innodb_file_per_table = 1; -call mtr.add_suppression("does not exist in the InnoDB internal"); -set global innodb_file_per_table = on; -"1. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -set global innodb_file_per_table = 1; -set innodb_strict_mode=off; -create temporary table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check Error Table 'test.t' doesn't exist -test.t check status Operation failed -"2. Hit crash point after data is updated to system-table and" -" in-memory dict." -set global innodb_file_per_table = 1; -set innodb_strict_mode=off; -create temporary table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 4; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; -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 -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_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 deleted file mode 100644 index b5fea6382ff..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_crash_5.result +++ /dev/null @@ -1,462 +0,0 @@ -call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary"); -call mtr.add_suppression("Cannot create file '.*'"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'"); -set global innodb_file_per_table = on; -"1. Hit crash point while writing redo log." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine=innodb row_format=compressed -key_block_size=8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_while_writing_redo_log"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"2. Hit crash point on completion of redo log write." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_redo_log_write_complete"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"3. Hit crash point while dropping indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_drop_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"4. Hit crash point on completing drop of all indexes before creation" -" of index is commenced." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_drop_reinit_done_create_to_start"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"5. Hit crash point while creating indexes." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_clust_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_uniq_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_create_of_sec_index"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"6. Hit crash point after data is updated to system-table and" -" in-memory dict." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_on_updating_dict_sys_info"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -"7. Hit crash point before/after log checkpoint is done." -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_before_log_removal"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -use test; -set global innodb_file_per_table = 1; -SET innodb_strict_mode=OFF; -create table t ( -i int, f float, c char, -primary key pk(i), unique findex(f), index ck(c)) -engine = innodb row_format = compressed -key_block_size = 8; -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -check table t; -Table Op Msg_type Msg_text -test.t check status OK -set session debug = "+d,ib_trunc_crash_after_truncate_done"; -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 -check table t; -Table Op Msg_type Msg_text -test.t check status OK -select * from t; -i f c -insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'); -select * from t; -i f c -1 1.1 a -2 2.2 b -3 3.3 c -select * from t where f < 2.5; -i f c -1 1.1 a -2 2.2 b -drop table t; -set global innodb_file_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 deleted file mode 100644 index 3a74b6ebc11..00000000000 --- a/mysql-test/suite/innodb_zip/r/wl6501_scale_1.result +++ /dev/null @@ -1,345 +0,0 @@ -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 1; -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: 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: 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 is ignored for TEMPORARY TABLE. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ -set global innodb_file_per_table = 1; -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 1; -create table tNUMBER -(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), -index cNUMBER_idx(cNUMBER)) -engine=innodb row_format=compressed -key_block_size=NUMBER; -create table t2 -(i int, c1 char(100), c2 char(100), -index c1_idx(c1)) -engine=innodb row_format=compressed -key_block_size=16; -create temporary table t3 -(i int, c1 char(100), c2 char(100), -index c1_idx(c1)) -engine=innodb row_format=compressed -key_block_size=16; -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 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ -set global innodb_file_per_table = 1; -set innodb_strict_mode=OFF; -create procedure populate() -begin -declare i int default 1; -while (i <= 5000) do -insert into t1 values (i, 'a', 'b'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -create procedure populate_small() -begin -declare i int default 10001; -while (i <= 12000) do -insert into t1 values (i, 'c', 'd'); -insert into t2 values (i, 'a', 'b'); -insert into t3 values (i, 'a', 'b'); -set i = i + 1; -end while; -end| -set global innodb_file_per_table = 0; -create table tNUMBER -(i int, cNUMBER char(NUMBER), cNUMBER char(NUMBER), -index cNUMBER_idx(cNUMBER)) -engine=innodb row_format=compact -key_block_size=NUMBER; -Warnings: -Warning NUMBER InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning NUMBER InnoDB: ignoring KEY_BLOCK_SIZE=NUMBER. -create table t2 -(i int, c1 char(100), c2 char(100), -index c1_idx(c1)) -engine=innodb row_format=compact -key_block_size=16; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -create temporary table t3 -(i int, c1 char(100), c2 char(100), -index c1_idx(c1)) -engine=innodb row_format=compact -key_block_size=16; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE is ignored for TEMPORARY TABLE. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16. -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -begin; -call populate(); -commit; -select count(*) from t1; -count(*) -5000 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -truncate table t1; -select count(*) from t1; -count(*) -0 -select count(*) from t2; -count(*) -5000 -select count(*) from t3; -count(*) -5000 -call populate_small(); -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -7000 -select count(*) from t3; -count(*) -7000 -truncate table t2; -truncate table t3; -select count(*) from t1; -count(*) -2000 -select count(*) from t2; -count(*) -0 -select count(*) from t3; -count(*) -0 -call populate_small(); -select count(*) from t1; -count(*) -4000 -select count(*) from t2; -count(*) -2000 -select count(*) from t3; -count(*) -2000 -drop table t1; -drop table t2; -drop table t3; -drop procedure populate; -drop procedure populate_small; -set global innodb_file_format = Barracuda; -Warnings: -Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/ -set global innodb_file_per_table = 1; diff --git a/mysql-test/suite/innodb_zip/t/wl6501_1.test b/mysql-test/suite/innodb_zip/t/wl6501_1.test deleted file mode 100644 index dd8b5f65b31..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_1.test +++ /dev/null @@ -1,451 +0,0 @@ - -#################################################################### -# TC to check truncate table statement atomicity for single # -# tablespace # -# Sceanrio covered: # -# 1. Debug points added for worklog # -# 2. Table with differnt row types # -# 3. Transactional statement. # -#################################################################### - - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc ---source include/have_innodb_16k.inc - -# Valgrind would result in a "long semaphore wait" inside InnoDB ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -#----------------------------------------------------------------------- ---disable_query_log -let $MYSQL_DATA_DIR= `select @@datadir`; -let $data_directory = data directory='$MYSQL_TMP_DIR/alt_dir'; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; - -call mtr.add_suppression("InnoDB.*table did not exist in the InnoDB data dictionary.*"); -call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds.*"); -call mtr.add_suppression("InnoDB: Cannot create file.*"); -call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'.*"); -call mtr.add_suppression("InnoDB: A page in the doublewrite buffer is not within space bounds"); -call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal"); ---enable_query_log - -#----------------------------------------------------------------------- -set global innodb_file_per_table=on; ---echo # Verify that 'TRUNCATE TABLE' statement works fine and the size ---echo # of .ibd file is equal to the initial size after truncation. - -#----------------------------------------------------------------------- -drop table if exists t1,t2,t3,t4,t6; -let $cnt = 6; -while ($cnt) { - - # table with basic data type + primary ,secondary,composite,prefix index - create table t1(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=redundant; - - - create table t2(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=compact; - - - # with row type , key block size = 4K - create table t3(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=compressed key_block_size=4; - - - create table t4(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb row_format=dynamic; - - - create temporary table t5(c1 int not null, - c2 int not null, - c3 char(255) not null, - c4 text(500) not null, - c5 blob(500) not null, - c6 varchar(500) not null, - c7 varchar(500) not null, - c8 datetime, - c9 decimal(5,3), - primary key (c1), - index (c3,c4(50),c5(50)), - index (c2)) - engine=innodb; - - create table t6 ( a int ) engine = innodb; - insert into t6 values (50),(100),(150); - - --disable_query_log - --disable_result_log - let $n=5; - - # load created tables. - while ($n) - { - start transaction; - - eval insert ignore into t1 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t2 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t3 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t4 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - eval insert ignore into t5 values( - $n, $n, - repeat(concat(' tc3_',$n), 42), - repeat(concat(' tc4_',$n), 300), - repeat(concat(' tc5_',$n), 300), - repeat(concat(' tc6_',$n), 300), - repeat(concat(' tc7_',$n), 300), - now(), (100.55+$n)); - - if ($n <= 3) - { - commit; - } - - if ($n > 3) - { - rollback; - } - - dec $n; - } - - # validate loading of the tables. - --enable_result_log - --enable_query_log - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - select count(*) from t5; - select count(*) from t6; - - # set the debug crash point and exercise them. - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_during_drop_index_temp_table"; - --echo "---debug ib_trunc_crash_during_drop_index_temp_table point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_drop_reinit_done_create_to_start"; - --echo "---debug ib_trunc_crash_drop_reinit_done_create_to_start---" - } - - if ($cnt >= 5) { - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t5; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - } - - # set the debug crash point and exercise them. - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t1; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t2; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t3; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - - if ($cnt == 6) - { - set session debug="+d,ib_trunc_crash_on_drop_of_sec_index"; - --echo "---debug ib_trunc_crash_on_drop_of_sec_index point---" - } - if ($cnt == 5) - { - set session debug="+d,ib_trunc_crash_on_create_of_sec_index"; - --echo "---debug ib_trunc_crash_on_create_of_sec_index---" - } - if ($cnt == 4) - { - set session debug="+d,ib_trunc_crash_before_log_removal"; - --echo "---debug ib_trunc_crash_before_log_removal point---" - } - if ($cnt == 3) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 2) - { - set session debug="+d,ib_trunc_crash_after_truncate_done"; - --echo "---debug ib_trunc_crash_after_truncate_done point---" - } - if ($cnt == 1) - { - set session debug="+d,ib_trunc_crash_after_redo_log_write_complete"; - --echo "---debug ib_trunc_crash_after_redo_log_write_complete point---" - } - - --echo # Write file to make mysql-test-run.pl expect crash and restart - --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --echo # Run the crashing query - --error 2013 - truncate table t4; - --source include/wait_until_disconnected.inc - --enable_reconnect - --echo # Restart the MySQL server - --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect - --source include/wait_until_connected_again.inc - --disable_reconnect - select count(*) from t1; - select count(*) from t2; - select count(*) from t3; - select count(*) from t4; - --error ER_NO_SUCH_TABLE - select count(*) from t5; - select count(*) from t6; - - drop table t1, t2, t3, t4, t6; - - dec $cnt; - - --disable_query_log - eval set global innodb_file_per_table=$innodb_file_per_table_orig; - --enable_query_log -} - - - diff --git a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test b/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test deleted file mode 100644 index 3ec990b4715..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_3.test +++ /dev/null @@ -1,25 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace -# with page-size=16k - ---source include/have_innodb.inc ---source include/have_innodb_16k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 16; ---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 deleted file mode 100644 index f54df3c128c..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_4.test +++ /dev/null @@ -1,27 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace. -# with page-size=4k - ---source include/have_innodb.inc ---source include/have_innodb_4k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 4; ---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 deleted file mode 100644 index 2f9847ae5fb..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_crash_5.test +++ /dev/null @@ -1,25 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# TC tries to hit crash point during truncate of -# compressed non-temp table residing in single tablespace. -# with page-size=8k - ---source include/have_innodb.inc ---source include/have_innodb_8k.inc ---source include/have_debug.inc ---source include/big_test.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compressed; -let $wl6501_kbs = 8; ---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 deleted file mode 100644 index e6392759d5e..00000000000 --- a/mysql-test/suite/innodb_zip/t/wl6501_scale_1.test +++ /dev/null @@ -1,37 +0,0 @@ -# -# WL#6501: make truncate table atomic -# - -# load table with some significiant amount of data -# and then try truncate - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc ---source include/have_innodb_16k.inc - -# Valgrind would complain about memory leaks when we crash on purpose. ---source include/not_valgrind.inc -# Embedded server does not support crashing ---source include/not_embedded.inc -# Avoid CrashReporter popup on Mac ---source include/not_crashrep.inc - - -# Single-Tablespace/Non-Compressed -let $wl6501_file_per_table = 1; -let $wl6501_row_fmt = compact; -let $wl6501_kbs = 16; ---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; ---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; ---source suite/innodb_zip/include/innodb_wl6501_scale.inc diff --git a/mysql-test/suite/mariabackup/truncate_during_backup.test b/mysql-test/suite/mariabackup/truncate_during_backup.test index c01a74588e7..46ee244dfb0 100644 --- a/mysql-test/suite/mariabackup/truncate_during_backup.test +++ b/mysql-test/suite/mariabackup/truncate_during_backup.test @@ -7,7 +7,6 @@ CREATE TABLE t1 ENGINE=InnoDB SELECT 1; --let after_load_tablespaces=TRUNCATE test.t1 --disable_result_log ---error 1 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; --enable_result_log |