| 1 |
SHOW VARIABLES LIKE 'aria_log_file_size'; |
| 2 |
Variable_name Value |
| 3 |
aria_log_file_size 8388608 |
| 4 |
CREATE PROCEDURE display_aria_log_control(ctrl BLOB) |
| 5 |
BEGIN |
| 6 |
SELECT HEX(REVERSE(SUBSTRING(ctrl, 42, 4))) AS last_logno; |
| 7 |
END; |
| 8 |
$$ |
| 9 |
CREATE PROCEDURE populate_t1() |
| 10 |
BEGIN |
| 11 |
FOR id IN 0..9 DO |
| 12 |
INSERT INTO test.t1 (id, txt) VALUES (id, REPEAT(id,1024*1024)); |
| 13 |
END FOR; |
| 14 |
END; |
| 15 |
$$ |
| 16 |
CREATE TABLE test.t1(id INT, txt LONGTEXT) ENGINE=Aria; |
| 17 |
# MYSQLD_DATADIR/aria_log_control before --backup |
| 18 |
CALL display_aria_log_control(@aria_log_control); |
| 19 |
last_logno |
| 20 |
00000001 |
| 21 |
# Running --backup |
| 22 |
# MYSQLD_DATADIR/aria_log_control after --backup |
| 23 |
CALL display_aria_log_control(@aria_log_control); |
| 24 |
last_logno |
| 25 |
00000002 |
| 26 |
# targetdir/aria_log_control after --backup |
| 27 |
CALL display_aria_log_control(@aria_log_control); |
| 28 |
last_logno |
| 29 |
00000001 |
| 30 |
# Running --prepare |
| 31 |
# targetdir/aria_log_control after --prepare |
| 32 |
CALL display_aria_log_control(@aria_log_control); |
| 33 |
last_logno |
| 34 |
00000002 |
| 35 |
# shutdown server |
| 36 |
# remove datadir |
| 37 |
# xtrabackup move back |
| 38 |
# restart |
| 39 |
# MYSQLD_DATADIR/aria_log_control after --copy-back |
| 40 |
CALL display_aria_log_control(@aria_log_control); |
| 41 |
last_logno |
| 42 |
00000002 |
| 43 |
# Checking that after --restore all t1 data is there |
| 44 |
SELECT id, LENGTH(txt) FROM t1 ORDER BY id; |
| 45 |
id LENGTH(txt) |
| 46 |
0 1048576 |
| 47 |
1 1048576 |
| 48 |
2 1048576 |
| 49 |
3 1048576 |
| 50 |
4 1048576 |
| 51 |
5 1048576 |
| 52 |
6 1048576 |
| 53 |
7 1048576 |
| 54 |
8 1048576 |
| 55 |
9 1048576 |
| 56 |
DROP TABLE t1; |
| 57 |
DROP PROCEDURE populate_t1; |
| 58 |
DROP PROCEDURE display_aria_log_control; |