summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <pekka@sama.ndb.mysql.com>2008-02-04 12:05:23 +0100
committerunknown <pekka@sama.ndb.mysql.com>2008-02-04 12:05:23 +0100
commit09f3cff4718e611bf0f6a7c11c8e703cf8977dfc (patch)
treeb6ed94014e4d31056488d183e864c6416bddfd13 /storage
parent5e6816d078defec20dd8493d774c9e3453d80310 (diff)
parent066da030290e5c4f3c58c4c76a4255e333db8470 (diff)
downloadmariadb-git-09f3cff4718e611bf0f6a7c11c8e703cf8977dfc.tar.gz
Merge sama.ndb.mysql.com:/export/space/pekka/ndb/version/my50-ndb
into sama.ndb.mysql.com:/export/space/pekka/ndb/version/my51-ndb storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/test/ndbapi/testOIBasic.cpp: Auto merged
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/src/ndbapi/Ndb.cpp6
-rw-r--r--storage/ndb/test/ndbapi/testOIBasic.cpp9
2 files changed, 5 insertions, 10 deletions
diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp
index 769773c166a..e6a1c2cfcfd 100644
--- a/storage/ndb/src/ndbapi/Ndb.cpp
+++ b/storage/ndb/src/ndbapi/Ndb.cpp
@@ -1876,11 +1876,7 @@ Ndb::printState(const char* fmt, ...)
NdbMutex_Lock(ndb_print_state_mutex);
bool dups = false;
unsigned i;
- ndbout << buf << " ndb=" << hex << this << dec;
-#ifndef NDB_WIN32
- ndbout << " thread=" << (int)pthread_self();
-#endif
- ndbout << endl;
+ ndbout << buf << " ndb=" << hex << (void*)this << endl;
for (unsigned n = 0; n < MAX_NDB_NODES; n++) {
NdbTransaction* con = theConnectionArray[n];
if (con != 0) {
diff --git a/storage/ndb/test/ndbapi/testOIBasic.cpp b/storage/ndb/test/ndbapi/testOIBasic.cpp
index a7a7661d53a..4e1c8400768 100644
--- a/storage/ndb/test/ndbapi/testOIBasic.cpp
+++ b/storage/ndb/test/ndbapi/testOIBasic.cpp
@@ -4909,7 +4909,7 @@ struct Thr {
enum State { Wait, Start, Stop, Exit };
State m_state;
Par m_par;
- Uint64 m_id;
+ pthread_t m_id;
NdbThread* m_thread;
NdbMutex* m_mutex;
NdbCondition* m_cond;
@@ -4945,7 +4945,6 @@ struct Thr {
Thr::Thr(Par par, uint n) :
m_state(Wait),
m_par(par),
- m_id(0),
m_thread(0),
m_mutex(0),
m_cond(0),
@@ -4987,7 +4986,7 @@ static void*
runthread(void* arg)
{
Thr& thr = *(Thr*)arg;
- thr.m_id = (Uint64)pthread_self();
+ thr.m_id = pthread_self();
if (thr.run() < 0) {
LL1("exit on error");
} else {
@@ -5069,11 +5068,11 @@ static Thr*
getthr()
{
if (g_thrlist != 0) {
- Uint64 id = (Uint64)pthread_self();
+ pthread_t id = pthread_self();
for (uint n = 0; n < g_opt.m_threads; n++) {
if (g_thrlist[n] != 0) {
Thr& thr = *g_thrlist[n];
- if (thr.m_id == id)
+ if (pthread_equal(thr.m_id, id))
return &thr;
}
}