Below is the list of changes that have just been committed into a local
6.0 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-10-02 17:37:26-04:00, jas@rowvwade. +7 -0
Reworked Table::insert to eliminate window where duplicate
values could be storaged in unique index.
storage/falcon/StorageHandler.cpp@stripped, 2007-10-02 17:37:16-04:00, jas@rowvwade. +0 -1
Remove vestiges of old table space implementation.
storage/falcon/StorageHandler.h@stripped, 2007-10-02 17:37:16-04:00, jas@rowvwade. +0 -1
Remove vestiges of old table space implementation.
storage/falcon/StorageTable.cpp@stripped, 2007-10-02 17:37:17-04:00, jas@rowvwade. +5 -0
Attempted work around of #pragma problem. Not the right
answer, but not worth taking out, either.
storage/falcon/StorageTable.h@stripped, 2007-10-02 17:37:17-04:00, jas@rowvwade. +1 -0
Attempted work around of #pragma problem. Not the right
answer, but not worth taking out, either.
storage/falcon/StorageTableShare.cpp@stripped, 2007-10-02 17:37:17-04:00, jas@rowvwade. +5 -5
Remove vestiges of old table space implementation.
storage/falcon/Table.cpp@stripped, 2007-10-02 17:37:18-04:00, jas@rowvwade. +21 -24
Reworked Table::insert to eliminate window where duplicate
values could be storaged in unique index.
storage/falcon/ha_falcon.cpp@stripped, 2007-10-02 17:37:18-04:00, jas@rowvwade. +9 -3
Worked around a "#pragma pack" somewhere in mysql_priv.h, etc.
diff -Nrup a/storage/falcon/StorageHandler.cpp b/storage/falcon/StorageHandler.cpp
--- a/storage/falcon/StorageHandler.cpp 2007-09-20 11:42:40 -04:00
+++ b/storage/falcon/StorageHandler.cpp 2007-10-02 17:37:16 -04:00
@@ -107,7 +107,6 @@ StorageHandler::StorageHandler(int lockS
dictionaryConnection = NULL;
databaseList = NULL;
defaultDatabase = NULL;
- globalTableSpace = false;
}
StorageHandler::~StorageHandler(void)
diff -Nrup a/storage/falcon/StorageHandler.h b/storage/falcon/StorageHandler.h
--- a/storage/falcon/StorageHandler.h 2007-09-20 11:42:40 -04:00
+++ b/storage/falcon/StorageHandler.h 2007-10-02 17:37:16 -04:00
@@ -127,7 +127,6 @@ public:
StorageTableShare *tables[tableHashSize];
Connection *dictionaryConnection;
int mySqlLockSize;
- bool globalTableSpace;
};
#endif
diff -Nrup a/storage/falcon/StorageTable.cpp b/storage/falcon/StorageTable.cpp
--- a/storage/falcon/StorageTable.cpp 2007-09-20 11:42:40 -04:00
+++ b/storage/falcon/StorageTable.cpp 2007-10-02 17:37:17 -04:00
@@ -568,3 +568,8 @@ int StorageTable::optimize(void)
return 0;
}
+
+void StorageTable::setLocalTable(StorageInterface* handler)
+{
+ localTable = handler;
+}
diff -Nrup a/storage/falcon/StorageTable.h b/storage/falcon/StorageTable.h
--- a/storage/falcon/StorageTable.h 2007-09-20 11:42:40 -04:00
+++ b/storage/falcon/StorageTable.h 2007-10-02 17:37:17 -04:00
@@ -95,6 +95,7 @@ public:
virtual void setReadAfterKey(void);
virtual void unlockRow(void);
virtual int optimize(void);
+ virtual void setLocalTable(StorageInterface* handler);
JString name;
StorageTable *collision;
diff -Nrup a/storage/falcon/StorageTableShare.cpp b/storage/falcon/StorageTableShare.cpp
--- a/storage/falcon/StorageTableShare.cpp 2007-09-20 11:42:41 -04:00
+++ b/storage/falcon/StorageTableShare.cpp 2007-10-02 17:37:17 -04:00
@@ -34,7 +34,6 @@
#include "SQLException.h"
static const char *FALCON_TEMPORARY = "/falcon_temporary";
-static const char *GLOBAL_TABLESPACE = "-global-";
static const char *DB_ROOT = ".fts";
#if defined(_WIN32) && MYSQL_VERSION_ID < 0x50100
@@ -67,8 +66,6 @@ StorageTableShare::StorageTableShare(Sto
if (tempTable)
tableSpace = TEMPORARY_TABLESPACE;
- else if (storageHandler->globalTableSpace)
- tableSpace = GLOBAL_TABLESPACE;
else if (tableSpaceName && tableSpaceName[0])
tableSpace = JString::upcase(tableSpaceName);
else
@@ -132,10 +129,13 @@ int StorageTableShare::deleteTable(Stora
{
int res = storageDatabase->deleteTable(storageConnection, this);
- if (res == 0)
+ if (res == 0 || res == StorageErrorTableNotFound)
{
unRegisterTable();
- storageHandler->removeTable(this);
+
+ if (res == 0)
+ storageHandler->removeTable(this);
+
delete this;
}
diff -Nrup a/storage/falcon/Table.cpp b/storage/falcon/Table.cpp
--- a/storage/falcon/Table.cpp 2007-10-01 11:30:41 -04:00
+++ b/storage/falcon/Table.cpp 2007-10-02 17:37:18 -04:00
@@ -332,12 +332,6 @@ void Table::insert(Transaction *transact
// Verify that record is valid
checkNullable(record);
-
- if (indexes)
- {
- checkUniqueIndexes(transaction, record);
- }
-
recordNumber = record->recordNumber = dbb->insertStub(dataSection, transaction);
transaction->addRecord(record);
insert(record, NULL, recordNumber);
@@ -347,6 +341,9 @@ void Table::insert(Transaction *transact
index->insert(record, transaction);
END_FOR;
+ if (indexes)
+ checkUniqueIndexes(transaction, record);
+
updateInversion(record, transaction);
fireTriggers(transaction, PostInsert, NULL, record);
record->release();
@@ -1068,13 +1065,6 @@ void Table::update(Transaction * transac
checkNullable(record);
- // Make sure no uniqueness rules are violated
-
- if (indexes)
- {
- checkUniqueIndexes(transaction, record);
- }
-
// Checkin with any table attachments
FOR_OBJECTS(TableAttachment*, attachment, &attachments)
@@ -1097,6 +1087,12 @@ void Table::update(Transaction * transac
validateAndInsert(transaction, record);
transaction->addRecord(record);
updated = true;
+
+ // Make sure no uniqueness rules are violated
+
+ if (indexes)
+ checkUniqueIndexes(transaction, record);
+
fireTriggers(transaction, PostUpdate, oldRecord, record);
// If this is a re-update in the same transaction and the same savepoint,
@@ -2187,6 +2183,9 @@ void Table::checkUniqueIndexes(Transacti
for (Record *dup = rec; dup; dup = dup->getPriorVersion())
{
+ if (dup == record)
+ continue;
+
// Get the record's transaction state, waiting while pending.
state = transaction->getRelativeState(dup, DO_NOT_WAIT);
@@ -2634,11 +2633,6 @@ uint Table::insert(Transaction *transact
record = allocRecordVersion(fmt, transaction, NULL);
record->setEncodedRecord(stream, false);
- if (indexes)
- {
- checkUniqueIndexes(transaction, record);
- }
-
recordNumber = record->recordNumber = dbb->insertStub(dataSection, transaction);
transaction->addRecord(record);
bool ret = insert(record, NULL, recordNumber);
@@ -2650,6 +2644,9 @@ uint Table::insert(Transaction *transact
index->insert (record, transaction);
END_FOR;
+ if (indexes)
+ checkUniqueIndexes(transaction, record);
+
record->release();
}
catch (...)
@@ -2747,12 +2744,6 @@ void Table::update(Transaction * transac
//checkNullable(record);
- // Make sure no uniqueness rules are violated
-
- if (indexes)
- {
- checkUniqueIndexes(transaction, record);
- }
// Checkin with any table attachments
@@ -2779,6 +2770,12 @@ void Table::update(Transaction * transac
}
updated = true;
+
+ // Make sure no uniqueness rules are violated
+
+ if (indexes)
+ checkUniqueIndexes(transaction, record);
+
//fireTriggers(transaction, PostUpdate, oldRecord, record);
// If this is a re-update in the same transaction and the same savepoint,
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp 2007-09-28 16:08:55 -04:00
+++ b/storage/falcon/ha_falcon.cpp 2007-10-02 17:37:18 -04:00
@@ -20,6 +20,11 @@
#endif
#include "mysql_priv.h"
+
+#ifdef _WIN32
+#pragma pack()
+#endif
+
#include "ha_falcon.h"
#include "StorageConnection.h"
#include "StorageTable.h"
@@ -27,7 +32,7 @@
#include "StorageHandler.h"
#include "CmdGen.h"
#include "InfoTable.h"
-//#include "TimeTest.h"
+
#ifdef _WIN32
#define I64FORMAT "%I64d"
#else
@@ -645,8 +650,9 @@ int StorageInterface::create(const char
DBUG_RETURN(HA_ERR_NO_CONNECTION);
storageTable = storageConnection->getStorageTable(storageShare);
- storageTable->localTable = this;
-
+ //storageTable->localTable = this;
+ storageTable->setLocalTable(this);
+
int ret;
int64 incrementValue = 0;
uint n;
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2609) | U-ROWVWADEjas | 2 Oct |