1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Close share->data_file in before renaming in ha_tina::repair

Open and seek to end of data_file after rename 
Fix comment for when file does not need repair.
Set share->mapped_file to NULL always when it's been unmapped 
Add test to see that file can be used after repair


mysql-test/r/csv.result:
  Add more test to see that the table can be used after repair
mysql-test/t/csv.test:
  Add more test to see that the table can be used after repair
storage/csv/ha_tina.cc:
  Close share->data_file in before renaming in ha_tina::repair
  Open and seek to end after rename
  Fix comment for when file does not need repair.
  Set share->mapped_file to NULL always when it's been unmapped
This commit is contained in:
unknown
2006-04-11 12:12:48 +02:00
parent e10f0d9b98
commit 79a2debe46
3 changed files with 76 additions and 5 deletions

View File

@ -5085,6 +5085,36 @@ Table Op Msg_type Msg_text
test.test_repair_table5 repair status OK
SELECT * FROM test_repair_table5;
num magic_no company_name founded
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
FLUSH TABLES;
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
1 0102 CORRECT 1876
INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
SELECT * FROM test_repair_table5;
num magic_no company_name founded
1 0102 CORRECT 1876
1 0102 CORRECT2 1876
FLUSH TABLES;
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
1 0102 CORRECT 1876
1 0102 CORRECT2 1876
DROP TABLE test_repair_table5;
create table t1 (a int) engine=csv;
insert t1 values (1);