List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:January 29 2007 2:33pm
Subject:bk commit into 5.1 tree (df:1.2412)
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 15:33:19+01:00, df@stripped +1 -0
  Merge kahlann.erinye.com:/home/df/mysql/build/mysql-5.1.15-release
  into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.1-build-work-5.1.15-and-opt-merge
  MERGE: 1.2403.4.6

  sql/item_func.cc@stripped, 2007-01-29 15:33:16+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.347.1.1

# 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-build-work-5.1.15-and-opt-merge/RESYNC

--- 1.349/sql/item_func.cc	2007-01-24 17:12:28 +01:00
+++ 1.350/sql/item_func.cc	2007-01-29 15:33:16 +01:00
@@ -3085,7 +3085,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) 
@@ -3239,7 +3245,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);
@@ -3314,7 +3320,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
@@ -3355,7 +3361,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;
@@ -3404,7 +3410,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.2412)Daniel Fischer29 Jan