1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-14868 MariaDB server crashes after using ROLLBACK TO when encrypt_tmp_files=ON

add a test that restores the data from a binlog
This commit is contained in:
Sergei Golubchik
2018-02-07 19:08:53 +01:00
parent 60dfe12be3
commit b75d8453d4
2 changed files with 76 additions and 12 deletions

View File

@ -28,6 +28,7 @@ h 10
i 10
j 10
drop table t1;
reset master;
set global binlog_cache_size=8192;
create table t1 (a text) engine=innodb;
start transaction;
@ -36,14 +37,67 @@ commit;
start transaction;
insert t1 select repeat(seq, 1000) from seq_1_to_8;
commit;
drop table t1;
create table t1 (a text) engine=innodb;
create table t2 (a text) engine=innodb;
start transaction;
insert t1 select repeat(seq, 1000) from seq_1_to_15;
insert t2 select repeat(seq, 1000) from seq_1_to_15;
savepoint foo;
insert t1 select repeat(seq, 1000) from seq_16_to_30;
insert t2 select repeat(seq, 1000) from seq_16_to_30;
rollback to savepoint foo;
insert t1 select repeat(seq, 1000) from seq_31_to_40;
insert t2 select repeat(seq, 1000) from seq_31_to_40;
commit;
drop table t1;
flush binary logs;
drop table t1, t2;
set global binlog_cache_size=default;
select left(a, 10) from t1;
left(a, 10)
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666
7777777777
8888888888
9999999999
1010101010
1111111111
1212121212
1313131313
1414141414
1515151515
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666
7777777777
8888888888
select left(a, 10) from t2;
left(a, 10)
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666
7777777777
8888888888
9999999999
1010101010
1111111111
1212121212
1313131313
1414141414
1515151515
3131313131
3232323232
3333333333
3434343434
3535353535
3636363636
3737373737
3838383838
3939393939
4040404040
drop table t1, t2;