| 1 |
set global aria_log_file_size=4294959104; |
| 2 |
drop database if exists mysqltest; |
| 3 |
create database mysqltest; |
| 4 |
connect admin, localhost, root,,mysqltest,,; |
| 5 |
connection default; |
| 6 |
use mysqltest; |
| 7 |
* TEST of recovery with blobs |
| 8 |
connection default; |
| 9 |
connection admin; |
| 10 |
* shut down mysqld, removed logs, restarted it |
| 11 |
connection default; |
| 12 |
create table t1 (a int, b longtext) engine=aria table_checksum=1; |
| 13 |
connection admin; |
| 14 |
* copied t1 for feeding_recovery |
| 15 |
connection default; |
| 16 |
insert into t1 values (1,"123456789012345678901234567890"),(2,"09876543210987654321"); |
| 17 |
connection admin; |
| 18 |
flush table t1; |
| 19 |
* copied t1 for comparison |
| 20 |
connection default; |
| 21 |
lock table t1 write; |
| 22 |
update t1 set b=CONCAT(b,b); |
| 23 |
update t1 set b=CONCAT(b,b); |
| 24 |
update t1 set b=CONCAT(b,b); |
| 25 |
update t1 set b=CONCAT(b,b); |
| 26 |
update t1 set b=CONCAT(b,b); |
| 27 |
update t1 set b=CONCAT(b,b); |
| 28 |
update t1 set b=CONCAT(b,b); |
| 29 |
update t1 set b=CONCAT(b,b); |
| 30 |
update t1 set b=CONCAT(b,b); |
| 31 |
update t1 set b=CONCAT(b,b); |
| 32 |
update t1 set b=CONCAT(b,b); |
| 33 |
update t1 set b=CONCAT(b,b); |
| 34 |
update t1 set b=CONCAT(b,b); |
| 35 |
update t1 set b=CONCAT(b,b); |
| 36 |
update t1 set b=CONCAT(b,b); |
| 37 |
update t1 set b=CONCAT(b,b); |
| 38 |
update t1 set b=CONCAT(b,b); |
| 39 |
update t1 set b=CONCAT(b,b); |
| 40 |
update t1 set b=CONCAT(b,b); |
| 41 |
update t1 set b=CONCAT(b,b); |
| 42 |
select a,length(b) from t1; |
| 43 |
a length(b) |
| 44 |
1 31457280 |
| 45 |
2 20971520 |
| 46 |
update t1 set b=mid(b,1,length(b)/2); |
| 47 |
update t1 set b=mid(b,1,length(b)/2); |
| 48 |
update t1 set b=mid(b,1,length(b)/2); |
| 49 |
update t1 set b=mid(b,1,length(b)/2); |
| 50 |
update t1 set b=mid(b,1,length(b)/2); |
| 51 |
update t1 set b=mid(b,1,length(b)/2); |
| 52 |
update t1 set b=mid(b,1,length(b)/2); |
| 53 |
update t1 set b=mid(b,1,length(b)/2); |
| 54 |
update t1 set b=mid(b,1,length(b)/2); |
| 55 |
update t1 set b=mid(b,1,length(b)/2); |
| 56 |
update t1 set b=mid(b,1,length(b)/2); |
| 57 |
update t1 set b=mid(b,1,length(b)/2); |
| 58 |
update t1 set b=mid(b,1,length(b)/2); |
| 59 |
update t1 set b=mid(b,1,length(b)/2); |
| 60 |
update t1 set b=mid(b,1,length(b)/2); |
| 61 |
update t1 set b=mid(b,1,length(b)/2); |
| 62 |
update t1 set b=mid(b,1,length(b)/2); |
| 63 |
update t1 set b=mid(b,1,length(b)/2); |
| 64 |
update t1 set b=mid(b,1,length(b)/2); |
| 65 |
update t1 set b=mid(b,1,length(b)/2); |
| 66 |
update t1 set b=mid(b,1,length(b)/2); |
| 67 |
update t1 set b=mid(b,1,length(b)/2); |
| 68 |
select a,length(b) from t1; |
| 69 |
a length(b) |
| 70 |
1 8 |
| 71 |
2 5 |
| 72 |
connection admin; |
| 73 |
SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash"; |
| 74 |
* crashing mysqld intentionally |
| 75 |
set global aria_checkpoint_interval=1; |
| 76 |
ERROR HY000: Lost connection to server during query |
| 77 |
* copied t1 back for feeding_recovery |
| 78 |
* recovery happens |
| 79 |
check table t1 extended; |
| 80 |
Table Op Msg_type Msg_text |
| 81 |
mysqltest.t1 check status OK |
| 82 |
* testing that checksum after recovery is as expected |
| 83 |
Checksum-check |
| 84 |
ok |
| 85 |
connection default; |
| 86 |
use mysqltest; |
| 87 |
drop table t1; |
| 88 |
drop database mysqltest_for_feeding_recovery; |
| 89 |
drop database mysqltest_for_comparison; |
| 90 |
drop database mysqltest; |