#At file:///home/msvensson/mysql/6.3/ based on revid:frazer@strippedvyxjs
3036 Magnus Blåudd 2009-09-08 [merge]
Merge 6.2 to 6.3
modified:
storage/ndb/include/portlib/NdbThread.h
storage/ndb/src/common/portlib/NdbThread.c
storage/ndb/src/common/transporter/TransporterRegistry.cpp
storage/ndb/src/common/util/SocketServer.cpp
storage/ndb/src/cw/cpcd/Monitor.cpp
storage/ndb/src/kernel/vm/WatchDog.cpp
storage/ndb/src/mgmclient/CommandInterpreter.cpp
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
storage/ndb/src/ndbapi/ClusterMgr.cpp
storage/ndb/src/ndbapi/TransporterFacade.cpp
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
storage/ndb/test/src/NDBT_Test.cpp
=== modified file 'storage/ndb/include/portlib/NdbThread.h'
--- a/storage/ndb/include/portlib/NdbThread.h 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/include/portlib/NdbThread.h 2009-09-08 11:56:05 +0000
@@ -93,7 +93,7 @@ void NdbThread_set_shm_sigmask(my_bool b
*
* * p_thread_func: pointer of the function to run in the thread
* * p_thread_arg: pointer to argument to be passed to the thread
- * * thread_stack_size: stack size for this thread
+ * * thread_stack_size: stack size for this thread, 0 => default size
* * p_thread_name: pointer to name of this thread
* * returnvalue: pointer to the created thread
*/
=== modified file 'storage/ndb/src/common/portlib/NdbThread.c'
--- a/storage/ndb/src/common/portlib/NdbThread.c 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/common/portlib/NdbThread.c 2009-09-08 11:56:05 +0000
@@ -149,10 +149,16 @@ struct NdbThread* NdbThread_CreateWithFu
struct NdbThread* tmpThread;
int result;
pthread_attr_t thread_attr;
- NDB_THREAD_STACKSIZE thread_stack_size= _thread_stack_size * SIZEOF_CHARP/4;
+ NDB_THREAD_STACKSIZE thread_stack_size;
DBUG_ENTER("NdbThread_Create");
+ /* Use default stack size if 0 specified */
+ if (_thread_stack_size == 0)
+ thread_stack_size = 64 * 1024 * SIZEOF_CHARP/4;
+ else
+ thread_stack_size = _thread_stack_size * SIZEOF_CHARP/4;
+
(void)thread_prio; /* remove warning for unused parameter */
if (p_thread_func == NULL)
@@ -180,6 +186,7 @@ struct NdbThread* NdbThread_CreateWithFu
if (thread_stack_size < PTHREAD_STACK_MIN)
thread_stack_size = PTHREAD_STACK_MIN;
#endif
+ DBUG_PRINT("info", ("stack_size: %llu", (ulong)thread_stack_size));
pthread_attr_setstacksize(&thread_attr, thread_stack_size);
#ifdef USE_PTHREAD_EXTRAS
/* Guard stack overflow with a 2k databuffer */
=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2009-08-12 18:09:07 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2009-09-08 11:56:05 +0000
@@ -1388,7 +1388,7 @@ TransporterRegistry::start_clients()
ndb_thread_fill_thread_object((void*)thread_object, &len, FALSE);
m_start_clients_thread= NdbThread_CreateWithFunc(run_start_clients_C,
(void**)this,
- 32768,
+ 0, // default stack size
"ndb_start_clients",
NDB_THREAD_PRIO_LOW,
ndb_thread_add_thread_id,
=== modified file 'storage/ndb/src/common/util/SocketServer.cpp'
--- a/storage/ndb/src/common/util/SocketServer.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/common/util/SocketServer.cpp 2009-09-08 11:56:05 +0000
@@ -227,7 +227,7 @@ SocketServer::startServer()
ndb_thread_fill_thread_object((void*)thread_object, &len, TRUE);
m_thread = NdbThread_CreateWithFunc(socketServerThread_C,
(void**)this,
- 32768,
+ 0, // default stack size
"NdbSockServ",
NDB_THREAD_PRIO_LOW,
ndb_thread_add_thread_id,
@@ -274,7 +274,7 @@ void
SocketServer::startSession(SessionInstance & si){
si.m_thread = NdbThread_Create(sessionThread_C,
(void**)si.m_session,
- 32768,
+ 0, // default stack size
"NdbSock_Session",
NDB_THREAD_PRIO_LOW);
}
=== modified file 'storage/ndb/src/cw/cpcd/Monitor.cpp'
--- a/storage/ndb/src/cw/cpcd/Monitor.cpp 2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/cw/cpcd/Monitor.cpp 2009-09-08 09:53:00 +0000
@@ -39,7 +39,7 @@ CPCD::Monitor::Monitor(CPCD *cpcd, int p
m_changeMutex = NdbMutex_Create();
m_monitorThread = NdbThread_Create(monitor_thread_create_wrapper,
(NDB_THREAD_ARG*) this,
- 32768,
+ 0, // default stack size
"ndb_cpcd_monitor",
NDB_THREAD_PRIO_MEAN);
m_monitorThreadQuitFlag = false;
=== modified file 'storage/ndb/src/kernel/vm/WatchDog.cpp'
--- a/storage/ndb/src/kernel/vm/WatchDog.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/kernel/vm/WatchDog.cpp 2009-09-08 11:56:05 +0000
@@ -67,7 +67,7 @@ WatchDog::doStart()
container.type = WatchDogThread;
theThreadPtr = NdbThread_CreateWithFunc(runWatchDog,
(void**)this,
- 32768,
+ 0, // default stack size
"ndb_watchdog",
NDB_THREAD_PRIO_HIGH,
ndb_thread_add_thread_id,
=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2009-09-08 11:56:05 +0000
@@ -994,7 +994,7 @@ CommandInterpreter::connect(bool interac
p.p= &m_print_mutex;
m_event_thread = NdbThread_Create(event_thread_run,
(void**)&p,
- 32768,
+ 0, // default stack size
"CommandInterpreted_event_thread",
NDB_THREAD_PRIO_LOW);
if (m_event_thread)
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2009-05-27 12:11:46 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2009-09-08 11:56:05 +0000
@@ -634,7 +634,7 @@ MgmtSrvr::start(BaseString &error_string
// Loglevel thread
_logLevelThread = NdbThread_Create(logLevelThread_C,
(void**)this,
- 32768,
+ 0, // default stack size
"MgmtSrvr_Loglevel",
NDB_THREAD_PRIO_LOW);
=== modified file 'storage/ndb/src/ndbapi/ClusterMgr.cpp'
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp 2009-07-02 20:47:17 +0000
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp 2009-09-08 11:56:05 +0000
@@ -129,7 +129,7 @@ ClusterMgr::startThread() {
theClusterMgrThread = NdbThread_Create(runClusterMgr_C,
(void**)this,
- 32768,
+ 0, // default stack size
"ndb_clustermgr",
NDB_THREAD_PRIO_LOW);
NdbMutex_Unlock(clusterMgrThreadMutex);
@@ -653,7 +653,9 @@ ArbitMgr::doStart(const Uint32* theData)
aSignal.init(GSN_ARBIT_STARTREQ, theData);
sendSignalToThread(aSignal);
theThread = NdbThread_Create(
- runArbitMgr_C, (void**)this, 32768, "ndb_arbitmgr",
+ runArbitMgr_C, (void**)this,
+ 0, // default stack size
+ "ndb_arbitmgr",
NDB_THREAD_PRIO_HIGH);
NdbMutex_Unlock(theThreadMutex);
}
=== modified file 'storage/ndb/src/ndbapi/TransporterFacade.cpp'
--- a/storage/ndb/src/ndbapi/TransporterFacade.cpp 2009-07-02 20:47:17 +0000
+++ b/storage/ndb/src/ndbapi/TransporterFacade.cpp 2009-09-08 11:56:05 +0000
@@ -796,13 +796,13 @@ TransporterFacade::init(Uint32 nodeId, c
theReceiveThread = NdbThread_Create(runReceiveResponse_C,
(void**)this,
- 32768,
+ 0, // default stack size
"ndb_receive",
NDB_THREAD_PRIO_LOW);
theSendThread = NdbThread_Create(runSendRequest_C,
(void**)this,
- 32768,
+ 0, // default stack size
"ndb_send",
NDB_THREAD_PRIO_LOW);
theClusterMgr->startThread();
=== modified file 'storage/ndb/src/ndbapi/ndb_cluster_connection.cpp'
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp 2009-09-04 11:01:23 +0000
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp 2009-09-08 11:56:05 +0000
@@ -112,7 +112,9 @@ int Ndb_cluster_connection::start_connec
DBUG_PRINT("info",("starting thread"));
m_impl.m_connect_thread=
NdbThread_Create(run_ndb_cluster_connection_connect_thread,
- (void**)&m_impl, 32768, "ndb_cluster_connection",
+ (void**)&m_impl,
+ 0, // default stack size
+ "ndb_cluster_connection",
NDB_THREAD_PRIO_LOW);
}
else if (r < 0)
=== modified file 'storage/ndb/test/src/NDBT_Test.cpp'
--- a/storage/ndb/test/src/NDBT_Test.cpp 2009-07-03 14:15:09 +0000
+++ b/storage/ndb/test/src/NDBT_Test.cpp 2009-09-08 11:56:05 +0000
@@ -536,7 +536,7 @@ void NDBT_TestCaseImpl1::startStepInThre
BaseString::snprintf(buf, sizeof(buf), "step_%d", stepNo);
NdbThread* pThread = NdbThread_Create(runStep_C,
(void**)pStep,
- 65535,
+ 0, // default stack size
buf,
NDB_THREAD_PRIO_LOW);
threads.push_back(pThread);
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20090908115605-bzxutht2ck0t07t4.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.3 branch (magnus.blaudd:3036) | Magnus Blåudd | 8 Sep |