set session debug = "+d,ib_trunc_crash_before_log_removal";
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select count(*) from t1;
count(*)
0
begin;
call populate_t1();
commit;
select count(*) from t1;
count(*)
200
drop table t1;
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t1 (a int not null, d int not null, b varchar(198) not null,
c char(185), unique key (b(10), a, d), index (d), index(a),
index (c(120), b(120)), index (b(5), c(10), a))
engine=InnoDB stats_persistent=0;
begin;
call populate_t1();
commit;
select count(*) from t1;
count(*)
200
set session debug = "+d,ib_trunc_crash_before_log_removal";
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select count(*) from t1;
count(*)
0
begin;
call populate_t1();
commit;
select count(*) from t1;
count(*)
200
drop table t1;
drop procedure populate_t1;
"5 check truncate with lock/unlock"
use test;
set global innodb_file_per_table = 1;
create table master
(i int, f float, c char(100),
primary key pk(i), index fidx(f))
engine = innodb;
insert into master values
(1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'),
(4, 4.4, 'd'), (5, 5.5, 'e');
select * from master;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
4 4.4 d
5 5.5 e
"--In con1 connection--"
use test;
lock tables master write;
"--In default connection--"
use test;
truncate table master;;
"--In con1 connection--"
select * from master;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
4 4.4 d
5 5.5 e
unlock tables;
"--In default connection--"
select * from master;
i f c
drop table master;
use test;
set global innodb_file_per_table = 1;
create table t1
(i int, f float, c char(100),
primary key pk(i), index fidx(f))
engine = innodb;
insert into t1 values
(1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'),
(4, 4.4, 'd'), (5, 5.5, 'e');
select * from t1;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
4 4.4 d
5 5.5 e
set session debug = "+d,ib_trunc_crash_after_logging_complete";
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select * from t1;
i f c
insert into t1 values
(1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
select * from t1;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t1;
use test;
set global innodb_file_per_table = 1;
create table t1
(i int, f float, c char(100),
primary key pk(i), index fidx(f))
engine = innodb;
insert into t1 values
(1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c'),
(4, 4.4, 'd'), (5, 5.5, 'e');
select * from t1;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
4 4.4 d
5 5.5 e
set session debug = "+d,ib_trunc_crash_with_intermediate_log_checkpoint";
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
select * from t1;
i f c
drop table t1;
use test;
create table t (i int, j int) engine=innodb;
insert into t values (1,1), (2,2), (3,3);
select * from t;
i j
1 1
2 2
3 3
set session debug="+d,ib_err_trunc_oom_logging";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug="-d,ib_err_trunc_oom_logging";
select * from t;
i j
1 1
2 2
3 3
select * from t;
i j
1 1
2 2
3 3
set session debug="+d,ib_err_trunc_writing_magic_number";
truncate table t;
select * from t;
i j
insert into t values (1,1), (2,2), (3,3);
select * from t;
i j
1 1
2 2
3 3
# Restart the MySQL server
# restart
select * from t;
i j
1 1
2 2
3 3
drop table t;
use test;
create table t (i int, j int, primary key pk(i), index idx(j)) engine=innodb;
insert into t values (1,1), (2,2), (3,3);
select * from t;
i j
1 1
2 2
3 3
set session debug="+d,ib_trunc_crash_after_updating_magic_no";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
select * from t;
i j
drop table t;
use test;
set global innodb_file_per_table = 0;
create table t1 (i int, primary key pk(i)) engine=innodb;
create table t2 (j int) engine=innodb;
insert into t1 values (1), (2), (3), (4), (5);
insert into t2 values (1), (2), (3), (4), (5);
select * from t1;
i
1
2
3
4
5
select * from t2;
j
1
2
3
4
5
use test;
use test;
select * from t1;
i
1
2
3
4
5
set DEBUG_SYNC='RESET';
set DEBUG_SYNC='ib_trunc_table_trunc_completing SIGNAL trunc_completing WAIT_FOR trunc_continue';
truncate table t1;
set DEBUG_SYNC='now WAIT_FOR trunc_completing';
select * from t2;
j
1
2
3
4
5
truncate table t2;
select * from t2;
j
set DEBUG_SYNC='now SIGNAL trunc_continue';
select * from t1;
i
set DEBUG_SYNC='RESET';
drop table t1;
drop table t2;
use test;
set global innodb_file_per_table = 1;
create table t1 (a int, b char(100), c char(100)) engine = innodb;
create procedure populate_t1()
begin
declare i int default 1;
while (i <= 2000) DO
insert into t1 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
begin;
call populate_t1();
commit;
set session debug="+d,ib_trunc_crash_after_truncate_done";
begin;
update t1 set a = a + 1000;
commit;
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
# Restart the MySQL server
select count(*) from t1;
count(*)
0
drop procedure populate_t1;
drop table t1;
use test;
set global innodb_file_per_table = 1;
create table t1 (a int, b char(100), c char(100)) engine = innodb;
create table t2 (a int, b char(100), c char(100)) engine = innodb;
create table t3 (a int, b char(100), c char(100)) engine = innodb;
create procedure populate_t1()
begin
declare i int default 1;
while (i <= 2000) DO
insert into t1 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
create procedure populate_t2()
begin
declare i int default 1;
while (i <= 2000) DO
insert into t2 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
create procedure populate_t3()
begin
declare i int default 1;
while (i <= 2000) DO
insert into t3 values (i, 'a', 'b');
set i = i + 1;
end while;
end|
begin;
call populate_t1();
call populate_t2();
call populate_t3();
commit;
select count(*) from t1;
count(*)
2000
truncate table t1;
select count(*) from t1;
count(*)
0
select count(*) from t2;
count(*)
2000
truncate table t2;
select count(*) from t2;
count(*)
0
select count(*) from t3;
count(*)
2000
set session debug="+d,ib_trunc_crash_after_truncate_done";
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
begin;
call populate_t1();
call populate_t2();
call populate_t3();
commit;
select count(*) from t1;
count(*)
2000
select count(*) from t2;
count(*)
2000
select count(*) from t3;
count(*)
2000
truncate table t1;
truncate table t1;
set session debug="+d,ib_trunc_crash_after_truncate_done";
truncate table t1;
ERROR HY000: Lost connection to MySQL server during query
call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
"1. Hit crash point on completing drop of all indexes before creation"
" of index is commenced."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set 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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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;
"2. Hit crash point after data is updated to system-table and"
" in-memory dict."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set 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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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. Post truncate recovery, abruptly shutdown the server."
" On restart ensure table state is maintained."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
# Kill and restart
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;
call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
"1. Hit crash point on completing drop of all indexes before creation"
" of index is commenced."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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;
"2. Hit crash point after data is updated to system-table and"
" in-memory dict."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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. Post truncate recovery, abruptly shutdown the server."
" On restart ensure table state is maintained."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
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 = compact
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
# Kill and restart
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;
call mtr.add_suppression("The file '.*' already exists though the corresponding table did not exist in the InnoDB data dictionary");
call mtr.add_suppression("InnoDB: Error number 17 means 'File exists'");
"1. Hit crash point on completing drop of all indexes before creation"
" of index is commenced."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode=off;
create 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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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;
"2. Hit crash point after data is updated to system-table and"
" in-memory dict."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode=off;
create 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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
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. Post truncate recovery, abruptly shutdown the server."
" On restart ensure table state is maintained."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set innodb_strict_mode=off;
create table t (
i int, f float, c char,
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";
truncate table t;
ERROR HY000: Lost connection to MySQL server during query
# restart
check table t;
Table Op Msg_type Msg_text
test.t check status OK
select * from t;
i f c
insert into t values (1, 1.1, 'a'), (2, 2.2, 'b'), (3, 3.3, 'c');
"1. Error in assigning undo logs for truncate action."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_assigning_undo_log";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_assigning_undo_log";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"2. Error while preparing for truncate."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"3. Error while dropping/creating indexes"
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_drop_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_drop_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_create_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_create_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create temporary table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_temp_recreate_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_temp_recreate_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"4. Error while completing truncate of table involving FTS."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compact
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
i f c
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
set session debug = "+d,ib_err_trunc_during_fts_trunc";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_fts_trunc";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"5. Error while updating sys-tables."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compact
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
i f c
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
set session debug = "+d,ib_err_trunc_during_sys_table_update";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_sys_table_update";
select * from t order by i;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set global innodb_file_per_table = on;
set innodb_strict_mode=off;
"1. Error in assigning undo logs for truncate action."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_assigning_undo_log";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_assigning_undo_log";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"2. Error while preparing for truncate."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"3. Error while dropping/creating indexes"
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_drop_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_drop_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_create_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_create_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create temporary table t (
i int, f float, c char,
primary key pk(i), unique findex(f), index ck(c))
engine = innodb row_format = compact
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
set session debug = "+d,ib_err_trunc_temp_recreate_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_temp_recreate_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"4. Error while completing truncate of table involving FTS."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compact
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
i f c
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
set session debug = "+d,ib_err_trunc_during_fts_trunc";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_fts_trunc";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"5. Error while updating sys-tables."
set global innodb_file_per_table = 0;
set global innodb_file_format = 'Antelope';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compact
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
i f c
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
set session debug = "+d,ib_err_trunc_during_sys_table_update";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_sys_table_update";
select * from t order by i;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set global innodb_file_per_table = on;
set innodb_strict_mode=off;
"1. Error in assigning undo logs for truncate action."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_assigning_undo_log";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_assigning_undo_log";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"2. Error while preparing for truncate."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"3. Error while dropping/creating indexes"
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_drop_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_drop_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_create_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_create_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create 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
set session debug = "+d,ib_err_trunc_temp_recreate_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_temp_recreate_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"4. Error while completing truncate of table involving FTS."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=4;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
i f c
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
set session debug = "+d,ib_err_trunc_during_fts_trunc";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_fts_trunc";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"5. Error while updating sys-tables."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=4;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
i f c
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
set session debug = "+d,ib_err_trunc_during_sys_table_update";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_sys_table_update";
select * from t order by i;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set global innodb_file_per_table = on;
set innodb_strict_mode=off;
"1. Error in assigning undo logs for truncate action."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_assigning_undo_log";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_assigning_undo_log";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"2. Error while preparing for truncate."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"3. Error while dropping/creating indexes"
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_drop_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_drop_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_create_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_create_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create 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 = 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
set session debug = "+d,ib_err_trunc_temp_recreate_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_temp_recreate_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"4. Error while completing truncate of table involving FTS."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=8;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
i f c
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
set session debug = "+d,ib_err_trunc_during_fts_trunc";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_fts_trunc";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"5. Error while updating sys-tables."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=8;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
i f c
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
set session debug = "+d,ib_err_trunc_during_sys_table_update";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_sys_table_update";
select * from t order by i;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
set global innodb_file_per_table = 1;
set global innodb_file_per_table = on;
set innodb_strict_mode=off;
"1. Error in assigning undo logs for truncate action."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_assigning_undo_log";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_assigning_undo_log";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"2. Error while preparing for truncate."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_preparing_for_truncate";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_preparing_for_truncate";
select * from t;
i f c
1 1.1 a
2 2.2 b
3 3.3 c
drop table t;
"3. Error while dropping/creating indexes"
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_drop_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_drop_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table 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
set session debug = "+d,ib_err_trunc_create_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_create_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create 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 = 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
set session debug = "+d,ib_err_trunc_temp_recreate_index";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_temp_recreate_index";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"4. Error while completing truncate of table involving FTS."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t;
i f c
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
set session debug = "+d,ib_err_trunc_during_fts_trunc";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_fts_trunc";
select * from t;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
"5. Error while updating sys-tables."
set global innodb_file_per_table = 1;
set global innodb_file_format = 'Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
create table t (i int, f float, c char(100),
primary key pk(i), index fk(f), fulltext index ck(c))
engine=innodb row_format=compressed
key_block_size=16;
insert into t values (1, 1.1, 'mysql is now oracle company'),
(2, 2.2, 'innodb is part of mysql'),
(3, 3.3, 'innodb is default storage engine of mysql');
select * from t order by i;
i f c
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
set session debug = "+d,ib_err_trunc_during_sys_table_update";
truncate table t;
ERROR HY000: Got error 168 from storage engine
set session debug = "-d,ib_err_trunc_during_sys_table_update";
select * from t order by i;
ERROR HY000: Operation cannot be performed. The table 'test.t' is missing, corrupt or contains bad data.
drop table t;
set global innodb_file_format = Barracuda;
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html