List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:January 29 2007 2:47pm
Subject:bk commit into 5.1 tree (df:1.2414) BUG#25895
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of df. When df 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-01-29 14:47:38+01:00, df@stripped +1 -0
  apply holyfoot's patch for BUG#25895

  sql/item_func.cc@stripped, 2007-01-29 14:47:35+01:00, df@stripped +10 -4
    apply holyfoot's patch for BUG#25895

# 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:	df
# Host:	kahlann.erinye.com
# Root:	/home/df/mysql/build/mysql-5.1.15-release

--- 1.347/sql/item_func.cc	2007-01-15 21:49:43 +01:00
+++ 1.348/sql/item_func.cc	2007-01-29 14:47:35 +01:00
@@ -3084,7 +3084,13 @@ public:
   int count;
   bool locked;
   pthread_cond_t cond;
+#ifndef EMBEDDED_LIBRARY
   pthread_t thread;
+  void set_thread(THD *thd) { thread= thd->real_id; }
+#else
+  THD       *thread;
+  void set_thread(THD *thd) { thread= thd; }
+#endif /*EMBEDDED_LIBRARY*/
   ulong thread_id;
 
   User_level_lock(const char *key_arg,uint length, ulong id) 
@@ -3238,7 +3244,7 @@ void debug_sync_point(const char* lock_n
   else
   {
     ull->locked=1;
-    ull->thread=thd->real_id;
+    ull->set_thread(thd);
     thd->ull=ull;
   }
   pthread_mutex_unlock(&LOCK_user_locks);
@@ -3313,7 +3319,7 @@ longlong Item_func_get_lock::val_int()
       null_value=1;				// Probably out of memory
       return 0;
     }
-    ull->thread=thd->real_id;
+    ull->set_thread(thd);
     thd->ull=ull;
     pthread_mutex_unlock(&LOCK_user_locks);
     return 1;					// Got new lock
@@ -3354,7 +3360,7 @@ longlong Item_func_get_lock::val_int()
   else                                          // We got the lock
   {
     ull->locked=1;
-    ull->thread=thd->real_id;
+    ull->set_thread(thd);
     ull->thread_id= thd->thread_id;
     thd->ull=ull;
     error=0;
@@ -3403,7 +3409,7 @@ longlong Item_func_release_lock::val_int
   else
   {
 #ifdef EMBEDDED_LIBRARY
-    if (ull->locked && pthread_equal(current_thd->real_id,ull->thread))
+    if (ull->locked && (current_thd == ull->thread))
 #else
     if (ull->locked && pthread_equal(pthread_self(),ull->thread))
 #endif
Thread
bk commit into 5.1 tree (df:1.2414) BUG#25895Daniel Fischer29 Jan