Commit e7ff7469 authored by unknown's avatar unknown

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


acinclude.m4:
  backported configure flag from 5.0
include/my_global.h:
  workaround for HPUX signal.h error, missing extern "C"
ndb/src/common/portlib/NdbThread.c:
  moved my_thread_end to NdbThreadExit
ndb/src/mgmsrv/ConfigInfo.cpp:
  more checks for shared memory transporter signum setup
parent cf660b00
......@@ -1624,7 +1624,12 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--without-ndb-debug Disable special ndb debug features],
[ndb_debug="$withval"],
[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_RESULT([])
......
......@@ -135,7 +135,13 @@
#ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h>
#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 */
#endif
#endif /* HAVE_UNIXWARE7_THREADS */
#endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT)
......
......@@ -56,7 +56,6 @@ ndb_thread_wrapper(void* _ss){
void *ret;
struct NdbThread * ss = (struct NdbThread *)_ss;
ret= (* ss->func)(ss->object);
my_thread_end();
NdbThread_Exit(ret);
}
/* will never be reached */
......@@ -140,6 +139,7 @@ int NdbThread_WaitFor(struct NdbThread* p_wait_thread, void** status)
void NdbThread_Exit(void *status)
{
my_thread_end();
pthread_exit(status);
}
......
......@@ -3192,13 +3192,27 @@ fixShmKey(InitConfigFileParser::Context & ctx, const char *)
{
DBUG_ENTER("fixShmKey");
{
static int last_signum= -1;
Uint32 signum;
if(!ctx.m_currentSection->get("Signum", &signum))
{
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);
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;
......
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