Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-04-19 17:07:11-04:00, cmiller@stripped +1 -0
Bug #27964: pthread_key_create doesn't set errno, so don't report \
errno
Vasil Dimov (at Oracle) noted that pthread_key_create() does not
set errno, so if it fails then we return the wrong error code.
Instead, capture the return value, which is the real error value,
and instead report that.
mysys/my_thr_init.c@stripped, 2007-04-19 17:07:07-04:00, cmiller@stripped +3 -2
pthread functions don't set the global errno, which should be
obvious.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: cmiller
# Host: zippy.cornsilk.net
# Root: /home/cmiller/work/mysql/mysql-5.0-maint--pthreadkeycreate
--- 1.42/mysys/my_thr_init.c 2007-02-22 13:32:16 -05:00
+++ 1.43/mysys/my_thr_init.c 2007-04-19 17:07:07 -04:00
@@ -79,11 +79,12 @@ static uint get_thread_lib(void);
my_bool my_thread_global_init(void)
{
+ int pth_ret;
thd_lib_detected= get_thread_lib();
- if (pthread_key_create(&THR_KEY_mysys,0))
+ if (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL))
{
- fprintf(stderr,"Can't initialize threads: error %d\n",errno);
+ fprintf(stderr,"Can't initialize threads: pthread error %d\n", pth_ret);
return 1;
}
| Thread |
|---|
| • bk commit into 5.0 tree (cmiller:1.2439) BUG#27964 | Chad MILLER | 19 Apr |