Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When 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-07-05 16:40:57-04:00, jas@rowvwade. +1 -0
Don't create a table space on top of an existing file.
storage/falcon/TableSpaceManager.cpp@stripped, 2007-07-05 16:40:47-04:00, jas@rowvwade. +17 -2
Don't create a table space on top of an existing file.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jas
# Host: rowvwade.
# Root: D:/MySQL/mysql-5.1-falcon
--- 1.12/storage/falcon/TableSpaceManager.cpp 2007-07-05 16:41:16 -04:00
+++ 1.13/storage/falcon/TableSpaceManager.cpp 2007-07-05 16:41:16 -04:00
@@ -146,10 +146,24 @@
Sequence *sequence = database->sequenceManager->getSequence(database->getSymbol("SYSTEM"), database->getSymbol("TABLESPACE_IDS"));
int id = (int) sequence->update(1, database->getSystemTransaction());
TableSpace *tableSpace = new TableSpace(database, name, id, fileName);
-
+ bool opened = false;
+
+ try
+ {
+ tableSpace->dbb->openFile(fileName, false);
+ tableSpace->dbb->closeFile();
+ opened = true;
+ delete tableSpace;
+ }
+ catch (SQLException&)
+ {
+ }
+
+ if (opened)
+ throw SQLError(DDL_ERROR, "table space file name \"%s\" already exists\n", fileName);
+
try
{
- tableSpace->create();
PStatement statement = database->prepareStatement(
"insert into system.tablespaces (tablespace,tablespace_id,filename) values (?,?,?)");
int n = 1;
@@ -157,6 +171,7 @@
statement->setInt(n++, id);
statement->setString(n++, fileName);
statement->executeUpdate();
+ tableSpace->create();
syncSystem.unlock();
database->commitSystemTransaction();
add(tableSpace);
| Thread |
|---|
| • bk commit into 6.0-falcon tree (jas:1.2588) | U-ROWVWADEjas | 5 Jul |