2016-08-12 11:17:45 +03:00
|
|
|
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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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";
|
2016-09-09 10:01:18 +03:00
|
|
|
Warnings:
|
|
|
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
2016-08-12 11:17:45 +03:00
|
|
|
"---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;
|