summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/truncate_inject.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-07 22:15:06 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-07 22:15:06 +0300
commit5a1868b58d26b286b6ad433096e7184895953311 (patch)
tree9cee54b5852a4e33897d4fdf22c8c85619d12662 /mysql-test/suite/innodb/t/truncate_inject.test
parent4901f31c13f91e130f077f2f77b32c40b0036e32 (diff)
parent980d1bf1a921a270423ab36bd5d1ce2a1cd7590b (diff)
downloadmariadb-git-5a1868b58d26b286b6ad433096e7184895953311.tar.gz
MDEV-13564 Mariabackup does not work with TRUNCATE
This is a merge from 10.2, but the 10.2 version of this will not be pushed into 10.2 yet, because the 10.2 version would include backports of MDEV-14717 and MDEV-14585, which would introduce a crash recovery regression: Tables could be lost on table-rebuilding DDL operations, such as ALTER TABLE, OPTIMIZE TABLE or this new backup-friendly TRUNCATE TABLE. The test innodb.truncate_crash occasionally loses the table due to the following bug: MDEV-17158 log_write_up_to() sometimes fails
Diffstat (limited to 'mysql-test/suite/innodb/t/truncate_inject.test')
-rw-r--r--mysql-test/suite/innodb/t/truncate_inject.test97
1 files changed, 0 insertions, 97 deletions
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;