MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Kevin Lewis Date:May 4 2009 2:09pm
Subject:bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2704)
Bug#44631
View as plain text  
#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/ based on revid:kevin.lewis@stripped

 2704 Kevin Lewis	2009-05-04
      Bug#44631 - The recent CycleManager changes used an unsigned long for a THREAD_ID which is typed differently on Linux and MAC.  On MAC, it did not dompile.
      
      So now CycleManager::getSyncObject is called with a Thread *.  and THREAD_ID is typecaste to (int) to get an  array slot.

    modified:
      storage/falcon/CycleLock.cpp
      storage/falcon/CycleManager.cpp
      storage/falcon/CycleManager.h
=== modified file 'storage/falcon/CycleLock.cpp'
--- a/storage/falcon/CycleLock.cpp	2009-04-30 15:25:01 +0000
+++ b/storage/falcon/CycleLock.cpp	2009-05-04 14:08:58 +0000
@@ -8,7 +8,7 @@ CycleLock::CycleLock(Database *database)
 {
 	thread = Thread::getThread("CycleLock::CycleLock");
 	cycleManager = database->cycleManager;
-	syncObject = cycleManager->getSyncObject(thread->threadId);
+	syncObject = cycleManager->getSyncObject(thread);
 
 	// If there already is a cycle manager, let him worry about all this
 
@@ -61,7 +61,7 @@ void CycleLock::lockCycle(void)
 		chain->lockCycle();
 	else
 		{
-		syncObject = cycleManager->getSyncObject(thread->threadId);
+		syncObject = cycleManager->getSyncObject(thread);
 		syncObject->lock(NULL, Shared);
 		locked = true;
 		}

=== modified file 'storage/falcon/CycleManager.cpp'
--- a/storage/falcon/CycleManager.cpp	2009-04-30 15:25:01 +0000
+++ b/storage/falcon/CycleManager.cpp	2009-05-04 14:08:58 +0000
@@ -283,9 +283,9 @@ void CycleManager::cycleManager(void)
 		}
 }
 
-SyncObject *CycleManager::getSyncObject(unsigned long threadId)
+SyncObject *CycleManager::getSyncObject(Thread *thread)
 {
-	int slot = threadId & cycleArrayMask;
+	int slot = ((int) thread->threadId) & cycleArrayMask;
 	SyncObject* syncObject = currentCycle[slot];
 	if (syncObject == NULL)
 		{
@@ -305,7 +305,7 @@ SyncObject *CycleManager::getSyncObject(
 void CycleManager::queueForDelete(Record* zombie)
 {
 	Thread* thread = Thread::getThread("CycleManager::queueForDelete(Record**)");
-	int slot = thread->threadId & cycleArrayMask;
+	int slot = ((int) thread->threadId) & cycleArrayMask;
 
 	if (zombie->isVersion())
 		{
@@ -369,7 +369,7 @@ void CycleManager::queueForDelete(Record
 void CycleManager::queueForDelete(Value** zombie)
 {
 	Thread* thread = Thread::getThread("CycleManager::queueForDelete(Value**)");
-	int slot = thread->threadId & cycleArrayMask;
+	int slot = ((int) thread->threadId) & cycleArrayMask;
 
 	// Establish the value list head
 
@@ -403,7 +403,7 @@ void CycleManager::queueForDelete(Value*
 void CycleManager::queueForDelete(char* zombie)
 {
 	Thread* thread = Thread::getThread("CycleManager::queueForDelete(Char**)");
-	int slot = thread->threadId & cycleArrayMask;
+	int slot = ((int) thread->threadId) & cycleArrayMask;
 
 	// Establish the buffer list head
 

=== modified file 'storage/falcon/CycleManager.h'
--- a/storage/falcon/CycleManager.h	2009-04-30 15:25:01 +0000
+++ b/storage/falcon/CycleManager.h	2009-05-04 14:08:58 +0000
@@ -65,7 +65,7 @@ public:
 	void		start(void);
 	void		shutdown(void);
 	void		cycleManager(void);
-	SyncObject *getSyncObject(unsigned long threadId);
+	SyncObject *getSyncObject(Thread *thread);
 	void		queueForDelete(Record* zombie);
 	void		queueForDelete(Value** zombie);
 	void		queueForDelete(char* zombie);


Attachment: [text/bzr-bundle] bzr/kevin.lewis@sun.com-20090504140858-kxmlzduz9v35iomc.bundle
Thread
bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:2704)Bug#44631Kevin Lewis4 May