4871 Mauritz Sundell 2012-03-07
ndb - fix of signal log serialization
Previously, setting NDB_SIGNAL_LOG_MUTEX can be used to serialize writes
to signal log, that protects against interleaving several signal
descriptions with each other. But flush request was not serialized,
leading to potential loss or repetition of parts of signal descriptions.
Now, both flushes and writes are serialized when NDB_SIGNAL_LOG_MUTEX
are set.
modified:
storage/ndb/src/common/debugger/SignalLoggerManager.cpp
4870 magnus.blaudd@stripped 2012-03-05
ndb
- remove dependency on function from mysys/sha1.h since they no longer exist
in the future. Instead use our "standard" md5 function to create
a human readable digest which pgman may print to the
log file in debug compile.
- remove two unecessary include of md5_hash.hpp
modified:
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/ndbapi/NdbOperationSearch.cpp
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
=== modified file 'storage/ndb/src/common/debugger/SignalLoggerManager.cpp'
--- a/storage/ndb/src/common/debugger/SignalLoggerManager.cpp 2012-01-16 07:14:30 +0000
+++ b/storage/ndb/src/common/debugger/SignalLoggerManager.cpp 2012-03-07 11:50:14 +0000
@@ -67,8 +67,11 @@ SignalLoggerManager::~SignalLoggerManage
FILE *
SignalLoggerManager::setOutputStream(FILE * output)
{
- if(outputStream != 0){
+ if (outputStream != 0)
+ {
+ lock();
fflush(outputStream);
+ unlock();
}
FILE * out = outputStream;
@@ -85,8 +88,12 @@ SignalLoggerManager::getOutputStream() c
void
SignalLoggerManager::flushSignalLog()
{
- if(outputStream != 0)
+ if (outputStream != 0)
+ {
+ lock();
fflush(outputStream);
+ unlock();
+ }
}
void
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (mauritz.sundell:4870 to 4871) | Mauritz Sundell | 8 Mar |