Below is the list of changes that have just been committed into a local
6.0 repository of cpowers. When cpowers 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-12-02 15:11:59-06:00, chris@stripped +3 -0
Bug#32730, Concurrent TRUNCATEs crash Falcon engine
- Enabled falcon_bug_22173a
---
Bug#32730, Concurrent TRUNCATEs crash Falcon engine
- Added interlocked increment/decrement to keep StorageTableShare::truncateLockCount in sync
with the state of syncTruncateLock. The lock count became out of sync during testcase falcon_bug_22173a
run on a compile-amd64-max build.
- Enabled testcase falcon_bug_22173a
mysql-test/suite/falcon/t/disabled.def@stripped, 2007-12-02 15:11:57-06:00, chris@stripped +0 -1
Enabled falcon_bug_22173a
storage/falcon/StorageTableShare.cpp@stripped, 2007-12-02 15:11:57-06:00, chris@stripped +5 -4
Use interlocked increment/decrement for truncateLockCount.
storage/falcon/StorageTableShare.h@stripped, 2007-12-02 15:11:57-06:00, chris@stripped +2 -1
Use interlocked increment/decrement for truncateLockCount.
diff -Nrup a/mysql-test/suite/falcon/t/disabled.def b/mysql-test/suite/falcon/t/disabled.def
--- a/mysql-test/suite/falcon/t/disabled.def 2007-12-01 07:14:33 -06:00
+++ b/mysql-test/suite/falcon/t/disabled.def 2007-12-02 15:11:57 -06:00
@@ -19,7 +19,6 @@ falcon_bug_22156 : Bug#22156 2006-11-
falcon_bug_22165 : Bug#22165 2006-08-24 hakank (Get pushbuild green)
falcon_bug_22166 : Bug#22166 2006-08-24 hakank (Get pushbuild green)
falcon_bug_22169 : Bug#22169 2006-08-24 hakank Too long run time for PB
-falcon_bug_22173a : Bug#22173 2007-11-15 cpowers (Fix concurrency issues)
falcon_bug_22182 : Disabled until runtime team provides RENAME DATABASE replacement. See WL#4030
falcon_bug_22187 : Bug#22187 2006-08-24 hakank (Get pushbuild green)
falcon_bug_22189 : Bug#22189 2006-08-24 hakank (Get pushbuild green)
diff -Nrup a/storage/falcon/StorageTableShare.cpp b/storage/falcon/StorageTableShare.cpp
--- a/storage/falcon/StorageTableShare.cpp 2007-12-02 12:40:56 -06:00
+++ b/storage/falcon/StorageTableShare.cpp 2007-12-02 15:11:57 -06:00
@@ -25,7 +25,7 @@
#include "Sequence.h"
#include "Index.h"
#include "Table.h"
-#include "SyncObject.h"
+#include "Interlock.h"
#include "CollationManager.h"
#include "MySQLCollation.h"
#include "Connection.h"
@@ -518,7 +518,7 @@ JString StorageTableShare::lookupPathNam
void StorageTableShare::setTruncateLock(void)
{
- ++truncateLockCount;
+ INTERLOCKED_INCREMENT(truncateLockCount);
syncTruncate->lock(NULL, Shared);
}
@@ -526,7 +526,8 @@ void StorageTableShare::clearTruncateLoc
{
if (truncateLockCount > 0)
{
- --truncateLockCount;
- syncTruncate->unlock(NULL, Shared);
+ INTERLOCKED_DECREMENT(truncateLockCount);
+ syncTruncate->unlock();
+// syncTruncate->unlock(NULL, Shared);
}
}
diff -Nrup a/storage/falcon/StorageTableShare.h b/storage/falcon/StorageTableShare.h
--- a/storage/falcon/StorageTableShare.h 2007-11-30 16:25:28 -06:00
+++ b/storage/falcon/StorageTableShare.h 2007-12-02 15:11:57 -06:00
@@ -17,6 +17,7 @@
#define _STORAGE_TABLE_SHARE_H_
#include "JString.h"
+#include "SyncObject.h"
#ifndef _WIN32
#define __int64 long long
@@ -144,7 +145,7 @@ public:
StorageIndexDesc **indexes;
Sequence *sequence;
int numberIndexes;
- int truncateLockCount;
+ volatile INTERLOCK_TYPE truncateLockCount;
bool tempTable;
};
| Thread |
|---|
| • bk commit into 6.0 tree (chris:1.2720) BUG#32730 | cpowers | 2 Dec |