mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#3154 "Enable REPAIR for CSV tables".
This is the first commit. Cleanups are likely to follow after the merge. mysql-test/r/csv.result: update result mysql-test/t/csv.test: add tests for CSV REPAIR/RESTORE. storage/csv/ha_tina.cc: add repair/check and a meta-file processing for it storage/csv/ha_tina.h: add new functions required for tina repair/check
This commit is contained in:
@ -4993,6 +4993,38 @@ val
|
||||
2
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE test_concurrent_insert;
|
||||
CREATE TABLE test_repair_table ( val integer ) ENGINE = CSV;
|
||||
CHECK TABLE test_repair_table;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_repair_table check status OK
|
||||
REPAIR TABLE test_repair_table;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_repair_table repair status OK
|
||||
DROP TABLE test_repair_table;
|
||||
CREATE TABLE test_repair_table2 ( val integer ) ENGINE = CSV;
|
||||
SELECT * from test_repair_table2;
|
||||
val
|
||||
Warnings:
|
||||
Error 1194 Table 'test_repair_table2' is marked as crashed and should be repaired
|
||||
SELECT * from test_repair_table2;
|
||||
val
|
||||
test_repair_table2.CSM
|
||||
CHECK TABLE test_repair_table2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_repair_table2 check status OK
|
||||
DROP TABLE test_repair_table2;
|
||||
CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV;
|
||||
CHECK TABLE test_repair_table3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_repair_table3 check error Corrupt
|
||||
REPAIR TABLE test_repair_table3;
|
||||
Table Op Msg_type Msg_text
|
||||
test.test_repair_table3 repair status OK
|
||||
SELECT * FROM test_repair_table3;
|
||||
val
|
||||
1
|
||||
4
|
||||
DROP TABLE test_repair_table3;
|
||||
create table t1 (a int) engine=csv;
|
||||
insert t1 values (1);
|
||||
delete from t1;
|
||||
|
Reference in New Issue
Block a user