summaryrefslogtreecommitdiff
path: root/mysys/my_winthread.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-11-19 13:16:25 +0100
committerSergei Golubchik <sergii@pisem.net>2013-11-19 13:16:25 +0100
commitfa3f8a18b247d5d7d86d60d016681cc188522f80 (patch)
tree180232f5e13c81e22ae9374b41be168ed9578932 /mysys/my_winthread.c
parentefab095c7f8f044525ce7d2313fad5f86032baab (diff)
parent543b6e02246db25d8a61574fc709b28e7720d1a0 (diff)
downloadmariadb-git-fa3f8a18b247d5d7d86d60d016681cc188522f80.tar.gz
mysql-5.5.34 merge
(some patches reverted, test case added)
Diffstat (limited to 'mysys/my_winthread.c')
-rw-r--r--mysys/my_winthread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
index b77581fae78..d7d7817d400 100644
--- a/mysys/my_winthread.c
+++ b/mysys/my_winthread.c
@@ -68,6 +68,7 @@ int pthread_create(pthread_t *thread_id, const pthread_attr_t *attr,
uintptr_t handle;
struct thread_start_parameter *par;
unsigned int stack_size;
+ int error_no;
DBUG_ENTER("pthread_create");
par= (struct thread_start_parameter *)malloc(sizeof(*par));
@@ -88,9 +89,10 @@ int pthread_create(pthread_t *thread_id, const pthread_attr_t *attr,
DBUG_RETURN(0);
error_return:
+ error_no= errno;
DBUG_PRINT("error",
- ("Can't create thread to handle request (error %d)",errno));
- DBUG_RETURN(-1);
+ ("Can't create thread to handle request (error %d)",error_no));
+ DBUG_RETURN(error_no);
}