1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#13548704 ALGORITHM USED FOR DROPPING PARTITIONED TABLE CAN LEAD

TO INCONSISTENCY 

PROBLEM
--------
When we drop a partitoned table , we first gather the
information about partitions in the table from the 
table_name.par file and store it in an internal data 
structure.Then we delete this file and the data in 
the table. If the server crashes  after deleting the
file,then after recovering we cannot access the table
.Even we cannot drop the table ,because drop algorithm
requires par file to read the partition information.


FIX
---
1. We move the part of deleting par file after deleting 
   all the table data from the storage egine.
2. During drop operation if we detect that the par 
   file is missing then we delete the .frm file,since 
   there is no way of recovering without par file.
  
[Approved by Mattias rb#2576 ]
This commit is contained in:
Aditya A
2013-06-14 11:22:05 +05:30
parent 8325f2cf78
commit 5f3c0a451d
4 changed files with 35 additions and 20 deletions

View File

@@ -662,8 +662,8 @@ test.t1 check Error Incorrect information in file: './test/t1.frm'
test.t1 check error Corrupt
SELECT * FROM t1;
ERROR HY000: Failed to read from the .par file
# Note that it is currently impossible to drop a partitioned table
# without the .par file
# Note that we will remove the frm file when we detect that
# .par file has been deleted.
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
#