1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Post-review fixes for WL#3154 "Enable REPAIR for CSV tables"

mysql-test/r/csv.result:
  update result file
mysql-test/t/csv.test:
  add more tests
storage/csv/ha_tina.cc:
  post-review fixes & cleanup
storage/csv/ha_tina.h:
  post-review fixes
This commit is contained in:
unknown
2006-03-29 06:28:57 +04:00
parent ecba6dc67b
commit 2a67aecd1a
4 changed files with 155 additions and 27 deletions

View File

@ -5025,6 +5025,67 @@ val
1
4
DROP TABLE test_repair_table3;
CREATE TABLE test_repair_table4 (
num int not null,
magic_no int(4) unsigned zerofill DEFAULT '0000' NOT NULL,
company_name char(30) DEFAULT '' NOT NULL,
founded char(4) DEFAULT '' NOT NULL
) ENGINE = CSV;
SELECT * FROM test_repair_table4;
num magic_no company_name founded
Warnings:
Error 1194 Table 'test_repair_table4' is marked as crashed and should be repaired
SELECT * FROM test_repair_table4;
num magic_no company_name founded
CHECK TABLE test_repair_table4;
Table Op Msg_type Msg_text
test.test_repair_table4 check status OK
INSERT INTO test_repair_table4 VALUES (2,101,'SAP','1972');
INSERT INTO test_repair_table4 VALUES (1,101,'Microsoft','1978');
INSERT INTO test_repair_table4 VALUES (2,101,'MySQL','1995');
SELECT * FROM test_repair_table4;
num magic_no company_name founded
2 0101 SAP 1972
1 0101 Microsoft 1978
2 0101 MySQL 1995
CHECK TABLE test_repair_table4;
Table Op Msg_type Msg_text
test.test_repair_table4 check status OK
REPAIR TABLE test_repair_table4;
Table Op Msg_type Msg_text
test.test_repair_table4 repair status OK
SELECT * FROM test_repair_table4;
num magic_no company_name founded
2 0101 SAP 1972
1 0101 Microsoft 1978
2 0101 MySQL 1995
CHECK TABLE test_repair_table4;
Table Op Msg_type Msg_text
test.test_repair_table4 check status OK
REPAIR TABLE test_repair_table4;
Table Op Msg_type Msg_text
test.test_repair_table4 repair status OK
SELECT * FROM test_repair_table4;
num magic_no company_name founded
2 0101 SAP 1972
1 0101 Microsoft 1978
2 0101 MySQL 1995
DROP TABLE test_repair_table4;
CREATE TABLE test_repair_table5 (
num int not null,
magic_no int(4) unsigned zerofill DEFAULT '0000' NOT NULL,
company_name char(30) DEFAULT '' NOT NULL,
founded char(4) DEFAULT '' NOT NULL
) ENGINE = CSV;
CHECK TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 check error Corrupt
REPAIR TABLE test_repair_table5;
Table Op Msg_type Msg_text
test.test_repair_table5 repair status OK
SELECT * FROM test_repair_table5;
num magic_no company_name founded
DROP TABLE test_repair_table5;
create table t1 (a int) engine=csv;
insert t1 values (1);
delete from t1;