MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:April 19 2007 9:07pm
Subject:bk commit into 5.0 tree (cmiller:1.2439) BUG#27964
View as plain text  
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

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 \
  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

# 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:
# 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;
bk commit into 5.0 tree (cmiller:1.2439) BUG#27964Chad MILLER19 Apr