| 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 |
connection default; |
| 8 |
connection admin; |
| 9 |
* shut down mysqld, removed logs, restarted it |
| 10 |
connection default; |
| 11 |
CREATE TABLE t1 ( |
| 12 |
line POINT NOT NULL, |
| 13 |
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po', |
| 14 |
name VARCHAR(32) |
| 15 |
,SPATIAL key (line) |
| 16 |
) transactional=1 row_format=page engine=aria; |
| 17 |
SHOW INDEX FROM t1; |
| 18 |
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored |
| 19 |
t1 1 line 1 line A NULL 32 NULL SPATIAL NO |
| 20 |
CREATE TABLE t2 (a VARCHAR(200), b TEXT, FULLTEXT (a,b) |
| 21 |
) transactional=1 row_format=page engine=aria; |
| 22 |
SHOW INDEX FROM t2; |
| 23 |
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored |
| 24 |
t2 1 a 1 a NULL NULL NULL NULL YES FULLTEXT NO |
| 25 |
t2 1 a 2 b NULL NULL NULL NULL YES FULLTEXT NO |
| 26 |
* TEST of REDO: see if recovery can reconstruct if we give it an old table |
| 27 |
connection admin; |
| 28 |
* copied t2 for feeding_recovery |
| 29 |
* copied t1 for feeding_recovery |
| 30 |
connection default; |
| 31 |
connection admin; |
| 32 |
flush table t2; |
| 33 |
* copied t2 for comparison |
| 34 |
flush table t1; |
| 35 |
* copied t1 for comparison |
| 36 |
connection default; |
| 37 |
connection admin; |
| 38 |
SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash"; |
| 39 |
* crashing mysqld intentionally |
| 40 |
set global aria_checkpoint_interval=1; |
| 41 |
ERROR HY000: Lost connection to server during query |
| 42 |
* copied t2 back for feeding_recovery |
| 43 |
* copied t1 back for feeding_recovery |
| 44 |
* recovery happens |
| 45 |
check table t2 extended; |
| 46 |
Table Op Msg_type Msg_text |
| 47 |
mysqltest.t2 check status OK |
| 48 |
* testing that checksum after recovery is as expected |
| 49 |
Checksum-check |
| 50 |
ok |
| 51 |
check table t1 extended; |
| 52 |
Table Op Msg_type Msg_text |
| 53 |
mysqltest.t1 check status OK |
| 54 |
* testing that checksum after recovery is as expected |
| 55 |
Checksum-check |
| 56 |
ok |
| 57 |
connection default; |
| 58 |
use mysqltest; |
| 59 |
* TEST of INSERT and DELETE's rollback |
| 60 |
connection admin; |
| 61 |
flush table t2; |
| 62 |
* copied t2 for comparison |
| 63 |
flush table t1; |
| 64 |
* copied t1 for comparison |
| 65 |
connection default; |
| 66 |
lock tables t1 write, t2 write; |
| 67 |
connection admin; |
| 68 |
SET SESSION debug_dbug="+d,maria_crash"; |
| 69 |
* crashing mysqld intentionally |
| 70 |
set global aria_checkpoint_interval=1; |
| 71 |
ERROR HY000: Lost connection to server during query |
| 72 |
* recovery happens |
| 73 |
check table t2 extended; |
| 74 |
Table Op Msg_type Msg_text |
| 75 |
mysqltest.t2 check status OK |
| 76 |
* testing that checksum after recovery is as expected |
| 77 |
Checksum-check |
| 78 |
ok |
| 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 |
connection admin; |
| 88 |
flush table t2; |
| 89 |
* copied t2 for comparison |
| 90 |
flush table t1; |
| 91 |
* copied t1 for comparison |
| 92 |
connection default; |
| 93 |
lock tables t1 write, t2 write; |
| 94 |
connection admin; |
| 95 |
SET SESSION debug_dbug="+d,maria_flush_whole_page_cache,maria_crash"; |
| 96 |
* crashing mysqld intentionally |
| 97 |
set global aria_checkpoint_interval=1; |
| 98 |
ERROR HY000: Lost connection to server during query |
| 99 |
* recovery happens |
| 100 |
check table t2 extended; |
| 101 |
Table Op Msg_type Msg_text |
| 102 |
mysqltest.t2 check status OK |
| 103 |
* testing that checksum after recovery is as expected |
| 104 |
Checksum-check |
| 105 |
ok |
| 106 |
check table t1 extended; |
| 107 |
Table Op Msg_type Msg_text |
| 108 |
mysqltest.t1 check status OK |
| 109 |
* testing that checksum after recovery is as expected |
| 110 |
Checksum-check |
| 111 |
ok |
| 112 |
connection default; |
| 113 |
use mysqltest; |
| 114 |
connection admin; |
| 115 |
flush table t2; |
| 116 |
* copied t2 for comparison |
| 117 |
flush table t1; |
| 118 |
* copied t1 for comparison |
| 119 |
connection default; |
| 120 |
lock tables t1 write, t2 write; |
| 121 |
connection admin; |
| 122 |
SET SESSION debug_dbug="+d,maria_flush_states,maria_flush_whole_log,maria_crash"; |
| 123 |
* crashing mysqld intentionally |
| 124 |
set global aria_checkpoint_interval=1; |
| 125 |
ERROR HY000: Lost connection to server during query |
| 126 |
* recovery happens |
| 127 |
check table t2 extended; |
| 128 |
Table Op Msg_type Msg_text |
| 129 |
mysqltest.t2 check status OK |
| 130 |
* testing that checksum after recovery is as expected |
| 131 |
Checksum-check |
| 132 |
ok |
| 133 |
check table t1 extended; |
| 134 |
Table Op Msg_type Msg_text |
| 135 |
mysqltest.t1 check status OK |
| 136 |
* testing that checksum after recovery is as expected |
| 137 |
Checksum-check |
| 138 |
ok |
| 139 |
connection default; |
| 140 |
use mysqltest; |
| 141 |
connection admin; |
| 142 |
flush table t2; |
| 143 |
* copied t2 for comparison |
| 144 |
flush table t1; |
| 145 |
* copied t1 for comparison |
| 146 |
connection default; |
| 147 |
lock tables t1 write, t2 write; |
| 148 |
connection admin; |
| 149 |
SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash"; |
| 150 |
* crashing mysqld intentionally |
| 151 |
set global aria_checkpoint_interval=1; |
| 152 |
ERROR HY000: Lost connection to server during query |
| 153 |
* recovery happens |
| 154 |
check table t2 extended; |
| 155 |
Table Op Msg_type Msg_text |
| 156 |
mysqltest.t2 check status OK |
| 157 |
* testing that checksum after recovery is as expected |
| 158 |
Checksum-check |
| 159 |
ok |
| 160 |
check table t1 extended; |
| 161 |
Table Op Msg_type Msg_text |
| 162 |
mysqltest.t1 check status OK |
| 163 |
* testing that checksum after recovery is as expected |
| 164 |
Checksum-check |
| 165 |
ok |
| 166 |
connection default; |
| 167 |
use mysqltest; |
| 168 |
connection admin; |
| 169 |
SET SESSION debug_dbug="+d,maria_flush_whole_log,maria_crash"; |
| 170 |
* crashing mysqld intentionally |
| 171 |
set global aria_checkpoint_interval=1; |
| 172 |
ERROR HY000: Lost connection to server during query |
| 173 |
* recovery happens |
| 174 |
check table t2 extended; |
| 175 |
Table Op Msg_type Msg_text |
| 176 |
mysqltest.t2 check status OK |
| 177 |
* testing that checksum after recovery is as expected |
| 178 |
Checksum-check |
| 179 |
ok |
| 180 |
check table t1 extended; |
| 181 |
Table Op Msg_type Msg_text |
| 182 |
mysqltest.t1 check status OK |
| 183 |
* testing that checksum after recovery is as expected |
| 184 |
Checksum-check |
| 185 |
ok |
| 186 |
connection default; |
| 187 |
use mysqltest; |
| 188 |
drop database mysqltest_for_feeding_recovery; |
| 189 |
drop database mysqltest_for_comparison; |
| 190 |
drop database mysqltest; |