#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/
2937 Kevin Lewis 2008-12-16
Cleanup
modified:
storage/falcon/Table.cpp
storage/falcon/Transaction.cpp
storage/falcon/TransactionManager.cpp
storage/falcon/ha_falcon.cpp
per-file messages:
storage/falcon/Table.cpp
Use CHECK_RECORD_ACTIVITY for all references to Record::active
storage/falcon/Transaction.cpp
Use tabs
storage/falcon/TransactionManager.cpp
Delete extra lines
storage/falcon/ha_falcon.cpp
Use unix line endings.
=== modified file 'storage/falcon/Table.cpp'
--- a/storage/falcon/Table.cpp 2008-12-16 20:36:23 +0000
+++ b/storage/falcon/Table.cpp 2008-12-16 20:40:38 +0000
@@ -534,8 +534,10 @@ Record* Table::fetchNext(int32 start)
return record;
}
-
+
+#ifdef CHECK_RECORD_ACTIVITY
record->active = false;
+#endif
record->release();
sync.lock(Shared);
@@ -610,7 +612,9 @@ Record* Table::fetchNext(int32 start)
}
else
{
+#ifdef CHECK_RECORD_ACTIVITY
record->active = false;
+#endif
record->release();
}
@@ -915,7 +919,9 @@ Record* Table::fetch(int32 recordNumber)
if (insert(record, NULL, recordNumber))
return record;
+#ifdef CHECK_RECORD_ACTIVITY
record->active = false;
+#endif
record->release();
continue;
@@ -932,7 +938,9 @@ Record* Table::fetch(int32 recordNumber)
if (insert(record, NULL, recordNumber))
return record;
+#ifdef CHECK_RECORD_ACTIVITY
record->active = false;
+#endif
record->release();
sync.lock(Shared);
}
@@ -1971,7 +1979,9 @@ bool Table::insert(Record * record, Reco
{
if (prior)
{
+#ifdef CHECK_RECORD_ACTIVITY
prior->active = false;
+#endif
prior->release();
}
@@ -3356,7 +3366,9 @@ void Table::validateAndInsert(Transactio
if (n >= 7)
Log::debug("Table::validateAndInsert: things going badly (%d)\n", n);
+#ifdef CHECK_RECORD_ACTIVITY
record->active = false;
+#endif
}
throw SQLError(UPDATE_CONFLICT, "unexpected update conflict in table %s.%s record %d",
schemaName, name, record->recordNumber);
@@ -3570,7 +3582,9 @@ Record* Table::fetchForUpdate(Transactio
return record;
}
+#ifdef CHECK_RECORD_ACTIVITY
recordVersion->active = false;
+#endif
recordVersion->release();
}
break;
=== modified file 'storage/falcon/Transaction.cpp'
--- a/storage/falcon/Transaction.cpp 2008-12-09 23:11:13 +0000
+++ b/storage/falcon/Transaction.cpp 2008-12-16 20:40:38 +0000
@@ -276,7 +276,7 @@ void Transaction::commit()
// Set the commit transition id for this transaction
- commitId = INTERLOCKED_INCREMENT(transactionManager->transactionSequence);
+ commitId = INTERLOCKED_INCREMENT(transactionManager->transactionSequence);
transactionManager->activeTransactions.remove(this);
transactionManager->committedTransactions.append(this);
=== modified file 'storage/falcon/TransactionManager.cpp'
--- a/storage/falcon/TransactionManager.cpp 2008-12-10 15:53:21 +0000
+++ b/storage/falcon/TransactionManager.cpp 2008-12-16 20:40:38 +0000
@@ -329,7 +329,6 @@ void TransactionManager::getTransactionI
transaction->getInfo(infoTable);
}
-
void TransactionManager::purgeTransactions()
{
// This method is called by the scavenger to clean up old committed
@@ -346,7 +345,6 @@ void TransactionManager::purgeTransactio
syncCommitted.lock(Exclusive);
purgeTransactionsWithLocks();
-
}
=== modified file 'storage/falcon/ha_falcon.cpp'
--- a/storage/falcon/ha_falcon.cpp 2008-12-16 10:30:25 +0000
+++ b/storage/falcon/ha_falcon.cpp 2008-12-16 20:40:38 +0000
@@ -2226,33 +2226,33 @@ int StorageInterface::check_if_supported
}
}
- if (alter_flags->is_set(HA_ADD_INDEX) || alter_flags->is_set(HA_ADD_UNIQUE_INDEX)
- || alter_flags->is_set(HA_DROP_INDEX) ||
alter_flags->is_set(HA_DROP_UNIQUE_INDEX))
- {
- for (unsigned int n = 0; n < altered_table->s->keys; n++)
- {
- KEY *key = altered_table->key_info + n;
- KEY *tableEnd = table->key_info + table->s->keys;
- KEY *tableKey;
-
- // Determine if this is a new index
-
- for (tableKey = table->key_info; tableKey < tableEnd; tableKey++)
- if (!strcmp(tableKey->name, key->name))
- break;
-
- // Unique, non-null keys are interpreted as primary keys.
- // Online add/drop primary keys not yet supported.
-
- if (tableKey >= tableEnd)
- if (n == altered_table->s->primary_key)
- {
- DBUG_PRINT("info",("Online add/drop primary key not supported"));
- DBUG_RETURN(HA_ALTER_NOT_SUPPORTED);
- }
- }
- }
-
+ if (alter_flags->is_set(HA_ADD_INDEX) || alter_flags->is_set(HA_ADD_UNIQUE_INDEX)
+ || alter_flags->is_set(HA_DROP_INDEX) ||
alter_flags->is_set(HA_DROP_UNIQUE_INDEX))
+ {
+ for (unsigned int n = 0; n < altered_table->s->keys; n++)
+ {
+ KEY *key = altered_table->key_info + n;
+ KEY *tableEnd = table->key_info + table->s->keys;
+ KEY *tableKey;
+
+ // Determine if this is a new index
+
+ for (tableKey = table->key_info; tableKey < tableEnd; tableKey++)
+ if (!strcmp(tableKey->name, key->name))
+ break;
+
+ // Unique, non-null keys are interpreted as primary keys.
+ // Online add/drop primary keys not yet supported.
+
+ if (tableKey >= tableEnd)
+ if (n == altered_table->s->primary_key)
+ {
+ DBUG_PRINT("info",("Online add/drop primary key not supported"));
+ DBUG_RETURN(HA_ALTER_NOT_SUPPORTED);
+ }
+ }
+ }
+
DBUG_RETURN(HA_ALTER_SUPPORTED_NO_LOCK);
}
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (klewis:2937) | Kevin Lewis | 16 Dec |