| 1 |
drop database if exists mysqltest; |
| 2 |
create database mysqltest; |
| 3 |
connect admin, localhost, root,,mysqltest,,; |
| 4 |
connection default; |
| 5 |
use mysqltest; |
| 6 |
connection default; |
| 7 |
connection admin; |
| 8 |
* shut down mysqld, removed logs, restarted it |
| 9 |
connection default; |
| 10 |
create table t1 (a varchar(10000)) engine=aria; |
| 11 |
* TEST of over-allocated bitmap not flushed by checkpoint |
| 12 |
insert into t1 values ("bbbbbbb"); |
| 13 |
connection admin; |
| 14 |
flush table t1; |
| 15 |
* copied t1 for comparison |
| 16 |
connection default; |
| 17 |
insert into t1 values ("bbbbbbb"); |
| 18 |
delete from t1 limit 1; |
| 19 |
connect extra, localhost, root,,mysqltest,,; |
| 20 |
set session debug_dbug="+d,info,enter,exit,maria_over_alloc_bitmap"; |
| 21 |
insert into t1 values ("aaaaaaaaa"); |
| 22 |
connection admin; |
| 23 |
set global aria_checkpoint_interval=1; |
| 24 |
connection admin; |
| 25 |
SET SESSION debug_dbug="+d,maria_crash"; |
| 26 |
* crashing mysqld intentionally |
| 27 |
set global aria_checkpoint_interval=1; |
| 28 |
ERROR HY000: Lost connection to server during query |
| 29 |
* recovery happens |
| 30 |
check table t1 extended; |
| 31 |
Table Op Msg_type Msg_text |
| 32 |
mysqltest.t1 check status OK |
| 33 |
* testing that checksum after recovery is as expected |
| 34 |
Checksum-check |
| 35 |
ok |
| 36 |
connection default; |
| 37 |
use mysqltest; |
| 38 |
connection default; |
| 39 |
* TEST of bitmap flushed without REDO-UNDO in the log (WAL violation) |
| 40 |
connection admin; |
| 41 |
flush table t1; |
| 42 |
* copied t1 for comparison |
| 43 |
connection default; |
| 44 |
lock tables t1 write; |
| 45 |
insert into t1 values (REPEAT('a', 6000)); |
| 46 |
connection admin; |
| 47 |
SET SESSION debug_dbug="+d,maria_flush_bitmap,maria_crash"; |
| 48 |
* crashing mysqld intentionally |
| 49 |
set global aria_checkpoint_interval=1; |
| 50 |
ERROR HY000: Lost connection to server during query |
| 51 |
* recovery happens |
| 52 |
check table t1 extended; |
| 53 |
Table Op Msg_type Msg_text |
| 54 |
mysqltest.t1 check status OK |
| 55 |
* testing that checksum after recovery is as expected |
| 56 |
Checksum-check |
| 57 |
ok |
| 58 |
connection default; |
| 59 |
use mysqltest; |
| 60 |
drop table t1; |
| 61 |
drop database mysqltest_for_comparison; |
| 62 |
drop database mysqltest; |