Below is the list of changes that have just been committed into a local
6.0 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-13 13:59:36+04:00, svoj@stripped +3 -0
BUG#31296 - falcon does not remove associated tablespace file.
When dropping a tablespace, falcon doesn't clean-up data files and
in-memory data structures.
mysql-test/suite/falcon/r/falcon_ts.result@stripped, 2007-11-13 13:59:34+04:00, svoj@stripped +4 -0
A test case for BUG#31296.
mysql-test/suite/falcon/t/falcon_ts.test@stripped, 2007-11-13 13:59:34+04:00, svoj@stripped +8 -0
A test case for BUG#31296.
storage/falcon/SRLDropTableSpace.cpp@stripped, 2007-11-13 13:59:34+04:00, svoj@stripped +1 -0
When dropping a tablespace, foreground thread only removes a tablespace
entry from system tables and adds appropriate event to the serial log.
Tablespace data file is removed during commitSystemTransaction phase by
TableSpaceManager::expungeTableSpace() function.
When we enter SRLDropTableSpace::append, there is no SerialLogTransaction
entry in the SerialLogTransaction hash for the SystemTransaction.
During the commit phase, we also add an UpdateRecords event to the serial
log. This is needed for the system table update described above. When
the update record event is added to the serial log,
SRLUpdateRecords::append() gets SerialLogTransaction element for current
transaction from the SerialLogTransaction hash. As there is no element
for current transaction, it creates new one and informs SerialLog that
log for current transaction starts at the current offset, leaving
SRLDropTableSpace event behind.
As SRLDropTableSpace event is the first event written to the serial log
during drop tablespace statement, inform serial log that transaction
is started by calling log->getTransaction().
diff -Nrup a/mysql-test/suite/falcon/r/falcon_ts.result b/mysql-test/suite/falcon/r/falcon_ts.result
--- a/mysql-test/suite/falcon/r/falcon_ts.result 2007-11-13 13:56:54 +04:00
+++ b/mysql-test/suite/falcon/r/falcon_ts.result 2007-11-13 13:59:34 +04:00
@@ -4,3 +4,7 @@ CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.
CREATE TABLESPACE ts1 ADD DATAFILE 'ts2.fts' ENGINE=falcon;
ERROR HY000: Tablespace 'ts1' already exists
DROP TABLESPACE ts1 ENGINE=falcon;
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+DROP TABLESPACE ts1 ENGINE=falcon;
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/mysql-test/suite/falcon/t/falcon_ts.test b/mysql-test/suite/falcon/t/falcon_ts.test
--- a/mysql-test/suite/falcon/t/falcon_ts.test 2007-11-13 13:56:54 +04:00
+++ b/mysql-test/suite/falcon/t/falcon_ts.test 2007-11-13 13:59:34 +04:00
@@ -14,3 +14,11 @@ CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.
--error 1655
CREATE TABLESPACE ts1 ADD DATAFILE 'ts2.fts' ENGINE=falcon;
DROP TABLESPACE ts1 ENGINE=falcon;
+
+#
+# BUG#31296 - falcon does not remove associated tablespace file.
+#
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+DROP TABLESPACE ts1 ENGINE=falcon;
+CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE=falcon;
+DROP TABLESPACE ts1 ENGINE=falcon;
diff -Nrup a/storage/falcon/SRLDropTableSpace.cpp b/storage/falcon/SRLDropTableSpace.cpp
--- a/storage/falcon/SRLDropTableSpace.cpp 2007-09-20 20:42:20 +05:00
+++ b/storage/falcon/SRLDropTableSpace.cpp 2007-11-13 13:59:34 +04:00
@@ -42,6 +42,7 @@ SRLDropTableSpace::~SRLDropTableSpace()
void SRLDropTableSpace::append(TableSpace *tableSpace, Transaction *transaction)
{
START_RECORD(srlDropTableSpace, "SRLDropTableSpace::append");
+ log->getTransaction(transaction->transactionId);
putInt(tableSpace->tableSpaceId);
putInt(transaction->transactionId);
}
| Thread |
|---|
| • bk commit into 6.0 tree (svoj:1.2672) BUG#31296 | Sergey Vojtovich | 13 Nov |