Commit 653c6fa1 authored by tulin@mysql.com's avatar tulin@mysql.com

backported configure flag from 5.0

    workaround for HPUX signal.h error, missing extern "C" 
    moved my_thread_end to NdbThreadExit
   more checks for shared memory transporter signum setup
parent 9ac63170
...@@ -1624,6 +1624,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ...@@ -1624,6 +1624,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--without-ndb-debug Disable special ndb debug features], --without-ndb-debug Disable special ndb debug features],
[ndb_debug="$withval"], [ndb_debug="$withval"],
[ndb_debug="default"]) [ndb_debug="default"])
AC_ARG_WITH([ndb-ccflags],
[
--with-ndb-ccflags Extra CC options for ndb compile],
[ndb_cxxflags_fix="$ndb_cxxflags_fix $withval"],
[ndb_cxxflags_fix=$ndb_cxxflags_fix])
AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([]) AC_MSG_RESULT([])
......
...@@ -135,7 +135,13 @@ ...@@ -135,7 +135,13 @@
#ifdef HAVE_UNIXWARE7_THREADS #ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h> #include <thread.h>
#else #else
#if defined(HPUX10) || defined(HPUX11)
C_MODE_START /* HPUX needs this, signal.h bug */
#include <pthread.h>
C_MODE_END
#else
#include <pthread.h> /* AIX must have this included first */ #include <pthread.h> /* AIX must have this included first */
#endif
#endif /* HAVE_UNIXWARE7_THREADS */ #endif /* HAVE_UNIXWARE7_THREADS */
#endif /* HAVE_mit_thread */ #endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT) #if !defined(SCO) && !defined(_REENTRANT)
......
...@@ -56,7 +56,6 @@ ndb_thread_wrapper(void* _ss){ ...@@ -56,7 +56,6 @@ ndb_thread_wrapper(void* _ss){
void *ret; void *ret;
struct NdbThread * ss = (struct NdbThread *)_ss; struct NdbThread * ss = (struct NdbThread *)_ss;
ret= (* ss->func)(ss->object); ret= (* ss->func)(ss->object);
my_thread_end();
NdbThread_Exit(ret); NdbThread_Exit(ret);
} }
/* will never be reached */ /* will never be reached */
...@@ -140,6 +139,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status) ...@@ -140,6 +139,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
void NdbThread_Exit(void *status) void NdbThread_Exit(void *status)
{ {
my_thread_end();
pthread_exit(status); pthread_exit(status);
} }
......
...@@ -3192,13 +3192,27 @@ fixShmKey(InitConfigFileParser::Context & ctx, const char *) ...@@ -3192,13 +3192,27 @@ fixShmKey(InitConfigFileParser::Context & ctx, const char *)
{ {
DBUG_ENTER("fixShmKey"); DBUG_ENTER("fixShmKey");
{ {
static int last_signum= -1;
Uint32 signum; Uint32 signum;
if(!ctx.m_currentSection->get("Signum", &signum)) if(!ctx.m_currentSection->get("Signum", &signum))
{ {
signum= OPT_NDB_SHM_SIGNUM_DEFAULT; signum= OPT_NDB_SHM_SIGNUM_DEFAULT;
if (signum <= 0)
{
ctx.reportError("Unable to set default parameter for [SHM]Signum"
" please specify [SHM DEFAULT]Signum");
return false;
}
ctx.m_currentSection->put("Signum", signum); ctx.m_currentSection->put("Signum", signum);
DBUG_PRINT("info",("Added Signum=%u", signum)); DBUG_PRINT("info",("Added Signum=%u", signum));
} }
if ( last_signum != (int)signum && last_signum >= 0 )
{
ctx.reportError("All shared memory transporters must have same [SHM]Signum defined."
" Use [SHM DEFAULT]Signum");
return false;
}
last_signum= (int)signum;
} }
{ {
Uint32 id1= 0, id2= 0, key= 0; Uint32 id1= 0, id2= 0, key= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment