3014 Olav Sandstaa 2009-02-12
Bug #40155 [Falcon] Error: assertion (ret == 0) failed at line 80 in file Mutex.cpp
Adding code for writing the error status from the call to pthread_mutex_lock to
the mysql log file when this error occurs. This does not fix the problem but
will help understanding why this assert happens.
modified:
storage/falcon/Mutex.cpp
3013 Vladislav Vaintroub 2009-02-12
Fix compile warnings ( gcc suggests parentheses around assignment used as truth value)
modified:
storage/falcon/DeferredIndex.cpp
=== modified file 'storage/falcon/Mutex.cpp'
=== modified file 'storage/falcon/Mutex.cpp'
--- a/storage/falcon/Mutex.cpp 2007-10-26 19:55:40 +0000
+++ b/storage/falcon/Mutex.cpp 2009-02-12 12:29:29 +0000
@@ -21,6 +21,8 @@
#undef ASSERT
#endif
+#include <stdio.h>
+
#include "Engine.h"
#include "Mutex.h"
@@ -40,8 +42,8 @@
#endif
#ifdef _PTHREADS
- //int ret =
- pthread_mutex_init (&mutex, NULL);
+ int ret = pthread_mutex_init (&mutex, NULL);
+ ASSERT(ret == 0);
#endif
#ifdef SOLARIS_MT
@@ -77,6 +79,16 @@
#ifdef _PTHREADS
int ret = pthread_mutex_lock (&mutex);
+
+ // The following code is added to get more information about why
+ // the call to pthread_mutex_lock fails in some out-of-memory situations,
+ // see bug 40155.
+
+ if (ret != 0)
+ {
+ fprintf(stderr, "[Falcon] Error: Mutex::lock: pthread_mutex_lock returned errno %d\n", ret);
+ fflush(stderr);
+ }
ASSERT(ret == 0);
#endif
| Thread |
|---|
| • bzr push into mysql-6.0-falcon-team branch (olav:3013 to 3014) Bug#40155 | Olav Sandstaa | 12 Feb |