summaryrefslogtreecommitdiff
path: root/mysys/safemalloc.c
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-06-28 15:06:04 +0300
committerunknown <monty@hundin.mysql.fi>2002-06-28 15:06:04 +0300
commitf238f58769a308bcf74e1e1c12655829c14c50ca (patch)
tree50f891adc2032af8c95592f9869e2a78f3cc778f /mysys/safemalloc.c
parentd7a84c7af0e1eb166c48ce7a7c3e3dca83f43baf (diff)
downloadmariadb-git-f238f58769a308bcf74e1e1c12655829c14c50ca.tar.gz
Fixed bug in REPAIR table.
Portability fix in safemalloc.c libmysqld/lib_sql.cc: Removed not needed define myisam/sort.c: Fixed core dump crash in repair table. mysql-test/r/myisam.result: Test for repair table mysql-test/t/myisam.test: Test for repair table mysys/safemalloc.c: Portability fix
Diffstat (limited to 'mysys/safemalloc.c')
-rw-r--r--mysys/safemalloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index 768edc9f11e..07a19504604 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -379,8 +379,10 @@ static int check_ptr(const char *where, byte *ptr, const char *sFile,
static int legal_leak(struct remember* pPtr)
{
/* TODO: This code needs to be made more general */
- return (pthread_self() == pPtr->thread_id || main_th == pPtr->thread_id ||
- shutdown_th == pPtr->thread_id || signal_th == pPtr->thread_id);
+ return (pthread_equal(pthread_self(), pPtr->thread_id) ||
+ pthread_equal(main_th, pPtr->thread_id) ||
+ pthread_equal(shutdown_th,pPtr->thread_id) ||
+ pthread_equal(signal_th,pPtr->thread_id));
}
#endif /* THREAD */